Skip to content

Collection API

Collection Order Placement

Call this API to initiate a payment request. On success, it will return order information.

  • Request Method: POST
  • API Path: http://[API Domain]/api/v1/mch/pmt-orders
  • Request Parameters:
NameTypeRequiredDescription
mch_idnumberMerchant ID, please check in the merchant backend configuration
trans_idstringMerchant transaction ID, provided by the merchant
currencystringCurrency code, see System Currency Codes
amountstringOrder amount, in standard fiat units. RMB keeps two decimals. VND is an integer. Use string, like "100.00"
channelstringChannel code, use mock for integration testing. For other country codes, see System Channel Codes
bank_codestring⭕️Required for specific channels, will be specified during integration
payer_account_nostring⭕️Payer account number (used in real-name scenarios)
payer_account_namestring⭕️Payer account name (used in real-name scenarios)
payer_acccount_orgstring⭕️Payer account bank (used in real-name scenarios)
callback_urlstringThe platform will notify the payment result via HTTP POST after successful payment
modestring⭕️'auto' or 'manual'. Use 'auto' to pay directly or 'manual' to select bank manually. Default is 'auto'
return_urlstring⭕️The platform will jump to this url after successful payment
uidstring⭕️User ID. You can use your system's user ID or its MD5 value. For USDT channel, this is required
remarksstring⭕️Order remarks, will be returned as-is in the callback
noncestringRandom string, at least 6 characters
timestampnumberUNIX timestamp, 10 digits
signstringParameter signature. See Signature Algorithm
  • Response
NameTypeDescription
idstringPlatform unique order ID
mch_idnumberMerchant ID
trans_idstringTransaction ID
order_amountnumberOrder amount
channelstringPayment channel code
statusnumberOrder status, newly created order is 20
urlstringOrder URL (H5 page, can be shown directly to the end user)
cashier_typenumberCashier type, see "cashier_type Description"
metaobject(Vietnam bank channel only) Original receiving account info, see below
meta.account_nostring(Vietnam bank channel only) Receiving account number
meta.account_namestring(Vietnam bank channel only) Receiving account name
meta.account_orgstring(Vietnam bank channel only) Receiving institution name
meta.account_org_codestring(Vietnam bank channel only) Receiving institution code
meta.qr_urlstring(Vietnam bank channel only) Vietnam bank QR code
  • About cashier_type
0: Only cashier page link is returned, see the url field above
1: Only receiving account info is returned, see the meta field above
9: Both url and meta fields are returned. By default, you can use the url to get the cashier page link. If you want to use a custom cashier, you can use the receiving account info in the meta field

Response Example

json
{
  "code": 200,
  "payload": {
    "id": "ET1729187424AJCT",
    "mch_id": "8888",
    "trans_id": "Order number/transaction ID submitted by merchant",
    "channel": "bank",
    "order_amount": 101,
    "status": 20,
    "cashier_type": 9,
    "url": "http://cashier.money.com/cashier/order?id=abcdefg123",
    "meta": {
      "account_no": "898123767665",
      "account_name": "THAN NHA TRONG",
      "account_org": "CIMB",
      "account_org_code": "422589"
    },
    "sign": "e0c0a5a0c5ddeb3f3887e273df49568b"
  }
}

After successful collection, the system will send a notification to the platform. See Collection Callback for details.

Collection Order Query

  • Request Method: GET
  • API Path: http://[API Domain]/api/v1/mch/pmt-orders
  • Request Example: http://[API Domain]/api/v1/mch/pmt-orders?id=[OrderID]&mch_id=[MerchantID]&sign=[Signature]
  • Request Parameters:
NameTypeRequiredDescription
idstringOrder ID or transaction ID. Note: this parameter must be included in the signature
mch_idnumberMerchant ID, please check in the merchant backend configuration
noncestringRandom string, at least 6 characters
timestampnumberUNIX timestamp, 10 digits
signstringParameter signature. See Signature Algorithm
  • Response:
NameTypeDescription
idstringPlatform unique order ID
mch_idnumberMerchant ID
trans_idstringTransaction ID
order_amountnumberOrder amount
payed_amountnumberActual paid amount. If it does not match the order amount, please confirm whether to credit
channelstringPayment channel code
statusnumberStatus, 60 means payment successful, others mean not paid
created_atstringCreation time

Response Example

json
{
  "code": 200,
  "payload": {
    "id": "EOu154sgKfZB",
    "mch_id": "8888",
    "trans_id": "Merchant's transaction ID",
    "amount": 100,
    "channel": "bank",
    "status": 20,
    "url": "http://cashier.money.com/cashier/order?id=abcdefg123",
    "sign": "e0c0a5a0c5ddeb3f3887e273df49568b",
    "created_at": "2020-09-09 12:21:44"
  }
}

Released under the MIT License.