Use the appId corresponding to TWD. After successful user payment, the TWD balance will be increased.
curl --request POST \
--url https://uat-interface.haipay.asia/twd/collect/apply \
--header 'Content-Type: application/json' \
--data '
{
"appId": 123,
"orderId": "<string>",
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"amount": "<string>",
"payType": "<string>",
"inBankCode": "<string>",
"callBackUrl": "<string>",
"callBackFailUrl": "<string>",
"subject": "<string>",
"partnerUserId": "<string>",
"sign": "<string>",
"notifyUrl": "<string>",
"body": "<string>",
"country": "<string>",
"currency": "USD"
}
'{
"status": "<string>",
"error": "<string>",
"msg": "<string>",
"data": {
"orderId": "<string>",
"orderNo": "<string>",
"payUrl": "<string>",
"sign": "<string>"
}
}Business ID (obtained from the backend, needs to pass the corresponding business ID according to the currency in the URL)
Merchant order number
48User’s full name. Recommended to use real name. Format: firstName and lastName separated by a space. Example: Donald John Trump
Real phone number
Real email
Transaction amount. For TWD orders, decimals are not allowed
Transaction type
Redirect URL after successful payment
Redirect URL after failed payment
Payment note
Unique user identifier (e.g., userId). Used for risk control. Must be valid, otherwise it will affect the transaction. Allowed format: numbers, uppercase/lowercase letters, or common symbols -~!@#$%&*()_.
^[A-Za-z0-9\-~!@#$%&*()_]+$Signature
Callback URL
Additional details
Required for cashier mode, fixed value: 158
Currency (default TWD; supported currencies: USD, TWD)
USD, TWD curl --request POST \
--url https://uat-interface.haipay.asia/twd/collect/apply \
--header 'Content-Type: application/json' \
--data '
{
"appId": 123,
"orderId": "<string>",
"name": "<string>",
"phone": "<string>",
"email": "jsmith@example.com",
"amount": "<string>",
"payType": "<string>",
"inBankCode": "<string>",
"callBackUrl": "<string>",
"callBackFailUrl": "<string>",
"subject": "<string>",
"partnerUserId": "<string>",
"sign": "<string>",
"notifyUrl": "<string>",
"body": "<string>",
"country": "<string>",
"currency": "USD"
}
'{
"status": "<string>",
"error": "<string>",
"msg": "<string>",
"data": {
"orderId": "<string>",
"orderNo": "<string>",
"payUrl": "<string>",
"sign": "<string>"
}
}