On this page
No Headings
Last updated: June 4, 2026
Use the Orders v2 API to integrate BLIK Pay Later (BNPL) for buyers in Poland, settling in PLN through Payment Processor (PPRO).
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
curl -X POST https://api-m.sandbox.paypal.com/v1/oauth2/token \
-u "CLIENT-ID:CLIENT-SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials"Expected response:
{
"access_token": "ACCESS-TOKEN",
"token_type": "Bearer",
"expires_in": 32400
}Idempotency: Token requests are naturally idempotent. Cache the token and reuse it until expiry.
2: Create an order with 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
Timing: The buyer has 30 minutes to complete BLIK authentication before the session expires.
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.
Request headers:
| Header | Value |
|---|---|
Authorization | Bearer ACCESS-TOKEN |
Content-Type | application/json |
PayPal-Request-Id | Unique idempotency key (UUID recommended) |
Prefer | return=representation |
3: Redirect the buyer to the payer-action URL from the create order response. The buyer completes their authentication through the BLIK flow, which involves:
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}
curl -X GET https://api-m.sandbox.paypal.com/v2/checkout/orders/ORDER-ID \
-H "Authorization: Bearer ACCESS-TOKEN" \
-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.
5: Subscribe to these webhook events to track payment lifecycle changes:
PAYMENT.CAPTURE.COMPLETED -- Payment was capturedPAYMENT.CAPTURE.DENIED -- Payment capture was deniedPAYMENT.CAPTURE.REFUNDED -- A refund was processedCHECKOUT.ORDER.COMPLETED -- Order completedUse 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 refunds
BLIK Pay Later supports full, partial, and multiple refunds within 13 months of the original capture.
Operation: POST /v2/payments/captures/{capture_id}/refund
curl -X POST https://api-m.sandbox.paypal.com/v2/payments/captures/CAPTURE-ID/refund \
-H "Authorization: Bearer ACCESS-TOKEN" \
-H "Content-Type: application/json" \
-H "PayPal-Request-Id: UNIQUE-REFUND-ID" \
-d '{
"amount": {
"value": "50.00",
"currency_code": "PLN"
}
}'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.