API Reference & Playground
คู่มือการใช้งาน และพื้นที่ทดสอบ API ตรวจสอบสลิปแบบ Live พร้อม API Key ของคุณ
รับ API Key ได้จาก Dashboard → Generate New Key
API Reference
Endpoint
POST
/api/check-slipRequired Headers
Content-Type: application/json x-api-key: ak_your_api_key_here
x-api-key: จำเป็น — ใส่ API Key ที่สร้างจาก Dashboard
รูปแบบการส่งข้อมูล (รองรับ 3 วิธี)
1. Multipart Form-Data (แนะนำสำหรับอัปโหลดไฟล์)
ส่งไฟล์รูปภาพสลิปมาตรงๆ ผ่าน Form Data โดยใช้คีย์ชื่อ file
Content-Type: multipart/form-data <Form Data> file: [ไฟล์รูปภาพ .jpg, .png]
2. JSON Body (ส่ง Payload หรือ Base64)
หากระบบของคุณถอดรหัส QR Code ได้เองอยู่แล้ว ให้ส่งเป็น payload (ทำงานไวที่สุด เพราะข้ามขั้นตอนถอดรหัสภาพ) หรือถ้าเป็นระบบเก่าก็ยังส่งรูป image เป็น Base64 ได้
Content-Type: application/json
// แบบที่ 2.1: ส่ง Payload ของ QR Code ตรง (เร็วที่สุด!)
{
"payload": "00020101021138540016A000000677..."
}
// แบบที่ 2.2: ส่งรูปภาพ Base64
{
"image": "<base64 string หรือ data:image/png;base64,...>"
}3. Raw File Upload (Binary)
แนบไฟล์รูปภาพใส่ใน Body ของ Request แบบตรงๆ ไม่มี Key ใดๆ
Content-Type: image/jpeg (หรือ image/png) <Binary Data ก้อนข้อมูลไฟล์รูปภาพ>
Response 200 OK
{
"success": true,
"transaction": {
"ref": "016164192839CPM04442",
"date": "2026-06-13T19:28:39.000+07:00",
"amount": 25,
"currency": "THB"
},
"sender": {
"name": "Mr. Phudit C",
"account": "xxx---x-x63-00-x",
"bank": {
"icon": "https://business.krungthai.com/ktb/rest/biznext-channel/static/img/bank/kasikorn-logo.png"
}
},
"receiver": {
"name": "บริษัท ซันดิว (ประเทศไทย) จำกัด",
"billerId": "010553912932501",
"icon": "https://business.krungthai.com/ktb/rest/biznext-channel/static/img/payments/biller-categories/cat12v202012100951.png"
},
"references": {
"ref1": "1781353697COL13",
"ref2": "AUK0004M1775564938P",
"ref3": null
}
}Error 401 / 400
{ "error": "Missing x-api-key header" }
{ "error": "Invalid API Key" }
{ "error": "ไม่พบ QR Code ในสลิปนี้" }Live Playground
ใส่ API Key ด้านบนแล้วลากรูปสลิปมาวาง — ระบบจะยิง API จริงและแสดงผลทันที
กรุณาใส่ API Key ก่อนทดสอบ
ลากรูปสลิปมาวางที่นี่
หรือคลิกเพื่อเลือกไฟล์ · JPEG, PNG ไม่เกิน 10MB