Create subscription order
curl --request POST \
--url https://uat-interface.haipay.asia/subscription/apply \
--header 'Content-Type: application/json' \
--data '
{
"country": "USA",
"referer": "https://test.com",
"amount": "0.5",
"callBackUrl": "https://www.google.com",
"inBankCode": "CREDIT_CARD",
"subject": "Test subscription",
"subscriptionOrderId": "1736739758574",
"recurringIntervalCount": 1,
"sign": "JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==",
"partnerUserId": "H20241231",
"payType": "SUBSCRIPTION",
"phone": "0845632145871",
"appId": 1724,
"name": "howard",
"notifyUrl": "https://www.google.com",
"currency": "USD",
"email": "howard@gmail.com",
"recurringInterval": "D"
}
'{
"status": "1",
"error": "00000000",
"msg": "",
"data": {
"subscriptionNo": "4025011311423010028",
"subscriptionOrderId": "1736739758574",
"appId": 1724,
"subject": "Test subscription",
"payType": "SUBSCRIPTION",
"inBankCode": "CREDIT_CARD",
"amount": 0.5,
"recurringInterval": "D",
"recurringIntervalCount": 1,
"status": "2",
"sign": "QrOo7yPJMTRk92bP9WU8P0ATdRvCm8dWElhbxqV6qmZEWZDRXeJAwUvd3839zErg+3tN/U4Rwyru219AkXg9CJZtocna3fiYj7uLxwD6bpAp+i9DGz5ZKV9ab5mwIEPWIQXKuY6wATzmlz6W4TvAkRqgGtqLkwYUaeqsmgJrh4WlIMK13GW/zvoCmYfFD6pNZUByVixpll8JPeZG7F9d+x7yjDigJZ2S1wm4F307OzZJkUSKSvQn6Q0lOvp1JS0feXSC+hwCfrdllFXIE10TDV0itoPY5G7+3QdmHpINWp3kWmepR/1pOsN+09hLxe8xKAIZrX2GFHY00xo3QnxBIw=="
}
}Business ID (obtained from the backend, must pass the corresponding business ID according to the currency in the URL)
Merchant order ID (must be unique, max length 48)
48Transaction amount (accurate to two decimals; punctuation such as “,” is not allowed)
^\d+\.\d{2}$User name, recommended to use real name. Format: includes firstName and lastName, separated by space. Example: Donald John Trump
Real phone number
Real email
Subscription title
CREDIT_CARD, GOOGLE_PAY, APPLE_PAY
CREDIT_CARD, GOOGLE_PAY, APPLE_PAY SUBSCRIPTION
SUBSCRIPTION Redirect URL after successful payment
Asynchronous notification URL
Country
Currency, currently supported: USD
USD User unique identifier (e.g., userId). Used for risk control. Must be real and valid, otherwise it will affect the transaction. Format: digits, letters, or common symbols -~!@#$%&*()_.
^[A-Za-z0-9\-~!@#$%&*()_]+$Recurring cycle type D(day),W(week),M(month),Y(year)
D, W, M, Y Recurring cycle interval
x >= 1Maximum number of cycles. Regardless of cycle type, maximum duration cannot exceed 3 years. Subscription will be automatically canceled at expiration.
x >= 1Transaction website
Retry attempts for failed periodic deductions, default 3
x >= 0Signature
Remark details
If provided, the user can click “Back” on the payment page to return to this URL.
Discount Period (Currently only the first period discount and the full period discount are supported, i.e., couponPeriod can only be equal to 1 or recurringMaxNumber)
Discount amount per period
^\d+\.\d{2}$curl --request POST \
--url https://uat-interface.haipay.asia/subscription/apply \
--header 'Content-Type: application/json' \
--data '
{
"country": "USA",
"referer": "https://test.com",
"amount": "0.5",
"callBackUrl": "https://www.google.com",
"inBankCode": "CREDIT_CARD",
"subject": "Test subscription",
"subscriptionOrderId": "1736739758574",
"recurringIntervalCount": 1,
"sign": "JeJR4N40eKncoohebUN31aNqPqpBxR799rmMutqrSmMaBn0Sjmqbskl4Wiitmatvvx6tqvuwkOYtk6ryrYj7YqJxDeNfDqthWzOxv2ixkKY0YDoWEAra9sWc4CnXBBssP0VIKg0jSTMNzdvmvuNBa7sLEQj5YjgswUnCGtYCmsz154JHSSRpdeYDLL+Nt5b96pzQn8WyRr6b/9SSCrLCWSdt22gJmY5sQh7cc9OcJfAGb5E1XflTq5Va78cV+fw9hHhaZmFzKncg4wxrdaatxg9tCElMJpL1OuWO7XLfcfqgA/8Y/qRCWmNf11Ji3ZSrr7rU4+V7Egrfu1Fcr5DTlw==",
"partnerUserId": "H20241231",
"payType": "SUBSCRIPTION",
"phone": "0845632145871",
"appId": 1724,
"name": "howard",
"notifyUrl": "https://www.google.com",
"currency": "USD",
"email": "howard@gmail.com",
"recurringInterval": "D"
}
'{
"status": "1",
"error": "00000000",
"msg": "",
"data": {
"subscriptionNo": "4025011311423010028",
"subscriptionOrderId": "1736739758574",
"appId": 1724,
"subject": "Test subscription",
"payType": "SUBSCRIPTION",
"inBankCode": "CREDIT_CARD",
"amount": 0.5,
"recurringInterval": "D",
"recurringIntervalCount": 1,
"status": "2",
"sign": "QrOo7yPJMTRk92bP9WU8P0ATdRvCm8dWElhbxqV6qmZEWZDRXeJAwUvd3839zErg+3tN/U4Rwyru219AkXg9CJZtocna3fiYj7uLxwD6bpAp+i9DGz5ZKV9ab5mwIEPWIQXKuY6wATzmlz6W4TvAkRqgGtqLkwYUaeqsmgJrh4WlIMK13GW/zvoCmYfFD6pNZUByVixpll8JPeZG7F9d+x7yjDigJZ2S1wm4F307OzZJkUSKSvQn6Q0lOvp1JS0feXSC+hwCfrdllFXIE10TDV0itoPY5G7+3QdmHpINWp3kWmepR/1pOsN+09hLxe8xKAIZrX2GFHY00xo3QnxBIw=="
}
}