Skip to content

Check KHQR Status

Query current transaction status by md5 hash (returned from generate endpoints).

Endpoint: POST /khqr/check

Request

json
{ "md5": "810c0e272a72c637441bdd6f730050f7" }

cURL

bash
curl --location 'http://localhost:3000/khqr/check' \
--header 'x-auth-type: api-key' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{"md5":"810c0e272a72c637441bdd6f730050f7"}'

Success Response (Example)

json
{
  "transactionId": "09bfab07-d770-44a4-bd75-2264922b2517",
  "status": "SUCCESS",
  "data": {
    "qr": "00020101021229...",
    "md5": "810c0e272a72c637441bdd6f730050f7"
  },
  "requestData": {
    "meta": { "hello": "world" },
    "amount": 1,
    "currency": 840,
    "expiredAfter": 300000
  },
  "expiredAt": "2025-08-09T13:10:59.286Z"
}

Status Values

PENDING | SUCCESS | FAILED | EXPIRED

Notes

  • Poll sparingly (e.g. every 3–5s) until terminal state or webhook arrives.
  • Prefer webhooks for scale; fallback to this endpoint for recovery/UI refresh.
  • expiredAt helps decide when to stop polling.

Last updated: August 10, 2025