GET /verify/bank/jobs/:jobId
Poll the status and result of an async verification job. Use this as a fallback if you miss the webhook callback, or to reconcile results.
Endpoint
http
GET /verify/bank/jobs/:jobIdFull URL: https://api.thunder.in.th/v2/verify/bank/jobs/{jobId}
Authentication
Required. See Authentication Guide.
http
Authorization: Bearer YOUR_API_KEYOwner-only
A job can only be read by the branch that created it. Requesting a job that belongs to another branch returns 404 JOB_NOT_FOUND (indistinguishable from a job that doesn't exist).
Path Parameters
| Parameter | Type | Description |
|---|---|---|
jobId | string | The jobId returned from /async or /batch |
Job Status
| Status | Meaning |
|---|---|
queued | Accepted, waiting to be processed |
processing | Being verified right now |
retrying | Slip data not ready yet (e.g. Bangkok Bank pending) — re-attempting over a few minutes |
done | Finished — result is populated |
failed | Finished without a successful verification (e.g. slip not found after retries) — see error |
Type Definitions
typescript
interface JobRecord {
jobId: string;
batchId?: string; // present if the job was part of a batch
status: 'queued' | 'processing' | 'retrying' | 'done' | 'failed';
result?: VerifyBankData; // present when status is 'done' — same shape as sync verify `data`
error?: { // present when status is 'failed'
code: string;
message: string;
};
attempts: number; // how many times the job has been attempted
createdAt: string; // ISO 8601
updatedAt: string; // ISO 8601
}
interface JobResponse {
success: true;
data: JobRecord;
}The result object is the same shape as the synchronous POST /verify/bank success data (rawSlip, matchedAccount, isDuplicate, amountInSlip, isAmountMatched, remark, …).
Example
bash
curl https://api.thunder.in.th/v2/verify/bank/jobs/3f2b1c8a-9d4e-4f10-b7a2-6c5d4e3f2a1b \
-H "Authorization: Bearer YOUR_API_KEY"Response
Still processing (200)
json
{
"success": true,
"data": {
"jobId": "3f2b1c8a-9d4e-4f10-b7a2-6c5d4e3f2a1b",
"batchId": null,
"status": "retrying",
"attempts": 2,
"createdAt": "2024-01-15T14:30:00+07:00",
"updatedAt": "2024-01-15T14:31:10+07:00"
}
}Done (200)
json
{
"success": true,
"data": {
"jobId": "3f2b1c8a-9d4e-4f10-b7a2-6c5d4e3f2a1b",
"batchId": null,
"status": "done",
"result": {
"remark": "Order #1001",
"isDuplicate": false,
"amountInSlip": 1500.00,
"isAmountMatched": true,
"rawSlip": {
"payload": "00000000000000000000000000000000000000",
"transRef": "68370160657749I376388B35",
"date": "2024-01-15T14:30:00+07:00",
"countryCode": "TH",
"amount": {
"amount": 1500.00,
"local": { "amount": 1500.00, "currency": "THB" }
},
"fee": 0,
"ref1": "",
"ref2": "",
"ref3": "",
"sender": {
"bank": { "id": "004", "name": "กสิกรไทย", "short": "KBANK" },
"account": {
"name": { "th": "นาย ผู้โอน ทดสอบ", "en": "MR. SENDER TEST" },
"bank": { "type": "BANKAC", "account": "123-4-xxxxx-5" }
}
},
"receiver": {
"bank": { "id": "014", "name": "ไทยพาณิชย์", "short": "SCB" },
"account": {
"name": { "th": "บริษัท ตัวอย่าง จำกัด" },
"bank": { "type": "BANKAC", "account": "xxx-x-x5678-x" }
},
"merchantId": null
}
}
},
"attempts": 3,
"createdAt": "2024-01-15T14:30:00+07:00",
"updatedAt": "2024-01-15T14:32:05+07:00"
}
}Failed (200)
json
{
"success": true,
"data": {
"jobId": "3f2b1c8a-9d4e-4f10-b7a2-6c5d4e3f2a1b",
"batchId": null,
"status": "failed",
"error": {
"code": "SLIP_NOT_FOUND",
"message": "The slip could not be found or is invalid"
},
"attempts": 5,
"createdAt": "2024-01-15T14:30:00+07:00",
"updatedAt": "2024-01-15T14:35:00+07:00"
}
}Error Responses
Job Not Found (404)
Returned for an unknown or expired job, or a job that belongs to another branch.
json
{
"success": false,
"error": {
"code": "JOB_NOT_FOUND",
"message": "Job 3f2b1c8a-9d4e-4f10-b7a2-6c5d4e3f2a1b not found"
}
}Notes
- Jobs are retained for ~7 days, then expire (
404afterwards). - Prefer the webhook for results; use polling only as a fallback or to reconcile.
- The HTTP response here is always
200while the job exists — the job's own outcome is in thestatus/result/errorfields, not the HTTP status.
