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_deposit

စလစ်ဖြင့်ငွေသွင်းခြင်း

အသုံးပြုသူများအတွက် ငွေဖြည့်: စလစ်စစ်၊ ထိုသူ၏ငွေသွင်းမှတ်တမ်းတင်ပြီး webhook ဖြင့် သင့်ဆိုက်ကိုအကြောင်းကြား

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

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

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

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

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

ChatGPT ↗Claude ↗Gemini ↗Grok ↗

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

🔑 သုံးရမည့် key

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

Authorization: Bearer $TUNGKAO_KEY

📋 အဆင့်များ

  1. ပေါ်တယ်ရှိ key တွင် လက်ခံအကောင့်နှင့် webhook URL သတ်မှတ်ပါ
  2. customer_ref (သင့်အသုံးပြုသူ ID) နှင့်အတူ စလစ်ပို့ပါ
  3. deposit.succeeded webhook ရလျှင် (လက်မှတ်စစ်ပြီး) အသုံးပြုသူကို ငွေထည့်ပါ

📡 API ခေါ်ဆိုမှု + ကုဒ်နမူနာ

POST/v1/deposits/slip
curl -X POST https://api.tungkao.com/v1/deposits/slip \
  -H "Authorization: Bearer $TUNGKAO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"qr_payload":"0041000600000101030040220014…","customer_ref":"member-1001","expected_amount":"300.00"}'
GET/v1/deposits/dep_xxx
curl -X GET https://api.tungkao.com/v1/deposits/dep_xxx \
  -H "Authorization: Bearer $TUNGKAO_KEY"

Webhook လက်မှတ်စစ်ခြင်း

webhook တိုင်းတွင် X-Tungkao-Signature: t=…,v1=… ပါသည်။ ဒေတာကိုမယုံမီ စစ်ပါ (URL သတ်မှတ်ချိန်တွင် webhook secret ပြသည်)

import crypto from "node:crypto";
// use the raw body only — never re-JSON.stringify it
function verify(rawBody, header, secret) {
  const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header || "");
  if (!m || Math.abs(Date.now() / 1000 - Number(m[1])) > 300) return false;
  const want = crypto.createHmac("sha256", secret).update(`${m[1]}.${rawBody}`).digest("hex");
  return crypto.timingSafeEqual(Buffer.from(want), Buffer.from(m[2]));
}

📚 အသုံးပြုပုံ ဥပမာများ

ဥပမာ 1

Credit a member's deposit

အခြေအနေ: Member member-1001 deposits 300 THB and attaches the slip

တောင်းဆိုချက်
POST /v1/deposits/slip
{
  "image_base64": "<base64 of the slip image>",
  "customer_ref": "member-1001",
  "expected_amount": "300.00"
}
နမူနာ တုံ့ပြန်ချက်
{
  "success": true,
  "status": "VALID",
  "data": {
    "deposit_id": "dep_8f2c…",
    "customer_ref": "member-1001",
    "amount": "300.00"
  }
}

➡️ Store deposit_id with the order and credit the member

ဥပမာ 2

Attach your own data to the deposit

အခြေအနေ: You want to know which promotion the deposit came from

တောင်းဆိုချက်
POST /v1/deposits/slip
{
  "image_base64": "<base64 of the slip image>",
  "customer_ref": "member-1001",
  "metadata": {
    "promo": "NEWYEAR",
    "channel": "app"
  }
}

➡️ metadata comes back in the webhook and when you fetch the deposit

ဥပမာ 3

Receive the result by webhook

အခြေအနေ: With a webhook URL on the key, the result is pushed to your site

➡️ Verify the webhook signature before crediting and use deposit_id to avoid double credit

ဥပမာ 4

Check a deposit later

အခြေအနေ: Your site missed the webhook or wants to re-check

တောင်းဆိုချက်
GET /v1/deposits/dep_8f2c…
နမူနာ တုံ့ပြန်ချက်
{
  "success": true,
  "data": {
    "deposit_id": "dep_8f2c…",
    "status": "succeeded"
  }
}

➡️ succeeded = credit · failed = rejected · pending = wait

ဥပမာ 5

Member resubmits the same slip

အခြေအနေ: A member tries to deposit again with the same slip

နမူနာ တုံ့ပြန်ချက်
{
  "success": false,
  "status": "DUPLICATE"
}

➡️ DUPLICATE; no new deposit is created

📜 ဤ API ၏ အပ်ဒိတ်မှတ်တမ်း

  1. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API update announcements by webhook: new api.update event (opt in per key on the key card; off by default)
  2. ထပ်ထည့် ထိုင်းစံတော်ချိန် (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)
  3. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    GET /status: ဝန်ဆောင်မှုအလိုက် API အခြေအနေ (key မလို)
  4. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    key ဖွင့်/ပိတ် ခလုတ်နှင့် ပြောင်းချိန် + ဝက်ဘ်ဆိုက်တစ်ခု ဝန်ဆောင်မှုတစ်ခုလျှင် key ၁ ခု
  5. တိုးတက် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API v1 ကိုအမြဲပိတ် (ထပ်ထည့်ရုံသာ) + X-Tungkao-Api-Version header + ၁၂ လကြိုတင်အသိပေး
  6. စာရွက်စာတမ်း ထိုင်းစံတော်ချိန် (UTC+07:00)
    API တစ်ခုချင်း docs စာမျက်နှာ + AI လင့်ခ် (ဘာသာ ၁၀)
  7. လုံခြုံရေး ထိုင်းစံတော်ချိန် (UTC+07:00)
    API key တစ်ခုချင်း domain အတည်ပြု (key 1 = site 1) — key ဟောင်းများ ဆက်သုံးနိုင်
  8. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    HMAC request လက်မှတ် (ရွေးချယ်) — မဖွင့်လျှင် ဘာမှမပြောင်း
  9. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    API key သက်တမ်း + သတိပေး + သက်တမ်းတိုး — key စာသားမပြောင်း
  10. ထပ်ထည့် ထိုင်းစံတော်ချိန် (UTC+07:00)
    service တိုင်းအတွက် test mode key (ပုံတူ၊ အခမဲ့)
  11. အသစ် ထိုင်းစံတော်ချိန် (UTC+07:00)
    စလစ်ဖြင့်ငွေသွင်း + webhook စတင်

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

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

🚦 စနစ်အခြေအနေ (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