⬇️ 下载 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(smtp.tungkao.com)+ 邮件 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 密钥(一个服务一个密钥),并在每个请求的 Authorization header 中发送。
步骤 用 Gmail 登录 app.tungkao.com 并充值点数(1 泰铢 = 100 点)。 API key → 选择服务卡片 → 选择密钥有效期 → 创建 → 复制密钥(只显示一次)。 把密钥保存在服务器上(环境变量 TUNGKAO_KEY),绝不要放进网页或手机应用。 先用 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"))
每个响应都是 JSON,包含 success 和 request_id。出错时带 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 密钥绑定一个网站。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))。仅泄露 API 密钥将无法使用。 🧪 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)选择消息语言。
核验凭证是否真实、金额是否一致、是否转入你的账户以及是否已被使用——适合客户上传凭证的店铺。
步骤 客户上传凭证;你的网站读取其二维码文字(以 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 — 只能在一个网站使用 ✅ 2 个网站同一账户但 key 分开(默认) 两个 key:仅此 key 一张凭证两个网站都通过 ⚠️ 客户可能充值两次 — 请关联 key 2 个网站收款账户不同 仅此 key(默认) 一个网站的凭证到另一个网站已返回 RECEIVER_MISMATCH ✅ 2 个网站属于不同 tungkao 账户(不同所有者)但收款账户相同 不同 tungkao 账户之间的 key 无法关联 一张凭证两边都通过 ⚠️ — 请在同一 tungkao 账户购买两个 key 并关联 一个网站使用 2 个 key(例如网站 + 应用) 两个 key:同一组 无论从网站还是应用提交,凭证都只能使用一次 ✅
DUPLICATE 通过二维码中的参考号即时识别。在 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(例如订单号):重试绝不会重复扣费。 同一凭证每个密钥只会 VALID 一次(第二次返回 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 转账凭证是否真实、金额是否正确、是否转入你的电子钱包号码且未被使用过。
步骤 一次性设置收款钱包(PUT /v1/truewallet/profile,或在商户后台的 key 卡片上):钱包手机号或 e-Wallet ID、泰文/英文姓名和收款二维码图片。 向客户展示二维码图片(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 — 只能在一个网站使用 ✅ 2 个网站同一账户但 key 分开(默认) 两个 key:仅此 key 一张凭证两个网站都通过 ⚠️ 客户可能充值两次 — 请关联 key 2 个网站收款账户不同 仅此 key(默认) 一个网站的凭证到另一个网站已返回 RECEIVER_MISMATCH ✅ 2 个网站属于不同 tungkao 账户(不同所有者)但收款账户相同 不同 tungkao 账户之间的 key 无法关联 一张凭证两边都通过 ⚠️ — 请在同一 tungkao 账户购买两个 key 并关联 一个网站使用 2 个 key(例如网站 + 应用) 两个 key:同一组 无论从网站还是应用提交,凭证都只能使用一次 ✅
DUPLICATE 通过二维码中的参考号即时识别。在 API Keys 页面的“key 之间防重复凭证”卡片中设置(新 key 默认:仅此 key)。
📚 使用示例 示例 1
一次性设置收款钱包
场景: 你的店铺收款到 TrueMoney 081-234-5678(Somchai),并有收款二维码
请求
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)。设置后凭证须匹配其一;未设置则不核验姓名。 收款二维码图片:可读取二维码的 JPG/PNG,最大 1 MB。你会得到用于付款页面的 qr_image_url;上传新图片会生成新链接。 wallet_number 是收款钱包的 10 位手机号。可用 wallet_numbers 发送多个(最多 10 个),或保存在商户后台的 key 上。 响应和状态与 /v1/slip/verify 相同。每张凭证每个 key 只能 VALID 一次(第二次返回 DUPLICATE)。 发送 Idempotency-Key header(例如订单号):重试绝不会重复扣费。
为你的用户充值:核验凭证、记录该用户的充值并通过 webhook 通知你的网站。
步骤 在后台为密钥设置收款账户和 webhook 地址。 提交凭证时附带 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=…。信任数据前先校验(设置地址时会显示 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.
步骤 为该平台创建密钥,然后在“登录会员”设置网站名称和返回地址(https,完全一致)。 你的登录按钮把用户带到 /oauth/authorize,附带 client_id(密钥 ID)、redirect_uri 和 state(每次新的随机值,保存在 session)。 用户返回 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. 每次成功登录扣费,新会员另收一次——当前价格见服务卡片。 test 模式密钥允许 http://localhost 返回地址且免费。 绝不要把 API 密钥放进链接或页面——/oauth/authorize 只需要可公开的 client_id(密钥 ID)。
通过 TUNGKAO 的机器人在 Telegram 上给你的用户发消息——无需自建机器人。例如到账、订单状态、验证码。
步骤 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 验证码及校验——自动在多家邮件服务商之间切换。
步骤 创建邮件密钥(测试密钥只能发到你自己的邮箱,每天 50 封)。 SMTP:主机 smtp.tungkao.com,端口 587(STARTTLS)或 465(SSL),用户名任意,密码 = 你的 API 密钥。 API:发送邮件,或申请 OTP 并用返回的 otp_id 校验(5 次机会,只能用一次)。
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 秒——建议最多每分钟查询一次 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