TUNGKAO API ドキュメント
ボタンを押して送信先で「PDF に保存」を選んでください

TUNGKAO API

銀行振込明細のチェック

API v1 · 最終更新: タイ時間(UTC+07:00)

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

利用規約により、サービスを使うページに https://tungkao.com へのリンク付きで “Powered by TUNGKAO”(ログイン/決済は “Secured by TUNGKAO”)を表示する必要があります

🧾
API · slip_verify

銀行振込明細のチェック

明細が本物か、金額が合っているか、自分宛てか、未使用かを確認 — お客様が明細を添付するお店向け。

🕒 最終更新: タイ時間(UTC+07:00) · ✅ 既存のコードはそのまま動作

🤖 AI に連携コードを書かせる

このリンクを AI に渡すか(API 全体の Markdown)、ボタンを押すとプロンプトがコピーされ AI が開きます

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

このリンクはこの API の更新を JSON で返します(key 不要・どのドメインからも可)。管理画面に「更新のお知らせ」として表示し、last_updated が変わったら「新着」を付けてください

ChatGPT ↗Claude ↗Gemini ↗Grok ↗

コピーして開く: AI ボタンでプロンプトが自動コピーされます。入力欄が空なら貼り付けてください

🔑 使うキー

加盟店ポータル(API key)で slip_verify キーを作成し、すべてのリクエストにこの header を送ります — 他サービスのキーはここでは使えません

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 — 1 サイトでのみ有効 ✅
2 サイトで同じ口座だが key は別々(初期設定)両方の key:この key のみ1 枚の明細が両サイトで通る ⚠️ 2 回チャージされる恐れ — key を連携してください
2 サイトで受取口座が異なるこの key のみ(初期設定)一方のサイトの明細はもう一方で RECEIVER_MISMATCH になる ✅
2 サイトが別の tungkao アカウント(別の所有者)だが受取口座は同じtungkao アカウントをまたいで key を連携することはできません1 枚の明細が両方で通る ⚠️ — 同じ tungkao アカウントで 2 つの key を買って連携してください
1 サイトで 2 つの key を使う(例:Web サイト + アプリ)両方の key:同じグループWeb サイトからでもアプリからでも明細は 1 回だけ使えます ✅

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 ステータス(キー不要)
  5. 追加 タイ時間(UTC+07:00)
    キーのオン/オフと状態変更時刻 + 1 サイトにつきサービスごとに 1 キー
  6. 改善 タイ時間(UTC+07:00)
    API v1 を恒久固定(追加のみ)+ X-Tungkao-Api-Version header + 12 か月前の廃止予告
  7. ドキュメント タイ時間(UTC+07:00)
    API ごとのドキュメントと AI リンク(10 言語)
  8. セキュリティ タイ時間(UTC+07:00)
    API キーごとのドメイン認証(1 キー = 1 サイト)— 既存キーはそのまま動作
  9. 追加 タイ時間(UTC+07:00)
    任意の HMAC リクエスト署名 — オンにしなければ変化なし
  10. 追加 タイ時間(UTC+07:00)
    API キーの期限・期限前通知・更新 — キー文字列は変わらない
  11. 追加 タイ時間(UTC+07:00)
    全サービスに test モードキー(模擬・無料)
  12. 新規 タイ時間(UTC+07:00)
    API v1 明細チェックを開始(3 社の自動切替)

✅ 既存のコードはそのまま動作

🛡️ 安定性の約束:一度つなげばずっと動く

🚦 システム状況(GET /status)

API が正常かいつでも確認できます(キー不要)

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