跳转到主要内容
POST
/
v1
/
pay
/
address
/
create
创建订单
curl --request POST \
  --url https://api.example.com/v1/pay/address/create \
  --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": "93840202212210025",
  "currency": "BTC",
  "orderAmount": "2.1",
  "env": {
    "terminalType": "MINIAPP"
  },
  "goods": {
    "goodsName": "USDT_PAY_BTC_TEST",
    "goodsDetail": "yc"
  },
  "orderExpireTime": 1673410179000,
  "returnUrl": "www.test1.com",
  "cancelUrl": "www.test2.com",
  "merchantUserId": 1336974,
  "chain": "BSC",
  "fullCurrType": "BTC_BSC",
  "channelId": "123456"
}
'
{
  "status": "SUCCESS",
  "code": "000000",
  "errorMessage": "",
  "data": {
    "prepayId": "47656656276819968",
    "terminalType": "MINIAPP",
    "expireTime": 1673410179000,
    "chain": {
      "chain_type": "BSC",
      "fullCurrType": "USDT_BSC",
      "address": "0x1699dB45Dc502A0395038265fCBC4Fa05d6afFBD"
    }
  }
}
API描述:创建订单,订单币种和支付币种一致创建直付地址支付单,订单币种和支付币种不一致创建闪兑地址支付单

请求头

X-GatePay-Certificate-ClientId
string
必填

商户客户端ID

示例:

"4186d0c6-6a35-55a9-8dc6-5312769dbff8"

X-GatePay-Signature
string
必填

签名

示例:

"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8"

X-GatePay-Timestamp
string
必填

时间戳(毫秒)

示例:

"1672905655498"

X-GatePay-Nonce
string
必填

随机数

示例:

"9578"

请求体

application/json
merchantTradeNo
string

商户系统中的交易号

currency
string

订单币种

orderAmount
string

订单金额

surchargeAmount
string

附加费用

toleranceAmount
string

容差金额

fiatCurrency
string

法币币种,大写形式,如EUR、GBP、USD、CNY、JPY、AUD、CAD、CHF

fiatAmount
string

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

payCurrency
string

用户选择的支付币种,非闪兑单不需要传)

env
object
goods
object
orderExpireTime
integer

订单过期时间(毫秒)

returnUrl
string

支付成功回调地址

cancelUrl
string

取消支付回调地址

merchantUserId
integer

商户用户ID

chain
string

链名称

fullCurrType
string

带链币种

channelId
string

客户名称

响应

200 - application/json

成功响应

prepayId
string

预支付订单ID

terminalType
string

终端类型

expireTime
integer

过期时间

chain
object