Skip to main content
POST
收银台下单

概述

本页说明 POST /payment/open/institution/v1/pay/checkout/order 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

说明

  • 认证方式使用 GatePay 标准签名请求头。
  • 本页展示同一接口的机构路径版本。
  • 除创建子账户、查询子账户详情、分页查询子账户外,机构侧请求需携带 X-GatePay-On-Behalf-Of
  • 这是收银台支付链路的起点接口,通常后续会搭配 GET /v2/pay/order/query 与支付回调一起使用。
  • 成功响应中请重点保存 prepayId,并使用返回的 location 跳转用户,不要手动拼接页面地址。
  • 通用签名规则请参见 /api-reference/version/100/cn/common/securityAndSignature

请求头

X-GatePay-Certificate-ClientId
string
必填

商户客户端ID

示例:

"mZ96D37oKk-HrWJc"

X-GatePay-Signature
string
必填

签名

X-GatePay-Timestamp
string
必填

毫秒级时间戳,与服务端时间偏差不得超过30秒

示例:

"1695611256106"

X-GatePay-Nonce
string
必填

随机数

示例:

"1260554069"

X-GatePay-On-Behalf-Of
string
必填

必填代理归属请求头。请填写本次请求的发起方账户 ID;在机构代理商户 API 中通常填写目标子账户 ID,在机构代扣与划转接口中可填写机构账户 ID 或子账户 ID。

请求体

application/json

收银台下单请求参数

merchantTradeNo
string
必填

商户订单号

示例:

"163"

env
object
必填
goods
object
必填
merchantUserId
integer<int64>
必填

支付者在商户平台注册时的唯一ID

示例:

123

chain
string
必填

所选链名字

示例:

"MATIC"

fullCurrType
string
必填

包含链名字的币种字段

示例:

"USDT_MATIC"

currency
string

加密货币币种。加密币下单时与 orderAmount 一并必传;纯法币下单(传 fiatCurrency + fiatAmount)时可省略,系统会换算为 USDT

示例:

"USDT"

orderAmount
string

加密货币订单金额,最小值0.0001,最高精度为8位。加密币下单时与 currency 一并必传;纯法币下单(传 fiatCurrency + fiatAmount)时可省略

示例:

"118.75"

surchargeAmount
string

附加费,指由消费者承担的费用

toleranceAmount
string

容差金额

fiatCurrency
string

法币币种。纯法币下单时与 fiatAmount 一并传入,并省略 currency/orderAmount

fiatAmount
string

法币订单金额,最小值0.01,最高精度为2位。纯法币下单时与 fiatCurrency 一并传入,并省略 currency/orderAmount

payCurrency
string

地址支付的付款币种

orderExpireTime
integer<int64>

订单过期绝对时间单位毫秒

returnUrl
string<uri>

订单支付成功后返回跳转地址

示例:

"https://lotkeys.com/tr/gate-payment-response"

cancelUrl
string<uri>

订单支付失败后返回跳转地址

示例:

"https://lotkeys.com/tr/gate-payment-response"

channelId
string

客户名称

示例:

"123456"

actualCurrency
string

实际结算币种

payAmount
string

支付金额

address
string

区块链地址

响应

200 - application/json

下单成功

status
string

响应状态

示例:

"SUCCESS"

code
string

响应码,000000表示成功

示例:

"000000"

errorMessage
string

错误信息,成功时为空

示例:

""

data
object