Documentation · Query pay-in

Query pay-in

POST /api/v1/pay/query

Field Type Required Description
platform_order_no string Conditional Platform order number. Provide at least one of the two order numbers.
merchant_order_no string Conditional Merchant order number. When both order numbers are provided, they must identify the same session or order.

Request example:

{
  "api_key": "<API_KEY>",
  "merchant_id": "merchant_1001",
  "merchant_order_no": "PAY202609160001",
  "timestamp": "1789516800",
  "nonce": "query-550e8400-e29b-41d4-a716-446655440000",
  "sign": "<64位小写HMAC-SHA256>"
}

Session response example:

{
  "code": 0,
  "message": "OK",
  "data": {
    "checkout_mode": "cashier",
    "platform_order_no": "P202609160001",
    "merchant_order_no": "PAY202609160001",
    "amount": "100.00",
    "currency": "MYR",
    "status": "awaiting_payment_method",
    "expired_at": "2026-09-16T15:30:00Z"
  },
  "request_id": "req_01JEXAMPLE"
}

A formal order returns its order numbers, amount, currency, and status, together with the selected channel_code, fee_amount, and net_amount. fee_amount uses the merchant-rate snapshot locked when the order was created, and net_amount = amount - fee_amount. For example, when amount=10.00 and fee_amount=0.15, net_amount=9.85. The upstream order number channel_order_no and expired_at are returned when applicable. Successful orders include paid_amount and paid_at.

Formal order status Description Terminal
created Created No
pending Awaiting payment result No
paid Payment succeeded Yes
failed Payment failed Yes
expired Expired Yes
closed Closed Yes
manual_review Pending manual confirmation; wait for the final result. No

When the provider explicitly rejects pay-in creation, the formal order becomes failed and the merchant is notified through payin.failed. If submission times out, disconnects, or returns an indeterminate response, the order may remain pending. Query with the original order number and do not create another order on that basis. A cashier submission failure may return 50009 / error.cashier_provider_message, but the failure is stored on the same session, so repeating the action does not call the provider again. Historical pending orders are not rewritten automatically by this rule.

The local status of an existing order remains queryable while its channel is in maintenance. Maintenance does not mean the order failed. Confirm pay-in success only when a query or a successfully verified notification shows paid.

Search docs