TUNGKAO ເອກະສານ API
🧾
API · slip_verify

ກວດສລິບທະນາຄານ

ກວດວ່າສລິບແທ້ ຍອດກົງ ໂອນເຂົ້າບັນຊີທ່ານ ແລະ ຍັງບໍ່ເຄີຍໃຊ້ — ເໝາະກັບຮ້ານທີ່ລູກຄ້າແນບສລິບ

🕒 ອັບເດດລ່າສຸດ: ເວລາປະເທດໄທ (UTC+07:00) · ✅ ໂຄດເດີມໃຊ້ໄດ້ ບໍ່ຕ້ອງແກ້

🤖 ໃຫ້ AI ຂຽນໂຄດເຊື່ອມຕໍ່ໃຫ້

ສຳເນົາລິ້ງນີ້ໃຫ້ AI ອ່ານ ຫຼື ກົດປຸ່ມ ລະບົບຈະສຳເນົາຄຳສັ່ງ ແລະ ເປີດ AI ໃຫ້

https://app.tungkao.com/docs/api/slip_verify.md?lang=lo
https://api.tungkao.com/changelog/slip_verify.json

ລິ້ງນີ້ສົ່ງລາຍການອັບເດດຂອງ API ນີ້ເປັນ JSON (ບໍ່ຕ້ອງໃຊ້ key ເປີດໄດ້ທຸກໂດເມນ) ໃຫ້ໜ້າຫຼັງບ້ານສະແດງເປັນກ່ອງ “ປະກາດອັບເດດ” ແລະ ຂຶ້ນ “ໃໝ່” ເມື່ອ last_updated ປ່ຽນ

ChatGPT ↗Claude ↗Gemini ↗Grok ↗

ສຳເນົາ + ເປີດໃນ: ກົດປຸ່ມ AI ລະບົບຈະສຳເນົາຄຳສັ່ງໃຫ້ ຖ້າຊ່ອງແຊັດວ່າງ ໃຫ້ວາງໄດ້ເລີຍ

🔑 key ທີ່ໃຊ້

ສ້າງ key ບໍລິການ slip_verify ທີ່ໜ້າຮ້ານ (ເມນູ API key) ແລ້ວສົ່ງທຸກຄຳຂໍດ້ວຍ header ດ້ານລຸ່ມ — key ບໍລິການອື່ນໃຊ້ກັບ API ນີ້ບໍ່ໄດ້

Authorization: Bearer $TUNGKAO_KEY

📋 ຂັ້ນຕອນ

  1. ລູກຄ້າອັບໂຫຼດສລິບ ເວັບທ່ານອ່ານ QR (ຂຶ້ນຕົ້ນ 0041…)
  2. ສົ່ງ qr_payload ຍອດທີ່ຕ້ອງໄດ້ ແລະ ບັນຊີຮັບຂອງທ່ານມາທີ່ API
  3. ຮັບອໍເດີສະເພາະເມື່ອ status = VALID

📡 ການເອີ້ນ API + ຕົວຢ່າງໂຄດ

POST/v1/slip/verify
curl -X POST https://api.tungkao.com/v1/slip/verify \
  -H "Authorization: Bearer $TUNGKAO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"qr_payload":"0041000600000101030040220014…","expected_amount":"500.00","receivers":[{"bank":"KBANK","account_number":"1234567890"}]}'

📖 ສະຫຼຸບ: ໃຊ້ key ກັບຫຼາຍເວັບ ຜົນເປັນແນວໃດ

ກໍລະນີຕັ້ງຄ່າ key (ໜ້າ API Keys)ຜົນ
2 ເວັບ (aaa.com, bbb.com) ຮັບເງິນເຂົ້າບັນຊີດຽວກັນທັງສອງ key: ກຸ່ມ A (ຫຼື ທັງບັນຊີ)ສະລິບທີ່ຜ່ານທີ່ aaa.com ແລ້ວ ສົ່ງໄປ bbb.com ຈະໄດ້ DUPLICATE — ໃຊ້ໄດ້ເວັບດຽວ ✅
2 ເວັບໃຊ້ບັນຊີດຽວກັນ ແຕ່ key ແຍກກັນ (ຄ່າເລີ່ມຕົ້ນ)ທັງສອງ key: ແຍກສະເພາະ keyສະລິບດຽວຜ່ານທັງສອງເວັບ ⚠️ ລູກຄ້າອາດເຕີມໄດ້ 2 ເທື່ອ — ໃຫ້ເຊື່ອມ key
2 ເວັບ ບັນຊີຮັບເງິນຕ່າງກັນແຍກສະເພາະ key (ຄ່າເລີ່ມຕົ້ນ)ສະລິບຂອງເວັບໜຶ່ງ ສົ່ງໄປອີກເວັບຈະໄດ້ RECEIVER_MISMATCH ຢູ່ແລ້ວ ✅
2 ເວັບຢູ່ຄົນລະບັນຊີ tungkao (ເຈົ້າຂອງຕ່າງກັນ) ແຕ່ບັນຊີຮັບເງິນດຽວກັນເຊື່ອມ key ຂ້າມບັນຊີ tungkao ບໍ່ໄດ້ສະລິບດຽວຜ່ານທັງສອງ ⚠️ — ຊື້ key ທັງສອງຈາກບັນຊີ tungkao ດຽວ ແລ້ວເຊື່ອມກັນ
ເວັບດຽວໃຊ້ 2 key (ເຊັ່ນ ເວັບ + ແອັບ)ທັງສອງ key: ກຸ່ມດຽວກັນສະລິບໃຊ້ໄດ້ເທື່ອດຽວ ບໍ່ວ່າຈະສົ່ງຈາກເວັບ ຫຼື ແອັບ ✅

DUPLICATE ກວດຈາກເລກອ້າງອີງໃນ QR ໄດ້ທັນທີ · ຕັ້ງຄ່າທີ່ກາດ “ກັນສະລິບຊ້ຳລະຫວ່າງ key” ໃນໜ້າ API Keys (key ໃໝ່ຄ່າເລີ່ມຕົ້ນ: ແຍກສະເພາະ key)

📚 ຕົວຢ່າງການໃຊ້ງານ

ຕົວຢ່າງທີ 1

Customer tops up with a matching slip (passes)

ສະຖານະການ: A customer transfers 500 THB to your account and uploads the slip on your top-up page

ສົ່ງຄຳຂໍ
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00"
}
ຕົວຢ່າງຜົນຕອບກັບ
{
  "success": true,
  "status": "VALID",
  "data": {
    "trans_ref": "2025111612345678",
    "amount": "500.00",
    "currency": "THB"
  },
  "billing": {
    "credits_charged": 250
  }
}

➡️ VALID → credit the customer now; the slip is marked as used

ຕົວຢ່າງທີ 2

Send the QR text instead of the image (faster)

ສະຖານະການ: Your app reads the QR on the slip itself and sends only the QR text

ສົ່ງຄຳຂໍ
POST /v1/slip/verify
{
  "qr_payload": "0041000600000101030040220014242082547BPM04988…",
  "expected_amount": "500.00"
}

➡️ Same result as sending the image, smaller and faster. If you have the image, send it: some backup providers verify from the image

ຕົວຢ່າງທີ 3

The customer sends the same slip again

ສະຖານະການ: The customer attaches the same 500 THB slip again to top up twice

ສົ່ງຄຳຂໍ
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00"
}
ຕົວຢ່າງຜົນຕອບກັບ
{
  "success": false,
  "status": "DUPLICATE",
  "message": "This slip has already been used"
}

➡️ DUPLICATE → do not credit; tell the customer the slip was already used

ຕົວຢ່າງທີ 4

Wrong amount or wrong account

ສະຖານະການ: The customer paid 300 THB for a 500 THB order, or paid another account

ສົ່ງຄຳຂໍ
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00",
  "receivers": [
    {
      "bank": "KBANK",
      "account_number": "123-4-56789-0"
    }
  ]
}
ຕົວຢ່າງຜົນຕອບກັບ
{
  "success": false,
  "status": "AMOUNT_MISMATCH"
}

➡️ AMOUNT_MISMATCH = wrong amount · RECEIVER_MISMATCH = other account. The slip is not marked as used, so the customer can retry with the right one

ຕົວຢ່າງທີ 5

Slip is too old

ສະຖານະການ: You only accept slips paid within the last 30 minutes

ສົ່ງຄຳຂໍ
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00",
  "max_age_minutes": 30
}
ຕົວຢ່າງຜົນຕອບກັບ
{
  "success": false,
  "status": "DATE_MISMATCH"
}

➡️ DATE_MISMATCH when the slip is older than allowed

ຕົວຢ່າງທີ 6

Two sites, one receiving account

ສະຖານະການ: aaa.com and bbb.com use different keys but receive into the same account

➡️ Put both keys in one group on the “Duplicate-slip protection between keys” card → a slip that passed on aaa.com returns DUPLICATE on bbb.com

ຕົວຢ່າງທີ 7

Every verifier is down

ສະຖານະການ: All upstream verifiers fail at once (rare; backups are tried first)

ຕົວຢ່າງຜົນຕອບກັບ
{
  "success": false,
  "status": "SERVICE_UNAVAILABLE"
}

➡️ HTTP 503 and nothing is charged. Ask the customer to retry later, or queue it for manual review

💡 ເພີ່ມເຕີມ

📜 ປະຫວັດການອັບເດດຂອງ API ນີ້

  1. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    Duplicate-slip protection between keys is now configurable: this key only / group A–E / whole account — for several sites that receive into the same account
  2. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    API update announcements by webhook: new api.update event (opt in per key on the key card; off by default)
  3. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    error.user_message: ready-to-show text for end users on outages, no credits or key problems (white-label keys omit tungkao.com)
  4. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    GET /status: ສະຖານະ API ແຍກທຸກບໍລິການ (ບໍ່ຕ້ອງໃຊ້ key)
  5. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    ສະວິດເປີດ/ປິດ key ພ້ອມເວລາປ່ຽນສະຖານະ + 1 ເວັບ 1 key ຕໍ່ບໍລິການ
  6. ປັບປຸງ ເວລາປະເທດໄທ (UTC+07:00)
    ລັອກ API v1 ຖາວອນ (ເພີ່ມໄດ້ຢ່າງດຽວ) + header X-Tungkao-Api-Version + ແຈ້ງເລີກໃຊ້ລ່ວງໜ້າ 12 ເດືອນ
  7. ເອກະສານ ເວລາປະເທດໄທ (UTC+07:00)
    ໜ້າເອກະສານແຍກທຸກ API ພ້ອມລິ້ງໃຫ້ AI ຄົບ 10 ພາສາ
  8. ຄວາມປອດໄພ ເວລາປະເທດໄທ (UTC+07:00)
    ຢືນຢັນໂດເມນຕໍ່ API key (1 key = 1 ເວັບ) — key ເດີມໃຊ້ໄດ້ຄືເກົ່າ
  9. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    ເຊັນຄຳຂໍ (HMAC) ເປັນທາງເລືອກ — ບໍ່ເປີດກໍໃຊ້ໄດ້ຄືເກົ່າ
  10. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    ກຳນົດອາຍຸ API key + ແຈ້ງເຕືອນ + ຕໍ່ອາຍຸ key ເດີມໃຊ້ຕໍ່ໄດ້
  11. ເພີ່ມ ເວລາປະເທດໄທ (UTC+07:00)
    key ໂໝດ test (ຈຳລອງ ຟຣີ) ທຸກບໍລິການ
  12. ເປີດໃໝ່ ເວລາປະເທດໄທ (UTC+07:00)
    ເປີດ API v1 ກວດສລິບ (ສະຫຼັບຜູ້ໃຫ້ບໍລິການສຳຮອງ 3 ຄ່າຍອັດຕະໂນມັດ)

✅ ໂຄດເດີມໃຊ້ໄດ້ ບໍ່ຕ້ອງແກ້

🛡️ ສັນຍາຄວາມໝັ້ນຄົງ: ຂຽນເທື່ອດຽວ ໃຊ້ໄດ້ຕະຫຼອດ

🚦 ສະຖານະລະບົບ (GET /status)

ກວດໄດ້ຕະຫຼອດວ່າ API ປົກກະຕິບໍ່ ບໍ່ຕ້ອງໃຊ້ key

GET https://api.tungkao.com/status

curl https://api.tungkao.com/status
{
  "success": true,
  "data": {
    "status": "ok",
    "services": [
      { "id": "slip_verify", "status": "ok", "routes": ["ok", "ok", "busy"] },
      { "id": "slip_deposit", "status": "ok", "routes": ["ok", "ok", "busy"] },
      { "id": "login", "status": "ok" },
      { "id": "telegram", "status": "ok" },
      { "id": "discord", "status": "ok" },
      { "id": "email", "status": "busy" },
      { "id": "crypto", "status": "ok" },
      { "id": "core", "status": "ok" }
    ],
    "paused": [],
    "updated_at": "2026-11-14T12:00:00.000Z"
  }
}

🏷️ ເງື່ອນໄຂການໃສ່ເຄຣດິດ TUNGKAO

Powered by TUNGKAO