TUNGKAO API စာရွက်စာတမ်း
ခလုတ်နှိပ်ပြီး “Save as PDF” ကိုရွေးပါ

TUNGKAO API

ဘဏ်စလစ်စစ်ဆေးခြင်း

API v1 · နောက်ဆုံးအပ်ဒိတ်: ထိုင်းစံတော်ချိန် (UTC+07:00)

https://tungkao.com · https://api.tungkao.com/docs

ဝန်ဆောင်မှုသုံးသော စာမျက်နှာတွင် https://tungkao.com သို့ လင့်ခ်ပါသော “Powered by TUNGKAO” ကို ပြရမည်

🧾
API · slip_verify

ဘဏ်စလစ်စစ်ဆေးခြင်း

စလစ်အစစ်ဖြစ်မဖြစ်၊ ပမာဏကိုက်မကိုက်၊ သင့်ထံလွှဲမလွှဲ၊ မသုံးရသေးကြောင်း စစ်သည် — ဖောက်သည်များ စလစ်တွဲပို့သောဆိုင်များအတွက်

🕒 နောက်ဆုံးအပ်ဒိတ်: ထိုင်းစံတော်ချိန် (UTC+07:00) · ✅ ကုဒ်ဟောင်း ဆက်သုံးနိုင်

🤖 AI ဖြင့် ချိတ်ဆက်ကုဒ်ရေးခိုင်းရန်

ဤလင့်ခ်ကို AI ဖတ်ရန် ကူးပါ သို့မဟုတ် ခလုတ်နှိပ်ပါ — prompt ကူးပြီး AI ဖွင့်ပေးမည်

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

ဤလင့်ခ်သည် ဤ API ၏ အပ်ဒိတ်များကို JSON ဖြင့် ပြန်ပေးသည် (key မလို၊ မည်သည့် domain မှမဆို)။ admin စာမျက်နှာတွင် “အပ်ဒိတ်ကြေညာချက်” ဘောက်စ်အဖြစ်ပြပြီး last_updated ပြောင်းလျှင် “အသစ်” ပြပါ

ChatGPT ↗Claude ↗Gemini ↗Grok ↗

ကူး + ဖွင့်ရန်: AI ခလုတ်နှိပ်လျှင် prompt ကို အလိုအလျောက်ကူးပေးသည်၊ chat အကွက်လွတ်နေလျှင် paste လုပ်ပါ

🔑 သုံးရမည့် key

ကုန်သည်ပေါ်တယ် (API key) တွင် slip_verify key ဖန်တီး၍ request တိုင်းတွင် ဤ header ပို့ပါ — အခြား service ၏ key များ ဤနေရာတွင် အလုပ်မလုပ်

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 စာမျက်နှာ)ရလဒ်
ဆိုက် ၂ ခု (aaa.com, bbb.com) သည် အကောင့်တစ်ခုတည်းသို့ ငွေလက်ခံသည်key နှစ်ခုလုံး: Group A (သို့မဟုတ် အကောင့်တစ်ခုလုံး)aaa.com တွင် အောင်ပြီးသော စလစ်ကို bbb.com သို့ ပို့လျှင် DUPLICATE — ဆိုက်တစ်ခုတွင်သာ သုံးနိုင် ✅
ဆိုက် ၂ ခု အကောင့်တူ သို့သော် key ခွဲထား (မူလ)key နှစ်ခုလုံး: ဤ key သာစလစ်တစ်ခု ဆိုက်နှစ်ခုလုံးတွင် အောင် ⚠️ ဖောက်သည် နှစ်ကြိမ်ဖြည့်နိုင် — key များကို ချိတ်ပါ
ဆိုက် ၂ ခု ငွေလက်ခံအကောင့် မတူဤ key သာ (မူလ)ဆိုက်တစ်ခု၏ စလစ်ကို အခြားဆိုက်တွင် ပို့လျှင် RECEIVER_MISMATCH ရပြီးသား ✅
ဆိုက် ၂ ခု tungkao အကောင့် မတူ (ပိုင်ရှင်မတူ) သို့သော် ငွေလက်ခံအကောင့် တူtungkao အကောင့်ကြား key ချိတ်၍ မရစလစ်တစ်ခု နှစ်ခုလုံးတွင် အောင် ⚠️ — key နှစ်ခုကို tungkao အကောင့်တစ်ခုတည်းမှ ဝယ်ပြီး ချိတ်ပါ
ဆိုက်တစ်ခု key ၂ ခုသုံး (ဥပမာ ဝဘ်ဆိုက် + အက်ပ်)key နှစ်ခုလုံး: group တူဝဘ်ဆိုက် သို့မဟုတ် အက်ပ်မှ ပို့ပို့ စလစ်ကို တစ်ကြိမ်သာ သုံးနိုင် ✅

DUPLICATE ကို QR ရှိ ရည်ညွှန်းနံပါတ်ဖြင့် ချက်ချင်းစစ်သည်။ API Keys စာမျက်နှာရှိ “key များကြား စလစ်ထပ်သုံးမှု ကာကွယ်ခြင်း” ကတ်တွင် သတ်မှတ်ပါ (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 ဖွင့်/ပိတ် ခလုတ်နှင့် ပြောင်းချိန် + ဝက်ဘ်ဆိုက်တစ်ခု ဝန်ဆောင်မှုတစ်ခုလျှင် key ၁ ခု
  6. တိုးတက် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API v1 ကိုအမြဲပိတ် (ထပ်ထည့်ရုံသာ) + X-Tungkao-Api-Version header + ၁၂ လကြိုတင်အသိပေး
  7. စာရွက်စာတမ်း ထိုင်းစံတော်ချိန် (UTC+07:00)
    API တစ်ခုချင်း docs စာမျက်နှာ + AI လင့်ခ် (ဘာသာ ၁၀)
  8. လုံခြုံရေး ထိုင်းစံတော်ချိန် (UTC+07:00)
    API key တစ်ခုချင်း domain အတည်ပြု (key 1 = site 1) — key ဟောင်းများ ဆက်သုံးနိုင်
  9. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    HMAC request လက်မှတ် (ရွေးချယ်) — မဖွင့်လျှင် ဘာမှမပြောင်း
  10. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API key သက်တမ်း + သတိပေး + သက်တမ်းတိုး — key စာသားမပြောင်း
  11. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    service တိုင်းအတွက် test mode key (ပုံတူ၊ အခမဲ့)
  12. အသစ် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API v1 စလစ်စစ် စတင် (provider ၃ ခု အလိုအလျောက်ပြောင်း)

✅ ကုဒ်ဟောင်း ဆက်သုံးနိုင်

🛡️ တည်ငြိမ်မှုကတိ: တစ်ကြိမ်ချိတ် အမြဲသုံး

🚦 စနစ်အခြေအနေ (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 credit ပြသရန် စည်းကမ်း

Powered by TUNGKAO