> 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-oneclick.md).

# BLIK(oneclick)

### Overview

BLIK One Click allows merchants to collect the user's 6-digit BLIK authorization code on the merchant side and submit it in the payment request.

After the request is submitted, the user needs to confirm the payment in their banking app to complete the transaction.

Unlike the regular BLIK redirect flow, BLIK One Click requires the merchant to pass the `auth_code`, `user_ip`, and `user_agent` in the payment request.

This endpoint allows you to submit a payin by BLIK One Click in Poland.

After the payment order is created successfully, Pagsmile returns a `pay_url`. Redirect the user to the `pay_url` to continue and complete the payment.

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

{% hint style="info" %}
BLIK One Click supports partial refund.
{% endhint %}

{% hint style="info" %}
The supported amount range is `0.01` to `50000` PLN per transaction. Most issuers may have a limit of `10000` PLN per transaction.
{% endhint %}

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

#### Headers

| Name                                            | Type   | Description                                |
| ----------------------------------------------- | ------ | ------------------------------------------ |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json; chartset=UTF-8           |
| Authorization<mark style="color:red;">\*</mark> | string | Basic Base($app\_*id:$security\_*&#x6B;ey) |

#### Request Body

| Parameter       | Type   | Required | Constraints                                                                         | Description                                       |
| --------------- | ------ | -------- | ----------------------------------------------------------------------------------- | ------------------------------------------------- |
| app\_id         | string | Required | Max length: 32                                                                      | The merchant application ID assigned by Pagsmile. |
| out\_trade\_no  | string | Required | Max length: 64                                                                      | Merchant order number. Must be unique.            |
| method          | string | Required | Fixed value: `BlikOneClick`                                                         | Payment method.                                   |
| order\_currency | string | Required | Fixed value: `PLN`                                                                  | Payment currency.                                 |
| order\_amount   | string | Required | Min: `0.01`; max: `50000`; most issuers may have a limit of `10000` per transaction | Payment amount.                                   |
| subject         | string | Required | Max length: 128                                                                     | Payment subject or order title.                   |
| content         | string | Optional | Max length: 255                                                                     | Payment content or order description.             |
| timestamp       | string | Required | Format: `yyyy-MM-dd HH:mm:ss`; max length: 19                                       | Request timestamp.                                |
| notify\_url     | string | Required | Valid URL                                                                           | The URL to receive payment notifications.         |
| buyer\_id       | string | Required | Max length: 64                                                                      | Merchant-side user ID.                            |
| user\_ip        | string | Required | Valid IPv4 or IPv6 address                                                          | User's IP address.                                |
| user\_agent     | string | Required | Max length: 512                                                                     | User's browser user agent.                        |
| auth\_code      | string | Required | 6 digits                                                                            | BLIK authorization code provided by the user.     |
| customer.name   | string | Required | Max length: 128                                                                     | Customer's name.                                  |

#### Request Sample

```json
{
  "app_id": "170***070",
  "out_trade_no": "out_trade_no_485**08",
  "method": "BlikOneClick",
  "order_currency": "PLN",
  "order_amount": "1",
  "subject": "test 10",
  "content": "test 10",
  "timestamp": "2021-08-04 18:50:42",
  "notify_url": "http://demo.gemini-tiger.cn/callback/success",
  "buyer_id": "buyer123",
  "user_ip": "123.12.123.1",
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
  "auth_code": "123456",
  "customer": {
    "name": "Test User Name"
  }
}
```

#### Response Sample

```json
{
  "code": "10000",
  "msg": "Success",
  "prepay_id": "WUNu****30006",
  "trade_no": "2026****016",
  "out_trade_no": "out_trade_no_48***08",
  "web_url": "",
  "pay_url": "https://checkout-test.pagsmile.com/checkout?prepay_id=ZVR****08e",
  "trade_status": "PROCESSING"
}
```

{% hint style="info" %}
After receiving the `pay_url`, redirect the user to the `pay_url` to continue the payment.
{% endhint %}
