Skip to main content
POST
/
php
/
collect
/
apply
PHP Collection Application
curl --request POST \
  --url https://uat-interface.haipay.asia/php/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>",
  "partnerUserId": "<string>",
  "sign": "<string>",
  "notifyUrl": "<string>",
  "subject": "<string>",
  "body": "<string>"
}
'
{
  "status": "<string>",
  "error": "<string>",
  "msg": "<string>",
  "data": {
    "orderId": "<string>",
    "orderNo": "<string>",
    "payUrl": "<string>",
    "bankNo": "<string>",
    "bankCode": "<string>",
    "qrCode": "<string>",
    "sign": "<string>"
  }
}

Secret Key & Private Key (Generate Signature)

Body

application/json
appId
integer
required

Business ID (obtain from backend, must match the business ID according to the currency in the URL).

orderId
string
required

Merchant order number.

Maximum string length: 48
name
string
required

Payee name (format: upper/lowercase letters with spaces allowed, 1-30 chars, "firstName middleName lastName" (middleName optional, special characters supported: ! -)).

Required string length: 1 - 30
Pattern: ^[A-Za-z\s!-]+$
phone
string
required

Real phone number (Format: starts with 09, digits only, 11 digits total).

Pattern: ^09\d{9}$
email
string<email>
required

Real email address.

amount
string
required

Transaction amount (unit: ₱, accurate to 2 decimals; do not include punctuation such as “,”).

Pattern: ^(?:[5-9]\d|[1-9]\d{2,3}|[1-4]\d{4}|49999)(?:\.\d{2})?$
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.

partnerUserId
string
required

Unique user identifier (e.g., userId), required for risk control. Must be valid. Format: digits, letters, or common symbols -~!@#$%&*()_.

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

Signature.

notifyUrl
string<uri>

Callback URL.

subject
string

Payment remark (transaction title, product name, payment reason).

body
string

Detailed remark.

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