跳到主要内容

Pay a quote

POST 

/api/quotes/:id/pay

Creates the order (waybill and delivery) from the quote, marks the quote accepted, then starts the payment. Creating the order is idempotent: calling Pay again reuses it, so a failed payment can be retried with another method. The order stays when the payment step fails.

qr and app pay through FlashPay, which settles in THB: the gateway amount is converted, the payment itself stays in the quote's currency. bank_transfer returns a receiving account and a reference code. wallet pays from the sender's prepaid balance and dispatches the order at once.

An ownerless quote must be opened with Get a quote first; Pay does not claim it.

Signature only; a user session is not accepted. The sender account is named in X-Sender-Account-Id, which is outside the signature: it must belong to the organization of the API key. Missing header: 401 unauthenticated. Malformed, unknown or another organization's account: 403 forbidden (the same answer for all three).

Request​

Responses​

Payment started (or, for wallet, completed).