Skip to content

POST /verify/bank/async ​

Enqueue one bank slip for asynchronous verification. Returns immediately with a jobId; the result is delivered later via webhook callback.

Endpoint ​

http
POST /verify/bank/async

Full URL: https://api.thunder.in.th/v2/verify/bank/async

Authentication ​

Required. See Authentication Guide.

http
Authorization: Bearer YOUR_API_KEY

Request ​

Async verification accepts a QR payload string only — send the payload field as application/json, plus the optional matching parameters and callbackUrl.

Input ​

FieldContent-TypeDescription
payloadapplication/jsonRequired. QR code string data (1-128 chars)

Payload only

The async endpoints accept a QR payload only — image upload, Base64, and URL inputs are not supported here. (The synchronous POST /verify/bank still accepts all input types.) A missing or empty payload returns 400 VALIDATION_ERROR with Payload is required and cannot be empty.

Parameters ​

ParameterTypeDescription
callbackUrlstringhttps only. Where the result webhook is POSTed. If omitted, the branch's default webhook URL is used. If neither is set → 400. Private/internal addresses are rejected → INVALID_CALLBACK_URL
remarkstringCustom remark for tracking (1-255 chars) — echoed back in the webhook data
matchAccountbooleanMatch receiver with registered accounts
matchAmountnumberExpected amount to validate
checkDuplicatebooleanCheck if this branch already verified this slip (branch-scoped; default: false)

Type Definitions ​

typescript
// Request
interface AsyncVerifyBankRequest {
  payload: string;       // Required — QR payload (1-128 chars)

  // Async-specific
  callbackUrl?: string;  // https only; falls back to branch default

  // Optional parameters (same as sync verify)
  remark?: string;       // 1-255 chars
  matchAccount?: boolean;
  matchAmount?: number;
  checkDuplicate?: boolean;
}

// Response (202 Accepted)
interface AsyncEnqueueResponse {
  success: true;
  data: {
    jobId: string;       // UUID — use with GET /verify/bank/jobs/:jobId
  };
}

Examples ​

bash
curl -X POST https://api.thunder.in.th/v2/verify/bank/async \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payload": "00000000000000000000000000000000000000",
    "callbackUrl": "https://your-app.example.com/webhooks/thunder"
  }'
bash
# callbackUrl omitted — uses the branch's configured default webhook URL
curl -X POST https://api.thunder.in.th/v2/verify/bank/async \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"payload": "00000000000000000000000000000000000000"}'

Response ​

Accepted (202) ​

The slip has been enqueued, not yet verified. The result arrives later via webhook.

json
{
  "success": true,
  "data": {
    "jobId": "3f2b1c8a-9d4e-4f10-b7a2-6c5d4e3f2a1b"
  }
}

Save the jobId — you can poll it if you miss the webhook.

Error Responses ​

Validation Error (400) ​

json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Payload is required and cannot be empty"
  }
}

Invalid Callback URL (400) ​

json
{
  "success": false,
  "error": {
    "code": "INVALID_CALLBACK_URL",
    "message": "callbackUrl must use the https protocol"
  }
}

The same INVALID_CALLBACK_URL code is returned with the message callbackUrl points to an invalid or restricted IP address when the URL resolves to a private/internal IP.

If no callbackUrl is provided and your branch has no default webhook URL configured, the request fails with 400 VALIDATION_ERROR and the message callbackUrl is required.

Notes ​

  • A 202 means the slip is queued — it does not mean the slip is valid. Verification success/failure is reported in the webhook.
  • Quota is consumed only on a successful verification, the same as sync verify.
  • To submit many slips at once, use POST /verify/bank/batch.
  • See the webhook callback page for the result payload and signature verification.

Bank Slip Verification API for Thai Banking