BLIK Pay Later - Orders API
Last updated: Apr 14th, 3:46pm
Integrate BLIK using the Orders API
Use the Orders v2 API to integrate BLIK Pay Later (BNPL) for buyers in Poland, settling in PLN through Payment Processor (PPRO).
Prerequisites
- A sandbox merchant account at developer.paypal.com with the ACCEPT_PYMTS_VIA_BLIK_PAY_LATER feature flag enabled under Account Settings.
- PLN (Polish Zloty) currency enabled on your merchant account.
- Your merchant account must not be in a restricted seller country (US, CA, GB, DE, FR, IT, ES, AT). Contact PayPal support to confirm BLIK Pay Later availability for your seller country if uncertain.
- Buyers must be located in Poland. BLIK Pay Later is not available outside Poland.
Follow these steps to complete the integration and process a BLIK Pay Later successfully. 1: Request an OAuth 2.0 token with your client credentials.
Operation: POST /v1/oauth2/token
1curl -X POST https://api-m.sandbox.paypal.com/v1/oauth2/token \2 -u "CLIENT-ID:CLIENT-SECRET" \3 -H "Content-Type: application/x-www-form-urlencoded" \4 -d "grant_type=client_credentials"
Expected response:
1{2 "access_token": "ACCESS-TOKEN",3 "token_type": "Bearer",4 "expires_in": 324005}
intent: CAPTURE and set the blik_pay_later to ORDER_COMPLETE_ON_PAYMENT_APPROVAL so that PayPal captures the payment automatically when the buyer approves.
Operation: POST /v2/checkout/orders
Idempotency: Use the PayPal-Request-Id header to prevent duplicate order creation. If you retry with the same ID, PayPal returns the existing order rather than creating a new one.
| Header | Value |
|---|---|
Authorization |
Bearer ACCESS-TOKEN |
Content-Type |
application/json |
PayPal-Request-Id |
Unique idempotency key (UUID recommended) |
Prefer |
return=representation |
- Selecting their bank
- Entering a 6-digit BLIK code from their mobile banking app
- Confirming the payment in their banking app
ORDER_COMPLETE_ON_PAYMENT_APPROVAL is a set, PayPal captures the payment as soon as the buyer approves. The buyer is then redirected to your return_url.
4: After the buyer returns, confirm the order status is COMPLETED.
Operation: GET /v2/checkout/orders/{order_id}
1curl -X GET https://api-m.sandbox.paypal.com/v2/checkout/orders/ORDER-ID \2 -H "Authorization: Bearer ACCESS-TOKEN" \3 -H "Content-Type: application/json"
Check that status is COMPLETED and extract the capture ID from purchase_units[0].payments.captures[0].id for refund operations.
PAYMENT.CAPTURE.COMPLETED-- Payment was capturedPAYMENT.CAPTURE.DENIED-- Payment capture was deniedPAYMENT.CAPTURE.REFUNDED-- A refund was processedCHECKOUT.ORDER.COMPLETED-- Order completed
Use webhooks as the source of truth for updating your order database. Do not rely on the return URL redirect alone, because the buyer may close their browser before the redirect completes.
6: Process refundsBLIK Pay Later supports full, partial, and multiple refunds within 13 months of the original capture.
Operation: POST /v2/payments/captures/{capture_id}/refund
1curl -X POST https://api-m.sandbox.paypal.com/v2/payments/captures/CAPTURE-ID/refund \2 -H "Authorization: Bearer ACCESS-TOKEN" \3 -H "Content-Type: application/json" \4 -H "PayPal-Request-Id: UNIQUE-REFUND-ID" \5 -d '{6 "amount": {7 "value": "50.00",8 "currency_code": "PLN"9 }10 }'
Idempotency: Send a unique PayPal-Request-Id for each refund attempt. If a refund request times out, retry with the same ID to avoid duplicate refunds.