> For the complete documentation index, see [llms.txt](https://docs.topay.mobi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.topay.mobi/cn/reference/api-reference/crypto-payments/acquiring/checkout-mode.md).

# 收银台模式

{% hint style="warning" %}
每个请求都必须包含[公共参数](/cn/reference/api-reference/common-parameters.md)。
{% endhint %}

通过托管收银台或指定链地址创建数字货币支付订单。

<mark style="color:green;">`POST`</mark> `https://api.topay.mobi/v1/order/pay`

#### 请求体 <a href="#request-body" id="request-body"></a>

| 名称                                                  | 类型     | 说明                      |
| --------------------------------------------------- | ------ | ----------------------- |
| request\_id<mark style="color:red;">\*</mark>       | String | 商户提供的外部交易 ID            |
| payment\_method<mark style="color:red;">\*</mark>   | String | 数字货币收银台固定设置为 `on_chain` |
| amount<mark style="color:red;">\*</mark>            | String | 订单金额                    |
| currency<mark style="color:red;">\*</mark>          | String | 订单币种                    |
| remark                                              | String | 收银台页面展示的商品详细信息          |
| product\_name<mark style="color:red;">\*</mark>     | String | 收银台页面展示的商品名称            |
| return\_url                                         | String | 付款完成后的网页跳转地址，按需提供       |
| notify\_url                                         | String | Webhook 通知地址            |
| customer\_ref\_id<mark style="color:red;">\*</mark> | String | 客户唯一标识                  |
| pay\_currency                                       | String | 支付资产                    |

* [指定链收银台](/cn/reference/api-reference/crypto-payments/acquiring/checkout-mode/specified-chain-checkout.md) 使用 `payment_method=on_chain`。

## 响应 <a href="#response" id="response"></a>

`on_chain` 响应同时提供两种付款展示方式：

| 字段                | 类型     | 说明            |
| ----------------- | ------ | ------------- |
| `receive_address` | String | 数字货币付款的收款地址。  |
| `checkout_url`    | String | 同一订单的托管收银台链接。 |

您可以在自有界面展示地址，或引导客户进入 `checkout_url`。

```json
{"code":"200",
 "data":{
   "request_id":"1675157000687",
   "partner_id":"2000051",
   "order_no":"2023013120000600262092321146",
   "currency":"USDT_TRC20",
   "order_amount":"0.3",
   "status":11,
   "payment_method":"on_chain",
   "receive_address":"0x1234567890abcdef1234567890abcdef12345678",
   "checkout_url":"https://example.com/checkout/example"
 },
 "message":"success"
 }
```

地址仅供示例说明。请使用 Topay 实际返回的充值地址，或所选网络上真实的收款人地址。
