curl --request POST \
--url http://sandbox.mintlify.com/open/v1/order/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 '
{
"merchantSubscriptionOrderNo": "test01",
"planNo": "2033844612305932300"
}
'{
"code": "0",
"message": "",
"data": {
"merchantSubscriptionOrderNo": "test01",
"subscriptionOrderNo": "82971423789155022",
"subscriptionLink": "https://119.28.35.132:13555/zh/web3-subscribe?subscriptionOrderNo=82971423789155022"
},
"success": true
}创建订阅单
curl --request POST \
--url http://sandbox.mintlify.com/open/v1/order/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 '
{
"merchantSubscriptionOrderNo": "test01",
"planNo": "2033844612305932300"
}
'{
"code": "0",
"message": "",
"data": {
"merchantSubscriptionOrderNo": "test01",
"subscriptionOrderNo": "82971423789155022",
"subscriptionLink": "https://119.28.35.132:13555/zh/web3-subscribe?subscriptionOrderNo=82971423789155022"
},
"success": true
}商户客户端ID,在 GatePay 平台申请获得
"4186d0c6-6a35-55a9-8dc6-5312769dbff8"
HMAC-SHA256签名,用于验证请求合法性
"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"
时间戳(毫秒),与服务器时间差不能超过5分钟
"1672905655498"
随机数,用于防止重放攻击
"9578"
创建订阅单入参
商户订阅订单编号,商户全局唯一标识
"MSUB_20240312_001"
商户订阅计划编号(与planNo任选一个)
"MPLAN_20240101_001"
平台订阅计划编号(与merchantPlanNo任选一个)
"PLAN_ABC123"
订阅成功后跳转的页面URL,长度不超过128字节
128"https://www.example.com/subscription/success"