Skip to main content
POST
/
twd
/
collect
/
apply
TWD Collection Application
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>"
  }
}

Secret Key & Private Key (Generate Signature)

Body

application/json
appId
integer
required

Business ID (obtained from the backend, needs to pass the corresponding business ID according to the currency in the URL)

orderId
string
required

Merchant order number

Maximum string length: 48
name
string
required

User’s full name. Recommended to use real name. Format: firstName and lastName separated by a space. Example: Donald John Trump

phone
string
required

Real phone number

email
string<email>
required

Real email

amount
string
required

Transaction amount. For TWD orders, decimals are not allowed

payType
string
required

Transaction type

inBankCode
string
required
callBackUrl
string<uri>
required

Redirect URL after successful payment

callBackFailUrl
string<uri>
required

Redirect URL after failed payment

subject
string
required

Payment note

partnerUserId
string
required

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 -~!@#$%&*()_.

Pattern: ^[A-Za-z0-9\-~!@#$%&*()_]+$
sign
string
required

Signature

notifyUrl
string<uri>

Callback URL

body
string

Additional details

country
string

Required for cashier mode, fixed value: 158

currency
enum<string>

Currency (default TWD; supported currencies: USD, TWD)

Available options:
USD,
TWD

Response

200 - application/json
status
string

1: Normal, 0: Exception

error
string

Error code

msg
string

Error description

data
object
Last modified on April 10, 2026