TUNGKAO API docs
🧾
API · slip_verify

Bank slip verification

Checks a slip is genuine, the amount matches, it was paid to you and hasn't been used — for shops where customers attach a slip.

🕒 Last updated: Thailand time (UTC+07:00) · ✅ Your existing code keeps working

🤖 Let an AI write the integration

Copy this link for an AI to read (the whole API as Markdown), or press a button: the prompt is copied and the AI opens — paste it and tell it your language/framework

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

This link returns this API's updates as JSON (no key, any origin). Have your admin page show it as an “Update announcements” box and flag “New” when last_updated changes

Copy + open in: pressing an AI button copies the prompt automatically — if the chat box is empty, just paste

🔑 Key to use

Create a slip_verify key in the merchant portal (API keys) and send this header with every request — keys of other services won't work here

Authorization: Bearer $TUNGKAO_KEY

📋 How it works

  1. Customer uploads the slip; your site reads its QR text (starts with 0041…).
  2. Send qr_payload, the expected amount and your receiving account to the API.
  3. Accept the order only when status is VALID.

📡 API calls + code examples

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"}]}'

📖 Summary: using keys on several sites

CaseKey setting (API Keys page)Result
2 sites (aaa.com, bbb.com) receive into the same accountBoth keys: Group A (or Whole account)A slip that passed on aaa.com returns DUPLICATE on bbb.com — usable on one site only ✅
2 sites share an account but the keys stay separate (default)Both keys: This key onlyOne slip passes on both sites ⚠️ customers could top up twice — link the keys
2 sites with different receiving accountsThis key only (default)A slip for one site already returns RECEIVER_MISMATCH on the other ✅
2 sites on different tungkao accounts (different owners) but the same receiving accountKeys can't be linked across tungkao accountsOne slip passes on both ⚠️ — buy both keys from one tungkao account and link them
One site using 2 keys (e.g. website + app)Both keys: the same groupA slip is usable once whether sent from the website or the app ✅

DUPLICATE is detected from the reference in the QR right away. Set it on the “Duplicate-slip protection between keys” card on the API Keys page (new keys default: this key only).

📚 Usage examples

Example 1

Customer tops up with a matching slip (passes)

Situation: A customer transfers 500 THB to your account and uploads the slip on your top-up page

Request
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00"
}
Sample response
{
  "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

Example 2

Send the QR text instead of the image (faster)

Situation: Your app reads the QR on the slip itself and sends only the QR text

Request
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

Example 3

The customer sends the same slip again

Situation: The customer attaches the same 500 THB slip again to top up twice

Request
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00"
}
Sample response
{
  "success": false,
  "status": "DUPLICATE",
  "message": "This slip has already been used"
}

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

Example 4

Wrong amount or wrong account

Situation: The customer paid 300 THB for a 500 THB order, or paid another account

Request
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00",
  "receivers": [
    {
      "bank": "KBANK",
      "account_number": "123-4-56789-0"
    }
  ]
}
Sample response
{
  "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

Example 5

Slip is too old

Situation: You only accept slips paid within the last 30 minutes

Request
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00",
  "max_age_minutes": 30
}
Sample response
{
  "success": false,
  "status": "DATE_MISMATCH"
}

➡️ DATE_MISMATCH when the slip is older than allowed

Example 6

Two sites, one receiving account

Situation: 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

Example 7

Every verifier is down

Situation: All upstream verifiers fail at once (rare; backups are tried first)

Sample response
{
  "success": false,
  "status": "SERVICE_UNAVAILABLE"
}

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

💡 More

📜 Update history of this API

  1. Added Thailand time (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. Added Thailand time (UTC+07:00)
    API update announcements by webhook: new api.update event (opt in per key on the key card; off by default)
  3. Added Thailand time (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. Added Thailand time (UTC+07:00)
    GET /status: per-service API status 🟢 normal / 🟠 high traffic / 🔴 minor delays (no key needed)
  5. Added Thailand time (UTC+07:00)
    Key on/off switch with status-change time + one key per service per website
  6. Improved Thailand time (UTC+07:00)
    API v1 frozen (additive only) + X-Tungkao-Api-Version header + 12-month deprecation notices
  7. Docs Thailand time (UTC+07:00)
    Per-API docs pages with AI links (ChatGPT / Claude / Gemini / Grok) in 10 languages
  8. Security Thailand time (UTC+07:00)
    Domain verification per API key (1 key = 1 site) — existing keys keep working
  9. Added Thailand time (UTC+07:00)
    Optional HMAC request signing — nothing changes unless you turn it on
  10. Added Thailand time (UTC+07:00)
    API key lifetimes, expiry warnings and renewal — the key string never changes
  11. Added Thailand time (UTC+07:00)
    Test-mode keys (simulated, free) for every service
  12. New Thailand time (UTC+07:00)
    Launched API v1 slip verification (automatic failover across 3 providers)

✅ Your existing code keeps working

🛡️ Stability promise: integrate once, keep working

🚦 System status (GET /status)

Check any time whether the API is healthy — no key needed

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 attribution requirement

Powered by TUNGKAO