POST /verify/bank/batch
Enqueue many bank slips in a single request (up to 100). Returns a batchId and one jobId per slip. Each slip produces its own webhook callback.
Endpoint
http
POST /verify/bank/batchFull URL: https://api.thunder.in.th/v2/verify/bank/batch
Authentication
Required. See Authentication Guide.
http
Authorization: Bearer YOUR_API_KEYRequest
Send a JSON body with an optional callbackUrl and a slips array. Each entry in slips is a QR payload only — a { "payload": "...", ... } object with the optional matching parameters (same rule as POST /verify/bank/async).
| Field | Type | Description |
|---|---|---|
slips | array | Required. 1-100 payload objects. Each is validated individually |
callbackUrl | string | https only. Applies to every slip's webhook. If omitted, the branch's default webhook URL is used |
Batch limits & validation
- Each slip is a QR
payloadonly — image, Base64, and URL inputs are not supported. (The synchronousPOST /verify/bankstill accepts all input types.) - Maximum 100 slips per batch — more returns
400VALIDATION_ERROR. - Each slip is validated individually. If any slip has a missing/empty payload, the whole batch is rejected with
400and nothing is enqueued.
Type Definitions
typescript
// Request
interface AsyncVerifyBankBatchRequest {
callbackUrl?: string; // https only; falls back to branch default; applies to all slips
slips: AsyncBatchSlip[]; // 1-100 items
}
interface AsyncBatchSlip {
payload: string; // Required — QR payload (1-128 chars)
// Optional parameters (same as sync verify)
remark?: string; // 1-255 chars
matchAccount?: boolean;
matchAmount?: number;
checkDuplicate?: boolean;
}
// Response (202 Accepted)
interface AsyncBatchResponse {
success: true;
data: {
batchId: string; // UUID for the batch
jobs: {
jobId: string; // UUID per slip
index: number; // position in the submitted `slips` array (0-based)
}[];
};
}Example
bash
curl -X POST https://api.thunder.in.th/v2/verify/bank/batch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"callbackUrl": "https://your-app.example.com/webhooks/thunder",
"slips": [
{ "payload": "00000000000000000000000000000000000000", "remark": "Order #1001" },
{ "payload": "11111111111111111111111111111111111111", "remark": "Order #1002" },
{ "payload": "22222222222222222222222222222222222222", "remark": "Order #1003" }
]
}'Response
Accepted (202)
Every slip has been enqueued. Each jobId maps back to a slip by its index in your submitted array. Results arrive as one webhook per slip.
json
{
"success": true,
"data": {
"batchId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"jobs": [
{ "jobId": "3f2b1c8a-9d4e-4f10-b7a2-6c5d4e3f2a1b", "index": 0 },
{ "jobId": "7c6d5e4f-3a2b-4c1d-9e8f-0a1b2c3d4e5f", "index": 1 },
{ "jobId": "b9a8c7d6-5e4f-4a3b-2c1d-9e8f7a6b5c4d", "index": 2 }
]
}
}Error Responses
Validation Error (400)
Returned when the batch is empty, exceeds 100 slips, or any slip is invalid. Nothing is enqueued.
json
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "slips: array must contain between 1 and 100 items"
}
}Invalid Callback URL (400)
json
{
"success": false,
"error": {
"code": "INVALID_CALLBACK_URL",
"message": "callbackUrl must use the https protocol"
}
}Notes
- One batch = N webhooks (one per slip), not one combined callback. Correlate them with the
jobId(andbatchId) in the webhook body. - Quota is consumed per successful slip verification; failed or duplicate slips don't consume quota.
- Because the whole batch is rejected if any slip is invalid, validate your inputs client-side before submitting large batches.
- Poll any individual slip with
GET /verify/bank/jobs/:jobId.
