Skip to content
UnknownPay
ไทย
Reference

Status Values & Glossary

Consolidated deposit and withdrawal status enums, Portal role labels, and the key constants (replay window, idempotency TTL, empty-body SHA-256) in one place

A single reference for the status enums, Portal roles, and the constants that the rest of the docs depend on.

Deposit status

StatusTerminalMeaning
PENDINGCreated, waiting for the customer to transfer expected_amount. pay_to is present only in this state.
CREDITEDExact expected_amount matched and credited (matched_amount populated). Fires deposit.success.
EXPIREDNo matching amount before match_window_until. Fires deposit.expired.
CANCELLEDCancelled by you via POST /v1/deposits/:id/cancel while still PENDING.

Withdrawal status

StatusTerminalMeaning
PENDINGCreated; gross (amount + fee) debited immediately, awaiting manual approval.
APPROVEDApproved by the team, queued for processing.
PROCESSINGBeing processed.
IN_PROGRESSIn progress at the bank/settlement layer.
SUCCESSPayout completed. Fires withdrawal.success.
FAILEDFailed mid-processing. Fires withdrawal.failed; gross is refunded (withdrawal.refunded).
REJECTEDManually rejected while PENDING/APPROVED. Fires withdrawal.rejected; gross is refunded (withdrawal.refunded).
Never treat the initial 201 PENDING as success — wait for a terminal webhook (withdrawal.success, withdrawal.failed, or withdrawal.rejected).

Portal roles

RoleCan do
owner / adminIssue/rotate API secrets, configure webhooks — full configuration.
operatorOperational actions, but cannot issue/rotate secrets or configure webhooks.
viewerRead-only.
Pending confirmation — confirm the exact Portal role labels and which buttons each role sees

Key constants

ConstantValueUsed for
Replay window±300 secondsX-Timestamp must be within this window of server time.
Idempotency-Key TTL24 hoursHow long a key (scoped per mode + merchant) is remembered for replay.
Empty-body SHA-256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855The body hash on line 4 of the canonical string for any bodyless/GET request.
Money formatbaht string, 2 decimals (e.g. "100.50")Every money field on the wire — never a number, never satang. THB only.