Skip to content

Collect API

Create Collect Order

Creates a new collect order.

  • Method: POST
  • Path: /api/v1/mch/pmt-orders
  • The POST body must be JSON

Notes

  • currency currently allows PHP, THB, VND, and USDT, in either case
  • amount is validated in the range 0 ~ 50000000000
  • trans_id must be globally unique
  • If channel starts with usdt, the system forces currency to USDT
  • If merchant-side collect rate limiting is enabled, the API may return 429

Request Parameters

ParameterTypeRequiredDescription
mch_idintegerYesMerchant ID
trans_idstringYesMerchant order ID, must be unique
currencystringYesCurrency code. See System Currency Codes
amountstringYesOrder amount. Send it as a string, for example \"100.00\"
channelstringYesChannel code. See System Channel Codes
callback_urlstringYesCallback URL for collect result. Must be a valid URL
payer_account_nostringNo(Optional, Used by real-name payment)Payer account
payer_account_namestringNo(Optional, Used by real-name payment)Payer name
payer_account_orgstringNo(Optional, Used by real-name payment)Payer institution
modestringNoChannel-specific extension parameter
return_urlstringNoReturn URL after cashier completion
uidstringNoBusiness user ID used by some channels or risk rules
remarksstringNoMerchant note saved with the order
noncestringYesRandom token, length: 6-24
timestampintegerYesUNIX timestamp
signstringYesSee Signature Algorithm

Note

Some extension fields are only used in specific business scenarios. If you are unsure whether they are required, confirm with the platform integration contact first.

Response Fields

On success, the response usually contains the following fields:

FieldTypeDescription
idstringPlatform order ID
trans_idstringMerchant order ID
order_amountstringOrder amount
rationumberMerchant fee ratio
currencystringCurrency
codestringChannel code
statusnumberUsually 20 on creation
created_atstringCreation time
urlstringCashier URL
cashier_typenumberCashier mode
metaobject | nullExtra receiving data, depending on the channel

cashier_type

ValueDescription
0Only url is returned
1Only meta is returned
9Both url and meta are returned

Response Example

json
{
  "code": 200,
  "payload": {
    "id": "C202605040001",
    "trans_id": "ORDER-10001",
    "order_amount": "100.00",
    "ratio": 1.2,
    "currency": "VND",
    "code": "bank",
    "status": 20,
    "created_at": "2026-05-04 10:05:00",
    "url": "https://cashier.example.com/cashier/vn/C202605040001",
    "cashier_type": 9,
    "meta": {
      "account_no": "8531112111",
      "account_name": "CHEN MINH HIEU",
      "account_org": "MSB",
      "account_org_code": "970426",
      "remarks": "PAY12345",
      "qr_url": "data:image/png;base64,..."
    }
  }
}

THB Custom Cashier: Upload Payment Proof

When a THB create-order response includes receiving details and qr_code in meta, you may render your own cashier. After payment, upload and bind the payment proof in this order so the platform can perform ESLIP verification.

Permissions and Restrictions

  • Both endpoints only support THB collect orders that belong to the authenticated merchant.
  • The API key must have the collect.proof.upload (collect proof upload) capability.
  • Both POST requests use a JSON body and must include the common signing parameters.
  • Bind the proof with the returned key; do not construct a storage key yourself.

1. Get a Presigned Upload URL

  • Method: POST
  • Path: /api/v1/mch/pmt-orders/proof-upload-url

Request Parameters

ParameterTypeRequiredDescription
idstringOne ofPlatform order ID
trans_idstringOne ofMerchant order ID
keystringYesProof filename or custom object suffix, maximum 180 characters

Response Fields

FieldTypeDescription
keystringObject key to use when binding the uploaded proof
upload_urlstringPresigned PUT upload URL, valid for 10 minutes
headersobjectHeaders that must be included in the upload request
ref_urlstringProof URL after upload

Response Example

json
{
  "code": 200,
  "payload": {
    "key": "cashier/th/C202605040001/slip.jpg",
    "upload_url": "https://storage.example.com/...",
    "headers": {
      "Content-Type": "image/jpeg"
    },
    "ref_url": "https://cdn.example.com/cashier/th/C202605040001/slip.jpg"
  }
}

Upload the image binary to upload_url with a PUT request, including the returned headers unchanged. Then call the binding endpoint.

2. Bind a Proof to a Collect Order

  • Method: POST
  • Path: /api/v1/mch/pmt-orders/proof

Request Parameters

ParameterTypeRequiredDescription
idstringOne ofPlatform order ID
trans_idstringOne ofMerchant order ID
uploaded_image_keystringYesThe key returned by the previous endpoint

Binding another proof to the same order replaces the previous proof and triggers ESLIP parsing again.

Response Example

json
{
  "code": 200,
  "payload": {
    "id": "C202605040001",
    "trans_id": "ORDER-10001"
  }
}

Query Collect Order

  • Method: GET
  • Path: /api/v1/mch/pmt-orders

Request Parameters

ParameterTypeRequiredDescription
idstringNoPlatform order ID. Use either id or trans_id
trans_idstringNoMerchant order ID. Use either id or trans_id
mch_idintegerYesMerchant ID
noncestringYesRandom token, length: 6-24
timestampintegerYesUNIX timestamp
signstringYesSee Signature Algorithm

Response Fields

FieldTypeDescription
idstringPlatform order ID
trans_idstringMerchant order ID
order_amountstringOrder amount
payed_amountstringActual paid amount
rationumberMerchant fee ratio
currencystringCurrency
channelstringChannel code. Note that the query response uses channel, not code
statusnumberOrder status
created_atstringCreation time
payed_atstring | nullPayment time
callback_atstring | nullCallback completion time
canceled_atstring | nullCancel time

status Values

ValueMeaning
50Canceled
60Completed
otherProcessing

Response Example

json
{
  "code": 200,
  "payload": {
    "id": "C202605040001",
    "trans_id": "ORDER-10001",
    "order_amount": "100.00",
    "payed_amount": "100.00",
    "ratio": 1.2,
    "currency": "VND",
    "channel": "bank",
    "status": 60,
    "created_at": "2026-05-04 10:05:00",
    "payed_at": "2026-05-04 10:06:10",
    "callback_at": "2026-05-04 10:06:12",
    "canceled_at": null
  }
}

The payment result is pushed by callback. See Collect Callback.

Released under the MIT License.