BLIK (Błyskawiczne Przelewy Internetowe i Karty) is a popular Polish mobile payment system that enables instant bank transfers and payments using a six-digit code. As part of Stripe's payment infrastructure, BLIK provides a secure and convenient way for Polish customers to complete transactions without entering lengthy bank account details.
This guide covers how to implement the confirmBlikPayment method in your Stripe integration to process BLIK payments successfully. For merchants serving Polish customers, integrating BLIK opens access to a payment method that has become essential to the local e-commerce ecosystem. Our team specializes in helping businesses integrate Polish payment solutions through comprehensive web development services that include secure payment processing.
BLIK Fundamentals
What is BLIK?
BLIK is a mobile payment solution developed by Polish banks that allows users to make instant payments using a six-digit code generated within their mobile banking application. The system was launched in 2015 and has since become one of the most popular payment methods in Poland, with millions of users conducting transactions daily. BLIK operates as an authenticated bank debit method, meaning payments are debited directly from the customer's bank account after they provide authorization.
The payment method has gained widespread adoption because it eliminates the need for physical cards during online and in-store purchases. Customers can generate a BLIK code in their banking app and use it for payments, transfers, and cash withdrawals at ATMs. For merchants, accepting BLIK means tapping into a payment method that Polish consumers trust and prefer for everyday transactions.
How BLIK Works
The BLIK payment flow begins when a customer selects BLIK as their payment method at checkout. The customer opens their mobile banking application and generates a six-digit BLIK code, which remains valid for a short period--typically around two minutes. This code is then entered into the payment form on your e-commerce platform. Once the code is submitted, the customer's bank sends a push notification to their mobile device asking for transaction confirmation.
After receiving the push notification, the customer reviews the payment details in their banking app and confirms the transaction by entering their PIN or using biometric authentication. This two-step authorization process provides strong security while maintaining convenience. The payment is then processed instantly, and both the merchant and customer receive confirmation of the successful transaction.
Why Accept BLIK
For businesses operating in Poland or serving Polish customers, accepting BLIK offers significant advantages:
- Wide Adoption: BLIK has penetrated over 80% of Polish bank customers
- Quick Settlement: Transactions settle quickly compared to traditional bank transfers
- Reduced Fraud: The authentication flow through the banking app reduces fraud risk
- Familiar Integration: Stripe's integration follows the same patterns as other payment methods
Integrating BLIK alongside other payment methods like Stripe Payment Elements creates a complete payment solution for your Polish customers.
The confirmBlikPayment Method
API Overview
The stripe.confirmBlikPayment method is part of Stripe's JavaScript SDK and is used to confirm BLIK payments when the customer submits your payment form. This method handles the entire BLIK confirmation flow, from validating the entered code to processing the authorization through the customer's banking app. When called, it attempts to confirm the PaymentIntent with the BLIK payment method specified in the request.
The method is specifically designed for the BLIK Payments with Payment Methods flow, which means it works with PaymentIntents that have been created with BLIK as an enabled payment method. Unlike some other payment confirmation methods in Stripe, confirmBlikPayment handles the unique characteristics of BLIK, including the code entry and push notification confirmation process.
Method Parameters
The confirmBlikPayment method accepts a client secret and an optional options object:
- clientSecret: Obtained from the PaymentIntent created on your server
- payment_method: Specifies which payment method to use for confirmation, including the BLIK code
- return_url: Indicates where the customer should be redirected after confirmation
Return Values
When confirmBlikPayment is called, it returns a Promise that resolves with:
- Success: The confirmed PaymentIntent with status
succeeded - Error: A StripeError object with specific error type and message
Common error types include InvalidPaymentMethod, AuthenticationRequired, and CardError. Each error type requires specific handling in your application to provide the right guidance to customers.
Timing Considerations
The BLIK payment confirmation process involves several asynchronous steps that require careful timing consideration in your implementation:
- Customer enters BLIK code
- Payment is processed and push notification sent
- Customer confirms in banking app
- Payment succeeds or fails
The BLIK code typically expires after two minutes, requiring the customer to generate a new code if not confirmed in time. Your checkout flow should handle this gracefully, allowing customers to restart without losing their cart contents.
Integration Implementation
Creating the PaymentIntent
Before calling confirmBlikPayment, create a PaymentIntent on your server with BLIK enabled:
// Server-side: Create PaymentIntent
const paymentIntent = await stripe.paymentIntents.create({
amount: 1000,
currency: 'pln',
payment_method_types: ['blik'],
metadata: {
order_id: 'your_order_id',
},
});
The client secret returned from this call is passed to the client-side JavaScript. Always create PaymentIntents on your server to prevent client-side manipulation of payment amounts.
Client-Side Implementation
The client-side implementation begins when the customer submits your payment form:
// Client-side: Confirm BLIK payment
const { error } = await stripe.confirmBlikPayment(
clientSecret,
{
payment_method: {
blik: { code: blikCode },
},
}
);
if (error) {
// Handle error - show message to customer
console.error(error.message);
} else {
// Payment succeeded - complete order
}
Your form submission handler should disable the submit button and show a loading indicator while the confirmation is in progress to prevent duplicate submissions.
Error Handling Strategies
Robust error handling is essential for a smooth BLIK payment experience:
- Expired codes: Prompt customer to generate a new BLIK code
- Insufficient funds: Suggest alternative payment methods
- Bank rejections: Provide guidance based on error message
Implement idempotency using PaymentIntent's idempotency keys to prevent duplicate charges. Always verify PaymentIntent status on your server after client confirmation to ensure the payment was truly processed before fulfilling orders.
Best Practices
User Experience Optimization
- Clear Instructions: Display step-by-step guidance on generating and entering BLIK codes
- Code Validity Indicator: Show countdown timer for code expiration
- Loading Feedback: Indicate processing status to prevent duplicate submissions
- Error Guidance: Provide specific guidance for each error type
Security Considerations
- Server-Side Creation: Always create PaymentIntents on the server
- Status Verification: Verify PaymentIntent status on your server after client confirmation
- HTTPS: Ensure your website uses secure connections
- Rate Limiting: Implement rate limiting on payment confirmation attempts
For enhanced security and fraud prevention, consider integrating AI-powered fraud detection alongside your payment processing to identify and block suspicious transactions before they reach the confirmation stage.
Testing BLIK Integration
Stripe provides test mode credentials for BLIK payments:
- Use test numbers to simulate successful payments
- Test with expired codes to verify error handling
- Test insufficient funds scenarios
- Test cancellation flow when customer rejects in banking app
Document all test cases to ensure repeatable testing as your application evolves. Complement your BLIK testing with other payment method tests like Stripe Payment Links and Klarna to ensure your entire payment stack is reliable.
Advanced Integration Scenarios
Recurring Payments
While BLIK is primarily designed for one-time payments, Stripe supports storing BLIK payment methods for returning customers:
- Initial payment follows standard BLIK flow with code entry
- Subsequent payments can use the stored payment method
- Review applicable regulations for recurring payment requirements
Multi-Currency Considerations
BLIK payments require PLN as the transaction currency:
- Display PLN amount as the primary price
- Show converted amounts only if necessary
- Indicate final charge will be in PLN
Related Stripe Documentation
Explore more payment methods and features in our Stripe platform documentation:
Frequently Asked Questions
How long is a BLIK code valid?
BLIK codes are typically valid for about two minutes from the time they are generated. If the customer does not confirm the transaction within this period, they must generate a new code from their banking app.
Can I use BLIK for recurring payments?
BLIK can be stored as a payment method for returning customers, but regulations may require explicit authentication for each transaction depending on your jurisdiction.
What currencies does BLIK support?
BLIK transactions must be in Polish Zloty (PLN). If your application supports multiple currencies, you must handle currency conversion when customers select BLIK.
How do I handle expired BLIK codes?
When a BLIK code expires, display a clear message to the customer requesting they generate a new code from their banking app and resubmit the payment. Your form should preserve cart contents during this process.
Sources
- Stripe JS Reference - confirmBlikPayment - Official Stripe API documentation for the confirmBlikPayment method
- Stripe BLIK Guide - Comprehensive guide to BLIK payments including implementation details
- Stripe BLIK Documentation - Official Stripe documentation for BLIK payments
- Payment Intents API - PaymentIntents API reference