Deposits
Get a Deposit
GET /v1/deposits/:id — retrieve / poll a deposit; pay_to is present only while PENDING; caller- and mode-scoped
GET /v1/deposits/:id
Use this to fetch a deposit back (e.g. when the payment page refreshes, or to resolve a DEPOSIT_ALREADY_ACTIVE). It is scoped to your own deposits and the same mode only — a cross-merchant / cross-mode id returns 404. This call is HMAC-signed and bodyless.
Behavior
- If the deposit is still
PENDING: the response has the same shape as creation — it includespay_to+qr_payload(re-derived) so you can re-display the payment instructions. - If the deposit is terminal (
CREDITED/EXPIRED/CANCELLED): it returnsstatus+ amounts (e.g.matched_amountwhen credited) but nopay_to/QR anymore (it cannot be paid).
The status is one of PENDING, CREDITED, EXPIRED, or CANCELLED.
Example request
cURL
curl 'https://api.unkpay.co/v1/deposits/8f2b1c4e-7a90-4d2f-9b3a-1c2d3e4f5a6b' \
-H 'X-Api-Key: unk_live_xxxxxxxxxxxx' \
-H 'X-Timestamp: 1718790100' \
-H 'X-Signature: <hex hmac-sha256 over "GET\n/v1/deposits/8f2b1c4e...\n1718790100\nsha256(empty)">'
For a bodyless/GET request the body hash in the canonical string is the empty-body SHA-256 constant
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. See Authentication.Example response
Example response when CREDITED:
{
"id": "8f2b1c4e-7a90-4d2f-9b3a-1c2d3e4f5a6b",
"amount": "500.00",
"expected_amount": "500.37",
"matched_amount": "500.37",
"currency": "THB",
"status": "CREDITED",
"payment_method_type": "PROMPTPAY_QR",
"payer": { "bank": "KBANK", "account_no": "9876543210", "name": "Somchai Jaidee" },
"display_expires_at": "2026-06-19T10:05:00Z",
"match_window_until": "2026-06-19T10:07:00Z"
}
Error codes
| HTTP | code | Cause |
|---|---|---|
| 404 | NOT_FOUND | id not found / not yours / cross-mode. |
Polling this endpoint is for re-displaying instructions and quick UI refreshes. The authoritative terminal result still arrives via the
deposit.success / deposit.expired webhook — see Webhooks.