跳转到主要内容
POST
/
v1
/
pay
/
checkout
/
order
收银台下单
curl --request POST \
  --url https://openplatform.gateapi.io/v1/pay/checkout/order \
  --header 'Content-Type: application/json' \
  --header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
  --header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
  --header 'X-GatePay-Signature: <x-gatepay-signature>' \
  --header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
  --data '
{
  "merchantTradeNo": "163",
  "env": {
    "terminalType": "APP"
  },
  "merchantUserId": 123,
  "goods": {
    "goodsType": "02",
    "goodsName": "Sipariş Ödemesi - 177",
    "goodsDetail": "Sipariş No : 160"
  },
  "chain": "MATIC",
  "fullCurrType": "USDT_MATIC"
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "errorMessage": "",
  "data": {
    "prepayId": "65466648727916544",
    "orderAmount": "1",
    "surchargeAmount": "0",
    "currency": "USDT",
    "fiatCurrency": "",
    "fiatAmount": "",
    "terminalType": "APP",
    "expireTime": 1677573665219,
    "qrContent": "http://openplatform.gate.io/qr/GA0cskPehKxQpshvm3Goeve8dHpwCl6yCHLSWUYrLqo=",
    "location": "https://www.gate.com/cashier?prepayid=65466648727916544",
    "payCurrency": "USDT",
    "payAmount": "1",
    "chain": {
      "chain_type": "BSC",
      "address": "0x86608d3C9f979b98a3b2417216eD859d313E339D",
      "fullCurrType": "USDT_EOS"
    },
    "channelId": "123456",
    "goodsName": "charge",
    "inUsdt": "93.99"
  }
}

请求头

X-GatePay-Certificate-ClientId
string
必填

商户客户端ID

示例:

"mZ96D37oKk-HrWJc"

X-GatePay-Signature
string
必填

签名

X-GatePay-Timestamp
string
必填

时间戳(毫秒)

示例:

"1695611256106"

X-GatePay-Nonce
string
必填

随机数

示例:

"1260554069"

请求体

application/json

收银台下单请求参数

merchantTradeNo
string
必填

商户订单号

示例:

"163"

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

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

示例:

123

chain
string
必填

所选链名字

示例:

"MATIC"

fullCurrType
string
必填

包含链名字的币种字段

示例:

"USDT_MATIC"

currency
string

加密货币币种

示例:

"USDT"

orderAmount
string

加密货币订单金额,最小值0.000001,最高精度为6位

示例:

"118.75"

surchargeAmount
string

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

toleranceAmount
string

容差金额

fiatCurrency
string

法币币种

fiatAmount
string

法币订单金额,最小值0.01,最高精度为2位

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"

响应

200 - application/json

下单成功

status
string

响应状态

示例:

"SUCCESS"

code
string

响应码,000000表示成功

示例:

"000000"

errorMessage
string

错误信息,成功时为空

示例:

""

data
object