curl --request POST \
--url http://sandbox.mintlify.com/open/v1/plan/save \
--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 '
{
"merchantPlanNo": "plan031004",
"planName": "Plan 01",
"planDesc": "Plan Description 01",
"priceNo": "3"
}
'{
"code": "0",
"message": "",
"data": {
"merchantPlanNo": "plan031004",
"planNo": "63784604430893064"
},
"success": true
}Create subscription plan
curl --request POST \
--url http://sandbox.mintlify.com/open/v1/plan/save \
--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 '
{
"merchantPlanNo": "plan031004",
"planName": "Plan 01",
"planDesc": "Plan Description 01",
"priceNo": "3"
}
'{
"code": "0",
"message": "",
"data": {
"merchantPlanNo": "plan031004",
"planNo": "63784604430893064"
},
"success": true
}Merchant client ID, obtained from GatePay platform application
"4186d0c6-6a35-55a9-8dc6-5312769dbff8"
HMAC-SHA256 signature, used to verify request legitimacy
"672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77"
Timestamp (milliseconds), time difference with server cannot exceed 5 minutes
"1672905655498"
Random number, used to prevent replay attacks
"9578"
Create subscription plan parameters
Merchant subscription plan number, globally unique identifier
"PLAN20231024001"
Subscription plan name, maximum 20 characters
"Premium Monthly Membership"
Subscription plan description, maximum 100 characters
"Unlock all premium platform features and unlimited download permissions"
Associated price number
"PRICE_10023"
Trial days, deduction immediately after authorization by default
7
Total number of deductions, treated as long-term if not filled
12
Subscription end time, millisecond timestamp; treated as long-term if not filled
1735660800000
Authorized amount, the number of tokens users need to authorize
"200.000000"