> For the complete documentation index, see [llms.txt](https://docs.pagsmile.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagsmile.com/reference/payin/submit-a-payin/poland/blik-paylater.md). Agents can also search and read this documentation through its [MCP server](https://docs.pagsmile.com/~gitbook/mcp).

# BLIK(PayLater)

BLIK Pay Later allows customers in Poland to complete payments using the pay-later option offered through participating banking applications. After the payment request is created, redirect the customer to the returned `pay_url` to authorize and complete the payment.

{% hint style="info" %}
BLIK Pay Later supports real-time payment processing.
{% endhint %}

{% hint style="info" %}
Refunds are supported for this payment method.
{% endhint %}

### Endpoint

<mark style="color:green;">`POST`</mark> `https://gateway-test.pagsmile.com/trade/pay`

### Headers

| Header          | Type   | Required | Description                                               |
| --------------- | ------ | -------- | --------------------------------------------------------- |
| `Content-Type`  | string | Yes      | Fixed value: `application/json; charset=UTF-8`.           |
| `Authorization` | string | Yes      | Basic authentication using `Base64(app_id:security_key)`. |

### Request body

<table><thead><tr><th width="168.88671875">Parameter</th><th width="111.109375">Type</th><th width="111.56640625">Required</th><th>Constraints</th><th>Description</th></tr></thead><tbody><tr><td><code>app_id</code></td><td>string</td><td>Yes</td><td>Use the App ID assigned by Pagsmile.</td><td>Merchant application ID.</td></tr><tr><td><code>out_trade_no</code></td><td>string</td><td>Yes</td><td>Maximum length: 64 characters. Must be unique for the merchant application.</td><td>Merchant order number.</td></tr><tr><td><code>method</code></td><td>string</td><td>Yes</td><td>Fixed value: <code>BLIKPayLater</code>.</td><td>Payment method.</td></tr><tr><td><code>order_currency</code></td><td>string</td><td>Yes</td><td>Fixed value: <code>PLN</code>.</td><td>Payment currency.</td></tr><tr><td><code>order_amount</code></td><td>decimal</td><td>Yes</td><td>Minimum: <code>0.01 PLN</code>; maximum: <code>50,000.00 PLN</code>. Supports up to two decimal places.</td><td>Payment amount.</td></tr><tr><td><code>subject</code></td><td>string</td><td>Yes</td><td>Maximum length: 128 characters.</td><td>Payment subject or order title.</td></tr><tr><td><code>content</code></td><td>string</td><td>No</td><td>Maximum length: 255 characters.</td><td>Payment description or order details.</td></tr><tr><td><code>timestamp</code></td><td>string</td><td>Yes</td><td>Format: <code>yyyy-MM-dd HH:mm:ss</code>.</td><td>Time at which the request is sent.</td></tr><tr><td><code>notify_url</code></td><td>string</td><td>Yes</td><td>Must be a valid URL </td><td>Merchant endpoint that receives asynchronous payment notifications.</td></tr><tr><td><code>buyer_id</code></td><td>string</td><td>Yes</td><td>Maximum length: 128 characters.</td><td>Merchant-side customer ID.</td></tr><tr><td><code>customer.name</code></td><td>string</td><td>Yes</td><td>Must not be empty. Provide the customer's full name.</td><td>Name of the customer making the payment.</td></tr></tbody></table>

### Request example

```json
{
  "app_id": "170***697",
  "out_trade_no": "out_trade_no_326***500",
  "method": "BLIKPayLater",
  "order_currency": "PLN",
  "order_amount": "1",
  "subject": "test 10",
  "content": "test 10",
  "timestamp": "2026-10-29 18:50:42",
  "notify_url": "https://merchant.example.com/payment/notify",
  "buyer_id": "buyer123",
  "customer": {
    "name": "Test Name"
  }
}
```

### Response example

```json
{
  "code": "10000",
  "msg": "Success",
  "prepay_id": "ZFIvK1Z****BeD22",
  "trade_no": "20261***799",
  "out_trade_no": "out_trade_no_326***500",
  "web_url": "",
  "pay_url": "https://redirect.example.com/payment?redirection_token=eyJhbGc****e4b7s5PA",
  "trade_status": "PROCESSING"
}
```

### Complete the payment

1. Redirect the customer to the complete `pay_url` returned by Pagsmile.
2. Allow the customer to authorize the payment using the instructions displayed on the redirected page or in the supported banking application.
3. Use the payment notification or the Payin Detail API to determine the final payment status.

{% hint style="warning" %}
A response with `code=10000` confirms only that the payment request was created. `trade_status=PROCESSING` does not mean that the payment has been completed. Confirm the final payment result before delivering goods or services.
{% endhint %}
