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
}
}Create a new payment order on GatePay. The response returns payment information that can be used to redirect the user to the payment page or render a payment QR code.
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 endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.
Merchant client ID obtained from the GatePay platform
"4186d0c6-6a35-55a9-8dc6-5312769dbff8"
HMAC-SHA256 signature used to verify request validity
"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"
Timestamp in milliseconds. The difference from server time must not exceed 5 minutes.
"1672905655498"
Nonce used to prevent replay attacks
"9578"
Payment order creation parameters
Merchant order number. Must be unique.
5 - 32"22212345678555"
Show child attributes
Order currency. Refer to the "Supported Networks and Currencies" section above for the currently supported options.
"GT"
Order amount. Must be a positive number and supports decimals.
^\d+(\.\d{1,2})?$"1.21"
Show child attributes
Order expiration time as a UTC timestamp in milliseconds. Defaults to 1 hour if omitted, and the maximum expiration time is 1 hour.
1770789143000
Return URL after the order is paid successfully. Maximum length is 256 characters. Redirection occurs only after payment is completed on the hosted payment page.
512"http://47.99.158.63:8205/payment/redirect"
Return URL after the order payment is cancelled.
512"http://47.99.158.63:8205/payment/redirect"
Customer channel name
32"123456"