curl --request POST \
--url https://openplatform.gateapi.io/v1/pay/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": "22212345678555",
"env": {
"terminalType": "APP"
},
"currency": "GT",
"orderAmount": "1.21",
"goods": {
"goodsType": "312221",
"goodsName": "NF2T",
"goodsDetail": "123444"
}
}
'{
"code": "SUCCESS",
"message": "订单创建成功",
"data": {
"orderId": "GATE202400001",
"merchantTradeNo": "22212345678555",
"paymentUrl": "https://pay.gateapi.io/paypage?order=GATE202400001",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"orderAmount": "1.21",
"currency": "GT",
"expireTime": 1672909255498,
"orderStatus": "CREATED",
"createTime": 1672905655498
}
}在 GatePay 支付平台创建一个新的支付订单。成功创建后,系统会返回支付相关信息,可用于跳转到支付页面或生成支付二维码。
curl --request POST \
--url https://openplatform.gateapi.io/v1/pay/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": "22212345678555",
"env": {
"terminalType": "APP"
},
"currency": "GT",
"orderAmount": "1.21",
"goods": {
"goodsType": "312221",
"goodsName": "NF2T",
"goodsDetail": "123444"
}
}
'{
"code": "SUCCESS",
"message": "订单创建成功",
"data": {
"orderId": "GATE202400001",
"merchantTradeNo": "22212345678555",
"paymentUrl": "https://pay.gateapi.io/paypage?order=GATE202400001",
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"orderAmount": "1.21",
"currency": "GT",
"expireTime": 1672909255498,
"orderStatus": "CREATED",
"createTime": 1672905655498
}
}Documentation Index
Fetch the complete documentation index at: https://docs.gate.com/llms.txt
Use this file to discover all available pages before exploring further.
/v1/pay/order 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。
商户客户端ID,在 GatePay 平台申请获得
"4186d0c6-6a35-55a9-8dc6-5312769dbff8"
HMAC-SHA256签名,用于验证请求合法性
"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"
时间戳(毫秒),与服务器时间差不能超过5分钟
"1672905655498"
随机数,用于防止重放攻击
"9578"
支付订单创建参数
商户订单号,必须唯一
5 - 32"22212345678555"
Show child attributes
订单币种。请参考上方“支持的网络币种”确认当前可用范围。
"GT"
订单金额,必须为正数,支持小数
^\d+(\.\d{1,2})?$"1.21"
Show child attributes
订单过期时间,UTC时间戳,millisecond。不设置时默认为1小时,最大过期时间为1小时
1770789143000
订单支付成功后返回跳转地址,最长256字符。仅在独立页面支付完成后会跳转到该Url
512"http://47.99.158.63:8205/payment/redirect"
订单支付取消后返回跳转地址
512"http://47.99.158.63:8205/payment/redirect"
客户渠道名称
32"123456"