⬇️ PDF をダウンロード ボタンを押して送信先で「PDF に保存」を選んでください
TUNGKAO API Complete API reference
API v1 · 最終更新: 2026年11月21日 16:30 タイ時間(UTC+07:00)
https://tungkao.com · https://api.tungkao.com/docs
利用規約により、サービスを使うページに https://tungkao.com へのリンク付きで “Powered by TUNGKAO”(ログイン/決済は “Secured by TUNGKAO”)を表示する必要があります
TUNGKAO と連携する すべてのサービスで同じ API スタイル — Base URL: https://api.tungkao.com
🕒 チャネル別の最新 API 更新 プラットフォーム全体の最終更新: 2026年11月21日 16:30 タイ時間(UTC+07:00) — 📘 The TrueMoney Wallet docs page is now fully translated into all 10 languages (steps, examples, case table, notes)
✅ 既存のコードはそのまま動作 · /changelog.json (機械可読)
📋 Copy all updates for your AI Paste it into the AI that maintains your site's code (ChatGPT / Claude / Gemini); it checks and changes only what is needed
🧾 銀行振込明細のチェック 2026年11月17日 10:30 タイ時間(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 TrueMoney Wallet 送金明細チェック 2026年11月21日 16:30 タイ時間(UTC+07:00) 📘 The TrueMoney Wallet docs page is now fully translated into all 10 languages (steps, examples, case table, notes) 🏦 明細入金 2026年11月12日 00:19 タイ時間(UTC+07:00) 明細入金と webhook を開始 ₿ 暗号資産決済 2026年11月12日 22:33 タイ時間(UTC+07:00) Ethereum・Polygon・Arbitrum・Base・Optimism・Avalanche と USDC を追加 Telegram 通知 2026年11月15日 10:45 タイ時間(UTC+07:00) Telegram / Discord notifications: step-by-step setup guide on the key card and in the docs (Telegram connect link, add a Discord channel webhook) Discord 通知 2026年11月15日 10:45 タイ時間(UTC+07:00) Telegram / Discord notifications: step-by-step setup guide on the key card and in the docs (Telegram connect link, add a Discord channel webhook) 📧 メール送信 + OTP + SMTP 2026年11月14日 09:12 タイ時間(UTC+07:00) メールサービス開始:API + SMTP + メール OTP Google でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. LINE でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Facebook でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. TikTok でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Discord でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Telegram でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. X (Twitter) でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Microsoft でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group GitHub でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group Apple でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group Steam でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group Twitch でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. LinkedIn でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Kakao でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. NAVER でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Zalo でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Spotify でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Reddit でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. GitLab でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group Roblox でログイン 2026年11月20日 19:30 タイ時間(UTC+07:00) 🖼️ Show your own logo on the sign-in page, per key (50×50, auto-cropped and resized). Billed monthly: buy 1–11 months or 1 / 2 / 3 years. Hiding the credit now offers the same periods. Epic Games でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group Yahoo でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group Slack でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group Amazon でログイン 2026年11月17日 11:00 タイ時間(UTC+07:00) Sign-in: choose whether user IDs are combined or separate between keys (whole account / group A–E / separate). New keys default to combined; keys that already have sign-ins stay in their group
すべてのサービスは同じ使い方です:加盟店ポータルで API キーを作成し(1 サービスに 1 キー)、すべてのリクエストの Authorization header に送ります。
手順 app.tungkao.com に Gmail でログインし、クレジットをチャージします(1 バーツ = 100 クレジット)。 API key → サービスカードを選択 → キーの期間を選択 → 作成 → キーをコピー(表示は一度だけ)。 キーはサーバーに保管します(環境変数 TUNGKAO_KEY)。Web ページやモバイルアプリには絶対に入れないでください。 まず test キー(tk_test_…)で試すとクレジットは消費されません。その後 live に切り替えます。
GET /v1/account — キーのテスト:残りクレジット
curl Node.js PHP Python
コピー
curl -X GET https://api.tungkao.com/v1/account \
-H "Authorization: Bearer $TUNGKAO_KEY"// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/account", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}` },
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/account");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY")],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.get(
"https://api.tungkao.com/v1/account",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
timeout=30,
)
print(r.json())
リクエスト署名(有効時) Node.js PHP Python
コピー
import crypto from "node:crypto";
async function tungkao(method, path, body) {
const raw = body ? JSON.stringify(body) : "";
const ts = Math.floor(Date.now() / 1000).toString();
const hash = crypto.createHash("sha256").update(raw).digest("hex");
const sig = crypto.createHmac("sha256", process.env.TUNGKAO_SIGNING_SECRET).update(`${ts}.${method}.${path}.${hash}`).digest("hex");
const r = await fetch("https://api.tungkao.com" + path, { method, body: raw || undefined, headers: {
Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json",
"X-Tungkao-Timestamp": ts, "X-Tungkao-Signature": sig } });
return r.json();
}
console.log(await tungkao("GET", "/v1/account"));<?php
function tungkao(string $method, string $path, ?array $body = null) {
$raw = $body ? json_encode($body) : "";
$ts = (string) time();
$sig = hash_hmac("sha256", "$ts.$method.$path." . hash("sha256", $raw), getenv("TUNGKAO_SIGNING_SECRET"));
$ch = curl_init("https://api.tungkao.com" . $path);
curl_setopt_array($ch, [CURLOPT_CUSTOMREQUEST => $method, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => $raw ?: null,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json", "X-Tungkao-Timestamp: $ts", "X-Tungkao-Signature: $sig"]]);
return json_decode(curl_exec($ch), true);
}
print_r(tungkao("GET", "/v1/account"));import hashlib, hmac, json, os, time, requests
def tungkao(method, path, body=None):
raw = json.dumps(body, separators=(",", ":")) if body else ""
ts = str(int(time.time()))
msg = f"{ts}.{method}.{path}.{hashlib.sha256(raw.encode()).hexdigest()}"
sig = hmac.new(os.environ["TUNGKAO_SIGNING_SECRET"].encode(), msg.encode(), hashlib.sha256).hexdigest()
return requests.request(method, "https://api.tungkao.com" + path, data=raw or None, timeout=30, headers={
"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}", "Content-Type": "application/json",
"X-Tungkao-Timestamp": ts, "X-Tungkao-Signature": sig}).json()
print(tungkao("GET", "/v1/account"))
すべての応答は success と request_id を含む JSON です。エラー時は error.code(例:KEY_EXPIRED、INSUFFICIENT_CREDITS)が付きます — /errors 参照。 error.user_message is the text to show your own end users (“The system cannot connect to the tungkao.com API. Please contact the administrator.”). It comes with errors an end user cannot fix: HTTP 5xx, SERVICE_PAUSED, INSUFFICIENT_CREDITS and key problems, in the Accept-Language language. Keys with white-label enabled get a message without the tungkao.com name. If the API cannot be reached at all (timeout/network down), show the same text from your own code. キーは選んだ期間(1〜24 か月または無期限)で失効します。30/7/1 日前に api_key.expiring webhook で通知。ポータルで更新でき、キー文字列は変わりません。 ドメイン認証:各 live キーは 1 つのサイトに紐付きます。API key →「ドメイン認証」→ ドメインを入力し、tungkao-verify-….html を https://あなたのドメイン/ に置く(または DNS TXT _tungkao-verify.あなたのドメイン を追加)して認証。未認証キーは DOMAIN_NOT_VERIFIED、認証済みドメインは変更できず他アカウントは使えません。 秘密キーが漏れた?「今すぐ再発行」— 無制限で旧キーは即停止。キーは自分のサービスでのみ動作します(違えば WRONG_PRODUCT)。 上級(任意):キーで「リクエスト署名」をオンにすると tksign_… を取得。以後すべてのリクエストに X-Tungkao-Timestamp と X-Tungkao-Signature = HMAC-SHA256(秘密, ts.METHOD.path.sha256(body)) が必要。キーだけ漏れても使えません。 🧪 Test mode (tk_test_… keys) is free and limited to 2 calls per service per day (non-GET requests only; resets at midnight Bangkok time). Beyond that you get HTTP 429 RATE_LIMITED with a message — use a live key for unlimited calls. Accept-Language(th、en、lo、my、zh-CN、ko、ja、vi、km、id)を送ってメッセージの言語を選べます。
明細が本物か、金額が合っているか、自分宛てか、未使用かを確認 — お客様が明細を添付するお店向け。
手順 お客様が明細をアップロード。サイトがその QR の文字(0041… で始まる)を読み取ります。 qr_payload、期待金額、受取口座を API に送信します。 status が VALID のときだけ注文を確定してください。
POST /v1/slip/verify
curl Node.js PHP Python
コピー
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"}]}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/slip/verify", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"qr_payload": "0041000600000101030040220014…",
"expected_amount": "500.00",
"receivers": [
{
"bank": "KBANK",
"account_number": "1234567890"
}
]
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/slip/verify");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"qr_payload" => "0041000600000101030040220014…",
"expected_amount" => "500.00",
"receivers" => [
[
"bank" => "KBANK",
"account_number" => "1234567890"
]
]
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/slip/verify",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"qr_payload": "0041000600000101030040220014…",
"expected_amount": "500.00",
"receivers": [
{
"bank": "KBANK",
"account_number": "1234567890"
}
]
},
timeout=30,
)
print(r.json())
📖 まとめ:複数サイトで 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
Idempotency-Key header(例:注文番号)を送れば、再試行しても二重課金されません。 明細はキーごとに 1 回だけ VALID(2 回目は DUPLICATE)。 Several sites receiving into the same account? Put their keys in the same group under “Duplicate-slip protection between keys” on the API Keys page. A slip that passed on one key then returns DUPLICATE on every key in the group (default: this key only).
TrueMoney Wallet の送金明細が本物か、金額が合っているか、あなたの e-wallet 番号宛てか、使い回しでないかを確認します。
手順 受取ウォレットを一度設定(PUT /v1/truewallet/profile、またはポータルの key カード):ウォレットの携帯番号または e-Wallet ID、タイ語/英語の名前、受取 QR 画像。 顧客に QR 画像(qr_image_url)を見せて支払ってもらい、明細画像をアップロードしてもらいます。 明細画像(image_base64)と想定金額を API に送ります。番号と名前は保存済みプロフィールから使います(またはリクエストで wallet_number / ewallet_id を送信)。 status が VALID のときだけ注文を確定してください。
PUT /v1/truewallet/profile
curl Node.js PHP Python
コピー
curl -X PUT https://api.tungkao.com/v1/truewallet/profile \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"wallet_number":"0812345678","ewallet_id":"140000812345678","name_en":"Somchai Jaidee","qr_image_base64":"<base64 QR image>"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/truewallet/profile", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"wallet_number": "0812345678",
"ewallet_id": "140000812345678",
"name_en": "Somchai Jaidee",
"qr_image_base64": "<base64 QR image>"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/truewallet/profile");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"wallet_number" => "0812345678",
"ewallet_id" => "140000812345678",
"name_en" => "Somchai Jaidee",
"qr_image_base64" => "<base64 QR image>"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.put(
"https://api.tungkao.com/v1/truewallet/profile",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"wallet_number": "0812345678",
"ewallet_id": "140000812345678",
"name_en": "Somchai Jaidee",
"qr_image_base64": "<base64 QR image>"
},
timeout=30,
)
print(r.json())GET /v1/truewallet/profile
curl Node.js PHP Python
コピー
curl -X GET https://api.tungkao.com/v1/truewallet/profile \
-H "Authorization: Bearer $TUNGKAO_KEY"// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/truewallet/profile", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}` },
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/truewallet/profile");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY")],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.get(
"https://api.tungkao.com/v1/truewallet/profile",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
timeout=30,
)
print(r.json())POST /v1/truewallet/verify
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/truewallet/verify \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"image_base64":"<base64 slip image>","expected_amount":"500.00"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/truewallet/verify", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"image_base64": "<base64 slip image>",
"expected_amount": "500.00"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/truewallet/verify");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"image_base64" => "<base64 slip image>",
"expected_amount" => "500.00"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/truewallet/verify",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"image_base64": "<base64 slip image>",
"expected_amount": "500.00"
},
timeout=30,
)
print(r.json())
📖 まとめ:複数サイトで 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
受取ウォレットを一度設定
状況: お店は TrueMoney 081-234-5678(Somchai)で受け取り、受取 QR がある
リクエスト
PUT /v1/truewallet/profile
{
"receive_by": "wallet_number",
"wallet_number": "0812345678",
"name_en": "Somchai Jaidee",
"qr_image_base64": "<base64 of the QR image>"
}レスポンス例
{
"success": true,
"data": {
"receive_by": "wallet_number",
"wallet_number": "0812345678",
"qr_image_url": "https://api.tungkao.com/v1/truewallet/qr/…"
}
}
➡️ 支払いページに qr_image_url を表示して顧客にスキャンしてもらう
例 2
保存済みウォレットで確認
状況: 顧客があなたの TrueMoney ウォレットに 300 バーツ送金し明細を添付
リクエスト
POST /v1/truewallet/verify
{
"image_base64": "<base64 of the slip image>",
"expected_amount": "300.00"
}レスポンス例
{
"success": true,
"status": "VALID",
"data": {
"amount": "300.00",
"currency": "THB"
}
}
➡️ 番号を送り直す必要はなく、key に保存したウォレットを使います
例 3
e-Wallet ID だけで受け取る
状況: 顧客は 15 桁の e-Wallet ID で支払い、電話番号を公開しなくて済みます
リクエスト
PUT /v1/truewallet/profile
{
"receive_by": "ewallet_id",
"ewallet_id": "140000812345678"
}
➡️ 電話番号宛ての明細は RECEIVER_MISMATCH、e-Wallet ID 宛てのみ受け付けます
例 4
リクエストで受取人を送る(複数ウォレット)
状況: 店舗ごとに複数のウォレットを使い分けている
リクエスト
POST /v1/truewallet/verify
{
"image_base64": "<base64 of the slip image>",
"expected_amount": "300.00",
"wallet_numbers": [
"0812345678",
"0898765432"
],
"wallet_name_en": "Somchai Jaidee"
}
➡️ 一覧のいずれかのウォレット宛てで名前が合えば通過
例 5
メインの提供元が障害、バックアップが引き継ぐ
状況: 顧客の送信中にメインの確認サービスが失敗
リクエスト
POST /v1/truewallet/verify
{
"image_base64": "<base64 of the slip image>",
"expected_amount": "300.00"
}
➡️ 同じリクエスト内でバックアップが確認します。image_base64 を送れば画像から確認します
例 6
使い回しまたは金額違い
状況: 顧客が明細を再送したり金額が足りない
レスポンス例
{
"success": false,
"status": "DUPLICATE"
}
➡️ DUPLICATE = 使用済み · AMOUNT_MISMATCH = 金額違い。どちらもクレジットを付与しないでください
受取人はどちらか、または両方で指定:wallet_number(10 桁の携帯番号)または ewallet_id(15 桁の e-Wallet ID)。どちらかに一致すれば通過します。 receive_by で受取方法を選択:wallet_number(番号のみ)、ewallet_id(e-Wallet ID のみ)、any(初期設定・どちらでも)。選んだ識別子で明細を確認します。 受取人の名前:name_th、name_en または両方(確認リクエストでは wallet_name_th / wallet_name_en)。設定するとどれかと一致が必要、未設定なら名前は確認しません。 受取 QR 画像:QR が読める 1 MB 以下の JPG/PNG。支払いページ用の qr_image_url が発行され、新しい画像を上げると新しいリンクになります。 wallet_number は受取ウォレットの 10 桁の携帯番号です。wallet_numbers で複数(最大 10)送るか、ポータルの key に保存してください。 レスポンスとステータスは /v1/slip/verify と同じです。明細は key ごとに 1 回だけ VALID(2 回目は DUPLICATE)。 Idempotency-Key header(例:注文番号)を送れば、再試行しても二重課金されません。
ユーザーの入金:明細を確認し、そのユーザーの入金を記録して webhook でサイトに通知します。
手順 ポータルでキーに受取口座と webhook URL を設定します。 customer_ref(あなたのユーザー ID)付きで明細を送信します。 deposit.succeeded webhook を受けたら(署名を確認して)ユーザーに反映します。
POST /v1/deposits/slip
curl Node.js PHP Python
コピー
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"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/deposits/slip", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"qr_payload": "0041000600000101030040220014…",
"customer_ref": "member-1001",
"expected_amount": "300.00"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/deposits/slip");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"qr_payload" => "0041000600000101030040220014…",
"customer_ref" => "member-1001",
"expected_amount" => "300.00"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/deposits/slip",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"qr_payload": "0041000600000101030040220014…",
"customer_ref": "member-1001",
"expected_amount": "300.00"
},
timeout=30,
)
print(r.json())GET /v1/deposits/dep_xxx
curl Node.js PHP Python
コピー
curl -X GET https://api.tungkao.com/v1/deposits/dep_xxx \
-H "Authorization: Bearer $TUNGKAO_KEY"// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/deposits/dep_xxx", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}` },
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/deposits/dep_xxx");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY")],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.get(
"https://api.tungkao.com/v1/deposits/dep_xxx",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
timeout=30,
)
print(r.json())
webhook 署名の検証 すべての webhook に X-Tungkao-Signature: t=…,v1=… が付きます。データを信頼する前に検証してください(URL 設定時に webhook 秘密が表示されます)。
Node.js PHP Python
コピー
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]));
}<?php
function verify(string $raw, string $header, string $secret): bool {
if (!preg_match('/^t=(\d+),v1=([0-9a-f]{64})$/', $header, $m) || abs(time() - (int)$m[1]) > 300) return false;
return hash_equals(hash_hmac("sha256", $m[1] . "." . $raw, $secret), $m[2]);
}
$ok = verify(file_get_contents("php://input"), $_SERVER["HTTP_X_TUNGKAO_SIGNATURE"] ?? "", getenv("TUNGKAO_WEBHOOK_SECRET"));import hmac, hashlib, re, time
def verify(raw: bytes, header: str, secret: str) -> bool:
m = re.fullmatch(r"t=(\d+),v1=([0-9a-f]{64})", header or "")
if not m or abs(time.time() - int(m[1])) > 300:
return False
want = hmac.new(secret.encode(), m[1].encode() + b"." + raw, hashlib.sha256).hexdigest()
return hmac.compare_digest(want, 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
🔐
Sign-in for your website (Google, LINE, Facebook, Apple, TikTok, Discord, Telegram, X, Microsoft, GitHub + 14 more)
Add 'Sign in with …' to your site without registering with each provider. Get name, email, photo, a stable member id, and a member list with sign-in history. One service per provider: google_login, line_login, facebook_login, tiktok_login, discord_login, telegram_login, x_login, microsoft_login, github_login.
手順 プロバイダーのキーを作成し、「ログイン会員」でサイト名と戻り先 URI(https、完全一致)を設定します。 ログインボタンはユーザーを /oauth/authorize へ送り、client_id(キー ID)、redirect_uri、state(毎回新しいランダム値をセッションに保存)を付けます。 ユーザーが redirect_uri?code=…&state=… に戻る → state を確認 → サーバーが 2 分以内に POST /v1/login/token を呼び出す。 data.user(例:7F3K9QX2-yourshopcom)を会員 ID に — 同じ人は常に同じ ID。
POST /v1/login/token
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/login/token \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"code":"from the redirect","redirect_uri":"https://yourshop.com/auth/callback"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/login/token", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"code": "from the redirect",
"redirect_uri": "https://yourshop.com/auth/callback"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/login/token");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"code" => "from the redirect",
"redirect_uri" => "https://yourshop.com/auth/callback"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/login/token",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"code": "from the redirect",
"redirect_uri": "https://yourshop.com/auth/callback"
},
timeout=30,
)
print(r.json())GET /v1/login/users?limit=50
curl Node.js PHP Python
コピー
curl -X GET https://api.tungkao.com/v1/login/users?limit=50 \
-H "Authorization: Bearer $TUNGKAO_KEY"// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/login/users?limit=50", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}` },
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/login/users?limit=50");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY")],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.get(
"https://api.tungkao.com/v1/login/users?limit=50",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
timeout=30,
)
print(r.json())
📖 Summary: using sign-in keys on several sites ケース key の設定(API Keys ページ) 結果 One site, 2 keys of the same provider (e.g. website + app, both Google) Both keys: Combined (default) The same person gets the same user ID in both ✅ One site, 2 keys of the same provider, counted as separate accounts Both keys: Separate The same person gets a different user ID on each key 2 sister sites sharing members Both keys: Group A A member has the same user ID on both sites ✅ 2 unrelated sites that must not link members Both keys: Separate Different user IDs, so the sites can't link their members ✅ A Google key and a LINE key (different providers) Any setting Always different user IDs — they are different provider accounts A key that already has sign-ins needs a different group Not allowed (locked 🔒) Create a new key in the wanted group, so member IDs on your site never change
Set it on the “Sign-in user IDs between keys” card on the API Keys page before go-live (new keys default: Combined). Several keys may use the same domain.
完全な例(ボタン + コールバック + code 交換) Node.js (Express) PHP Python (Flask)
コピー
// npm i express express-session
import express from "express";
import session from "express-session";
import crypto from "node:crypto";
const KEY = process.env.TUNGKAO_KEY; // API key (tk_live_…) server-side only
const CLIENT_ID = process.env.TUNGKAO_CLIENT_ID; // the key id (shown in the portal), not a secret
const REDIRECT = "https://yourshop.com/auth/callback"; // must match the registered URL exactly
const app = express();
app.use(session({ secret: process.env.SESSION_SECRET, resave: false, saveUninitialized: false, cookie: { secure: true, sameSite: "lax" } }));
// 1) your "Sign in" button links here
app.get("/auth/login", (req, res) => {
req.session.state = crypto.randomBytes(24).toString("base64url");
const u = new URL("https://api.tungkao.com/oauth/authorize");
u.search = new URLSearchParams({ client_id: CLIENT_ID, redirect_uri: REDIRECT, state: req.session.state });
res.redirect(u);
});
// 2) the user comes back with a code
app.get("/auth/callback", async (req, res) => {
if (!req.query.state || req.query.state !== req.session.state) return res.status(400).send("state mismatch");
delete req.session.state;
if (req.query.error) return res.redirect("/login?cancelled=1");
// 3) exchange the code for the user (within 2 minutes)
const r = await fetch("https://api.tungkao.com/v1/login/token", {
method: "POST",
headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ code: req.query.code, redirect_uri: REDIRECT }),
});
const j = await r.json();
if (!j.success) return res.status(400).send(j.error.message);
req.session.user = j.data; // j.data.user = permanent member id, e.g. 7F3K9QX2-yourshopcom
res.redirect("/");
});
app.listen(3000);<?php
// login.php — your "Sign in" button links to this file
session_start();
$CLIENT_ID = getenv("TUNGKAO_CLIENT_ID");
$REDIRECT = "https://yourshop.com/callback.php";
$_SESSION["state"] = bin2hex(random_bytes(24));
header("Location: https://api.tungkao.com/oauth/authorize?" . http_build_query([
"client_id" => $CLIENT_ID, "redirect_uri" => $REDIRECT, "state" => $_SESSION["state"],
]));
<?php
// callback.php — the user comes back here
session_start();
$REDIRECT = "https://yourshop.com/callback.php";
if (empty($_GET["state"]) || !hash_equals($_SESSION["state"] ?? "", $_GET["state"])) { http_response_code(400); exit("state mismatch"); }
unset($_SESSION["state"]);
if (!empty($_GET["error"])) { header("Location: /login.php?cancelled=1"); exit; }
$ch = curl_init("https://api.tungkao.com/v1/login/token");
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["code" => $_GET["code"], "redirect_uri" => $REDIRECT]),
]);
$j = json_decode(curl_exec($ch), true);
if (!$j["success"]) { http_response_code(400); exit($j["error"]["message"]); }
$_SESSION["user"] = $j["data"]; // $j["data"]["user"] = permanent member id
header("Location: /");# pip install flask requests
import os, secrets, requests
from urllib.parse import urlencode
from flask import Flask, session, request, redirect, abort
app = Flask(__name__)
app.secret_key = os.environ["SESSION_SECRET"]
KEY = os.environ["TUNGKAO_KEY"]
CLIENT_ID = os.environ["TUNGKAO_CLIENT_ID"]
REDIRECT = "https://yourshop.com/auth/callback"
@app.get("/auth/login")
def login():
session["state"] = secrets.token_urlsafe(24)
return redirect("https://api.tungkao.com/oauth/authorize?" + urlencode({"client_id": CLIENT_ID, "redirect_uri": REDIRECT, "state": session["state"]}))
@app.get("/auth/callback")
def callback():
if not request.args.get("state") or not secrets.compare_digest(request.args["state"], session.pop("state", "")):
abort(400)
if request.args.get("error"):
return redirect("/login?cancelled=1")
r = requests.post("https://api.tungkao.com/v1/login/token", headers={"Authorization": f"Bearer {KEY}"},
json={"code": request.args["code"], "redirect_uri": REDIRECT}, timeout=30).json()
if not r["success"]:
abort(400, r["error"]["message"])
session["user"] = r["data"] # r["data"]["user"] = permanent member id
return redirect("/")
プロバイダー サービス 取得できる情報
Googlegoogle_login名前、確認済みメール、写真
LINEline_login名前、写真、メール(同意時)
Facebookfacebook_login名前、写真、メール
TikToktiktok_login表示名、アバター(メールなし)
Discorddiscord_login名前、アバター、メール
Telegramtelegram_loginname, username, photo
X (Twitter)x_loginname, username, photo
Microsoftmicrosoft_loginname, email (Hotmail/Outlook)
GitHubgithub_loginname, email, avatar
Appleapple_loginpermanent member ID (no name or email in this mode)
Steamsteam_loginname, avatar and SteamID (no email)
Twitchtwitch_loginname, email, avatar
LinkedInlinkedin_loginname, email, photo
Kakaokakao_loginname, photo (email once Kakao approves it)
NAVERnaver_loginname, email, photo
Zalozalo_loginname, photo (no email)
Spotifyspotify_loginname, email, photo
Redditreddit_loginusername, avatar (no email)
GitLabgitlab_loginname, email, avatar
Robloxroblox_loginname, avatar (no email)
Epic Gamesepicgames_logindisplay name (no email)
Yahooyahoo_loginname, email, photo
Slackslack_loginname, email, photo
Amazonamazon_loginname, email
📚 使い方の例 例 1
A “Sign in with Google” button on your site
状況: A visitor taps Sign in with Google on your site
リクエスト
GET /oauth/authorize?client_id=<CLIENT_ID>&redirect_uri=https://yourshop.com/auth/callback&state=xyz
➡️ The user signs in with Google and returns to redirect_uri with a code and the same state
例 2
Exchange the code for the user (server side)
状況: Your server receives the code on the callback page (exchange within 2 minutes)
リクエスト
POST /v1/login/token
{
"code": "<code from the callback>",
"redirect_uri": "https://yourshop.com/auth/callback"
}レスポンス例
{
"success": true,
"data": {
"user": "7F3K9QX2-yourshopcom",
"provider": "google",
"name": "Somchai",
"is_new_user": true
}
}
➡️ Use user as the member id in your database (stable per person)
例 3
A returning user signs in
状況: The same person signs in with Google again
レスポンス例
{
"success": true,
"data": {
"user": "7F3K9QX2-yourshopcom",
"is_new_user": false,
"login_count": 5
}
}
➡️ Same user every time → look up the member and sign them in
例 4
One site, two Google keys (website + app)
状況: Separate keys for website and app, same members
➡️ Keep both keys “Combined” (default) before go-live → same user for the same person. Choose “Separate” to keep them apart
例 5
List members who signed in
状況: You want to browse or search members of this key
リクエスト
GET /v1/login/users?q=somchai&limit=50
➡️ Returns members with last sign-in time and count
例 6
The user cancels during sign-in
状況: The user cancels on the Google screen
➡️ Returns to redirect_uri with error instead of code; show a retry button
User IDs between keys: new keys default to “Combined (whole account)”, so the same person signing in through keys of the same provider in one account gets the same ID. Change it to group A–E or “Separate” on the API Keys page before the first sign-in; after that the group is locked so member IDs never change. ログイン成功ごとと新規会員ごとに 1 回クレジットを消費 — 現在の料金はサービスカード参照。 test モードのキーは http://localhost の戻り先を許可し、無料です。 API キーをリンクやページに入れないでください — /oauth/authorize に必要なのは公開可能な client_id(キー ID)だけです。
TUNGKAO のボットでユーザーに Telegram メッセージを送信 — ボットを作る必要なし。例:入金確認、注文状況、OTP。
手順 ref is your own name for a recipient (use your member id, e.g. member-1001): A-Z a-z 0-9 _ . : @ - up to 128 chars. Every call refers to the recipient by this ref. Add a recipient: your server calls POST /v1/telegram/link {ref} → gets data.url (a t.me/…?start=… link) → show it as a “Connect Telegram” button on the member's profile page (valid 30 minutes, single use; request again any time). The member opens the link → presses Start in Telegram → the bot confirms (Telegram does not let a bot message someone who never pressed Start, so this step cannot be skipped). Check the connection: GET /v1/telegram/recipients (status = active) — use it to switch your button to “Connected ✓”. Send: POST /v1/telegram/send with one ref or up to 100 refs; bold text (parse_mode: HTML) and a link button are supported. Per-recipient results are in data.results: sent / not_linked / failed. Remove a recipient: DELETE /v1/telegram/recipients/{ref}. Members can also send /stop to the bot. If a member blocks the bot, that recipient is paused until they connect again. Try it without code: TUNGKAO API key page → this key's card → “Set up notifications” has a create-link button (with QR) and a send-test button.
POST /v1/telegram/link
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/telegram/link \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"ref":"member-1001"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/telegram/link", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"ref": "member-1001"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/telegram/link");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"ref" => "member-1001"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/telegram/link",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"ref": "member-1001"
},
timeout=30,
)
print(r.json())POST /v1/telegram/send
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/telegram/send \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"ref":"member-1001","text":"<b>Payment received</b> 500 THB","parse_mode":"HTML","button":{"text":"View order","url":"https://yourshop.com/orders/1"}}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/telegram/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"ref": "member-1001",
"text": "<b>Payment received</b> 500 THB",
"parse_mode": "HTML",
"button": {
"text": "View order",
"url": "https://yourshop.com/orders/1"
}
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/telegram/send");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"ref" => "member-1001",
"text" => "<b>Payment received</b> 500 THB",
"parse_mode" => "HTML",
"button" => [
"text" => "View order",
"url" => "https://yourshop.com/orders/1"
]
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/telegram/send",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"ref": "member-1001",
"text": "<b>Payment received</b> 500 THB",
"parse_mode": "HTML",
"button": {
"text": "View order",
"url": "https://yourshop.com/orders/1"
}
},
timeout=30,
)
print(r.json())GET /v1/telegram/messages
curl Node.js PHP Python
コピー
curl -X GET https://api.tungkao.com/v1/telegram/messages \
-H "Authorization: Bearer $TUNGKAO_KEY"// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/telegram/messages", {
method: "GET",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}` },
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/telegram/messages");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY")],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.get(
"https://api.tungkao.com/v1/telegram/messages",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
timeout=30,
)
print(r.json())
📚 使い方の例 例 1
Let a member connect Telegram
状況: Member member-1001 wants notifications on Telegram
リクエスト
POST /v1/telegram/link
{
"ref": "member-1001"
}レスポンス例
{
"success": true,
"data": {
"url": "https://t.me/…?start=…"
}
}
➡️ Give the member the link to tap (valid 30 minutes, once)
例 2
Notify a payment
状況: 500 THB arrived and you want to notify the member
リクエスト
POST /v1/telegram/send
{
"ref": "member-1001",
"text": "<b>Payment received</b> 500 THB",
"parse_mode": "HTML"
}
➡️ The member gets the message in Telegram right away
例 3
Message with a link button
状況: You want a button to open the order
リクエスト
POST /v1/telegram/send
{
"ref": "member-1001",
"text": "Order #1001 shipped",
"button": {
"text": "View order",
"url": "https://yourshop.com/orders/1001"
}
}
➡️ A button under the message opens the link
例 4
Notify several members at once
状況: Announce a promotion to three members
リクエスト
POST /v1/telegram/send
{
"refs": [
"member-1001",
"member-1002",
"member-1003"
],
"text": "New promotion today"
}
➡️ Sent to each member; check results with GET /v1/telegram/messages
例 5
A member stops notifications
状況: The member asks to disconnect
リクエスト
DELETE /v1/telegram/recipients/member-1001
➡️ The link is removed; no more messages are sent
届いたメッセージだけ課金 — 失敗(ボットをブロック等)は返金され、その受信者は一時停止。
🔔
Discord 通知 discord_notify
自分やお客様の Discord チャンネルにメッセージを投稿 — 例:チームへの新規注文通知。
手順 Create a channel webhook in Discord (needs Manage Webhooks): desktop right-click the channel → Edit Channel → Integrations → Webhooks → New Webhook → name it → Copy Webhook URL (mobile: long-press the channel → Edit Channel). ref is your own name for the channel, e.g. orders-room (A-Z a-z 0-9 _ . : @ - up to 128 chars). One key can hold many channels, each with its own ref. Add a channel: POST /v1/discord/webhooks {ref, url} — url must start with https://discord.com/api/webhooks/…; it is stored encrypted and never returned. Posting the same ref again replaces that channel's link. Send: POST /v1/discord/send {ref, text} (up to 2000 chars; @everyone / @here are disabled automatically). Results are in data.results: sent / not_linked / failed. List channels: GET /v1/discord/recipients. Remove: DELETE /v1/discord/recipients/{ref}. If the webhook is deleted in Discord, the channel is paused and the undelivered message is refunded. Try it without code: TUNGKAO API key page → this key's card → “Set up notifications”: paste the webhook link, add the channel and send a test. Do not confuse this with the key's “Webhook URL” setting: that is your server address for receiving events from TUNGKAO, not a Discord channel link.
POST /v1/discord/webhooks
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/discord/webhooks \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"ref":"orders-room","url":"https://discord.com/api/webhooks/123/abc…"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/discord/webhooks", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"ref": "orders-room",
"url": "https://discord.com/api/webhooks/123/abc…"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/discord/webhooks");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"ref" => "orders-room",
"url" => "https://discord.com/api/webhooks/123/abc…"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/discord/webhooks",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"ref": "orders-room",
"url": "https://discord.com/api/webhooks/123/abc…"
},
timeout=30,
)
print(r.json())POST /v1/discord/send
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/discord/send \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"ref":"orders-room","text":"🛒 New order #1001 — 590 THB"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/discord/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"ref": "orders-room",
"text": "🛒 New order #1001 — 590 THB"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/discord/send");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"ref" => "orders-room",
"text" => "🛒 New order #1001 — 590 THB"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/discord/send",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"ref": "orders-room",
"text": "🛒 New order #1001 — 590 THB"
},
timeout=30,
)
print(r.json())
📚 使い方の例 例 1
Register a Discord channel
状況: You want new orders posted in #orders
リクエスト
POST /v1/discord/webhooks
{
"ref": "orders-room",
"url": "https://discord.com/api/webhooks/123/abc…"
}
➡️ Name it once with ref and use it forever
例 2
Post a new order
状況: Order #1001 for 590 THB comes in
リクエスト
POST /v1/discord/send
{
"ref": "orders-room",
"text": "🛒 New order #1001 — 590 THB"
}
➡️ The message appears in the channel right away
例 3
Custom sender name
状況: You want the sender to show as “Shop Bot”
リクエスト
POST /v1/discord/send
{
"ref": "orders-room",
"text": "Daily sales: 12,400 THB",
"username": "Shop Bot"
}
➡️ The message shows Shop Bot as the sender
例 4
Post to several channels
状況: Notify both the admin and the stock channels
リクエスト
POST /v1/discord/send
{
"refs": [
"admin-room",
"stock-room"
],
"text": "Stock low: T-shirt size M"
}
➡️ Posted to every listed channel
例 5
Check sending history
状況: You want to see which messages failed
リクエスト
GET /v1/discord/messages
➡️ Returns each message with its status
API または SMTP でサイトからメールを送信(WordPress 対応)し、メール OTP の送信と検証も — 複数のメール配信会社を自動で切り替えます。
手順 メールキーを作成(テストキーは自分のアドレス宛てのみ、1 日 50 通)。 SMTP:ホスト smtp.tungkao.com、ポート 587(STARTTLS)または 465(SSL)、ユーザー名は任意、パスワード = API キー。 API:メールを送信、または OTP を要求し、返された otp_id で検証(5 回まで・1 回限り)。
POST /v1/email/send
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/email/send \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"to":["[email protected] "],"subject":"Order #1001 confirmed","html":"<h1>Thanks for your order</h1>","text":"Thanks for your order","from_name":"My Shop","reply_to":"[email protected] "}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/email/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"to": [
"[email protected] "
],
"subject": "Order #1001 confirmed",
"html": "<h1>Thanks for your order</h1>",
"text": "Thanks for your order",
"from_name": "My Shop",
"reply_to": "[email protected] "
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/email/send");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"to" => [
"[email protected] "
],
"subject" => "Order #1001 confirmed",
"html" => "<h1>Thanks for your order</h1>",
"text" => "Thanks for your order",
"from_name" => "My Shop",
"reply_to" => "[email protected] "
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/email/send",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"to": [
"[email protected] "
],
"subject": "Order #1001 confirmed",
"html": "<h1>Thanks for your order</h1>",
"text": "Thanks for your order",
"from_name": "My Shop",
"reply_to": "[email protected] "
},
timeout=30,
)
print(r.json())POST /v1/email/otp/send
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/email/otp/send \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"[email protected] ","brand":"My Shop","lang":"th","length":6,"ttl_seconds":300}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/email/otp/send", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"to": "[email protected] ",
"brand": "My Shop",
"lang": "th",
"length": 6,
"ttl_seconds": 300
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/email/otp/send");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"to" => "[email protected] ",
"brand" => "My Shop",
"lang" => "th",
"length" => 6,
"ttl_seconds" => 300
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/email/otp/send",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"to": "[email protected] ",
"brand": "My Shop",
"lang": "th",
"length": 6,
"ttl_seconds": 300
},
timeout=30,
)
print(r.json())POST /v1/email/otp/verify
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/email/otp/verify \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"otp_id":"8f6c2a1e-…","code":"123456"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/email/otp/verify", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"otp_id": "8f6c2a1e-…",
"code": "123456"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/email/otp/verify");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"otp_id" => "8f6c2a1e-…",
"code" => "123456"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/email/otp/verify",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"otp_id": "8f6c2a1e-…",
"code": "123456"
},
timeout=30,
)
print(r.json())
📚 使い方の例 例 1
Order confirmation email
状況: A customer completes an order
リクエスト
POST /v1/email/send
{
"to": [
"[email protected] "
],
"subject": "Order #1001 confirmed",
"html": "<h1>Thanks for your order</h1>",
"text": "Thanks for your order",
"from_name": "My Shop",
"reply_to": "[email protected] "
}
➡️ Always send html and text; replies go to reply_to
例 2
Send an email OTP
状況: A new sign-up must confirm their email
リクエスト
POST /v1/email/otp/send
{
"to": "[email protected] ",
"brand": "My Shop",
"lang": "th",
"length": 6,
"ttl_seconds": 300
}レスポンス例
{
"success": true,
"data": {
"otp_id": "8f6c2a1e-…"
}
}
➡️ Keep otp_id; the code expires in 5 minutes
例 3
Check the OTP
状況: The user types the 6-digit code
リクエスト
POST /v1/email/otp/verify
{
"otp_id": "8f6c2a1e-…",
"code": "123456"
}
➡️ Correct = email confirmed · too many wrong tries = code locked, send a new one
例 4
Send to several people
状況: Tell three staff about a large order
リクエスト
POST /v1/email/send
{
"to": [
"[email protected] ",
"[email protected] ",
"[email protected] "
],
"subject": "Large order #1002",
"text": "Order #1002: 25,000 THB"
}
➡️ Everyone listed receives the email
例 5
Review sent emails
状況: A customer says the email never arrived
リクエスト
GET /v1/email/messages
➡️ Check the delivery status of each email
送信元は TUNGKAO のアドレス、差出人名(from_name)と reply_to はあなたのものです。 全社で失敗した場合はクレジットを自動返金 · SMTP の添付ファイルは転送されません。
ユーザーごとに専用の BTC / USDT / USDC アドレス(TRON、Ethereum、BNB Chain、Polygon、Arbitrum、Base、Optimism、Avalanche)を発行し、webhook で通知 — 近日公開。
手順 ユーザー用アドレスを取得 ユーザーが送金 crypto.deposit.confirmed で反映
POST /v1/crypto/addresses
curl Node.js PHP Python
コピー
curl -X POST https://api.tungkao.com/v1/crypto/addresses \
-H "Authorization: Bearer $TUNGKAO_KEY" \
-H "Content-Type: application/json" \
-d '{"asset":"USDT-TRC20","customer_ref":"member-1001"}'// Node.js 18+ (nothing to install)
const res = await fetch("https://api.tungkao.com/v1/crypto/addresses", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TUNGKAO_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"asset": "USDT-TRC20",
"customer_ref": "member-1001"
}),
});
const data = await res.json();
console.log(data);<?php
$ch = curl_init("https://api.tungkao.com/v1/crypto/addresses");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TUNGKAO_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"asset" => "USDT-TRC20",
"customer_ref" => "member-1001"
]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);import os, requests # pip install requests
r = requests.post(
"https://api.tungkao.com/v1/crypto/addresses",
headers={"Authorization": f"Bearer {os.environ['TUNGKAO_KEY']}"},
json={
"asset": "USDT-TRC20",
"customer_ref": "member-1001"
},
timeout=30,
)
print(r.json())
📚 使い方の例 例 1
Get a deposit address for a customer
状況: member-1001 will pay in USDT on TRC20
リクエスト
POST /v1/crypto/addresses
{
"asset": "USDT-TRC20",
"customer_ref": "member-1001"
}
➡️ You get a per-customer address to show as a QR
例 2
List supported coins and networks
状況: You want minimums and confirmations per coin
リクエスト
GET /v1/crypto/assets
➡️ Returns min_deposit and confirmations_required per asset
例 3
Check incoming deposits
状況: Waiting for the customer's payment
リクエスト
GET /v1/crypto/depositsレスポンス例
{
"success": true,
"data": [
{
"asset": "USDT-TRC20",
"customer_ref": "member-1001",
"amount": "25.00",
"confirmations": 20,
"confirmations_required": 20,
"status": "confirmed"
}
]
}
➡️ confirmed = credit · pending = wait · ignored = below minimum
例 4
Withdraw coins
状況: Withdraw USDT to your own wallet
リクエスト
POST /v1/crypto/withdrawals
{
"asset": "USDT-TRC20",
"to_address": "T…your address…",
"amount": "100"
}
➡️ Always check the address matches the network; wrong-network transfers can't be recovered
💸 Withdrawal fees: funds received through the API pay 3.5% per withdrawal; wallets you create yourself in the merchant portal pay 2.5%. Taken from the withdrawn coin, not credits; deposits are free (live rate: withdraw_fee_percent in GET /v1/crypto/assets).
🚦 システム状況(GET /status) API が正常かいつでも確認できます(キー不要)
GET https://api.tungkao.com/status
🟢 ok = 正常 🟠 busy = 混雑 🔴 slow = わずかな遅延 直近 5 分の実リクエストからサービスごと(services[])に計測。明細確認・明細入金は全バックアップ事業者を合算し、経路ごとの状態は routes[] API キー不要、ブラウザから呼び出し可(CORS 許可)、15 秒キャッシュ — 1 分に 1 回以下の確認を推奨 busy/slow のときはタイムアウトを 15〜20 秒に延ばし、同じ Idempotency-Key で再試行してください(二重課金なし) tungkao.com の右上にも表示されます
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"
}
}
🛡️ 安定性の約束:一度つなげばずっと動く API /v1 は恒久固定:削除・名前変更・型変更はしません — 追加のみです。既存コードを壊す変更は自動の契約テストがデプロイを止めます。 プロバイダー(銀行、LINE、Google、Facebook、TikTok、Discord、Telegram、ブロックチェーン)が変わっても、こちらのサーバーで対応します — あなたのコードはそのまま。明細チェックは 3 社間で自動切替します。 将来に強いコードに:未知の項目は無視し、文言ではなく error.code で分岐し、未知の新しい status は「不合格/保留」として扱ってください。 万一なにかを廃止する場合は、少なくとも 12 か月前にすべての応答の Deprecation / Sunset header・メール・webhook で告知し、それまでは従来どおり動作します。 すべての応答に、バージョンと最新改訂日を示す X-Tungkao-Api-Version header が付きます。全履歴:/changelog.json
🏷️ TUNGKAO クレジット表記の要件 TUNGKAO のサービスを使うすべてのページで “Powered by TUNGKAO” または “Secured by TUNGKAO” を見える形で表示し、https://tungkao.com へリンクしてください 機能の近くに配置し、隠したり背景色と同化させたり極端に小さくしないでください 「ログインボタン」ページのボタンには自動で含まれ、TUNGKAO のログイン画面にも表示されます 例:<a href="https://tungkao.com" target="_blank" rel="noopener">Powered by TUNGKAO</a> 表記を外す(ホワイトラベル)場合は事前に承認を得てください
Powered by TUNGKAO