TUNGKAO API 文档
API · truewallet_verify

TrueMoney Wallet 转账凭证核验

核验 TrueMoney Wallet 转账凭证是否真实、金额是否正确、是否转入你的电子钱包号码且未被使用过。

🕒 最近更新: 泰国时间(UTC+07:00) · ✅ 现有代码照常可用,无需修改

🤖 让 AI 帮你写对接代码

复制此链接给 AI 阅读(该 API 的完整 Markdown),或点击下方按钮:自动复制提示词并打开所选 AI,粘贴后告诉它你的语言/框架

https://app.tungkao.com/docs/api/truewallet_verify.md?lang=zh-CN
https://api.tungkao.com/changelog/truewallet_verify.json

此链接以 JSON 返回该 API 的更新(无需 key,任何域名可访问)。可在后台显示为“更新公告”框,last_updated 变化时标记“新”

复制并打开: 点击 AI 按钮会自动复制提示词,若对话框为空直接粘贴即可

🔑 使用的密钥

在商户后台(API key)创建 truewallet_verify 密钥,并在每个请求中发送此 header——其他服务的密钥在这里无效

Authorization: Bearer $TUNGKAO_KEY

📋 步骤

  1. 一次性设置收款钱包(PUT /v1/truewallet/profile,或在商户后台的 key 卡片上):钱包手机号或 e-Wallet ID、泰文/英文姓名和收款二维码图片。
  2. 向客户展示二维码图片(qr_image_url)付款,然后让客户上传凭证图片。
  3. 将凭证图片(image_base64)和应收金额发送到 API。号码和姓名取自已保存的资料(或在请求中发送 wallet_number / ewallet_id)。
  4. 只有当 status 为 VALID 时才确认订单。

📡 接口调用 + 代码示例

PUT/v1/truewallet/profile
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>"}'
GET/v1/truewallet/profile
curl -X GET https://api.tungkao.com/v1/truewallet/profile \
  -H "Authorization: Bearer $TUNGKAO_KEY"
POST/v1/truewallet/verify
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"}'

📖 小结:一个 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 = 金额不符。两种情况都不要加积分

💡 更多

📜 此 API 的更新记录

  1. 改进 泰国时间(UTC+07:00)
    📘 The TrueMoney Wallet docs page is now fully translated into all 10 languages (steps, examples, case table, notes)
  2. 新增 泰国时间(UTC+07:00)
    📄 TrueMoney Wallet API landing page in 10 languages (tungkao.com/en/truemoney-wallet-api)
  3. 新增 泰国时间(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
  4. 改进 泰国时间(UTC+07:00)
    TrueMoney Wallet slip verification: choose whether you receive with the mobile number or the e-Wallet ID (receive_by); the wallet identifier must always match — a matching name alone no longer passes
  5. 新增 泰国时间(UTC+07:00)
    TrueMoney Wallet slip verification: save your receiving wallet on the key (GET/PUT /v1/truewallet/profile) — wallet number or e-Wallet ID, Thai/English name and a receiving QR image with a link to show your customer
  6. 改进 泰国时间(UTC+07:00)
    TrueMoney Wallet slip verification now fails over to a backup provider inside the same API call when the primary provider is down (requires the slip image)
  7. 上线 泰国时间(UTC+07:00)
    New service: TrueMoney Wallet slip verification — POST /v1/truewallet/verify (a truewallet_verify key). The receiver is an e-wallet number; responses are identical to /v1/slip/verify
  8. 新增 泰国时间(UTC+07:00)
    API update announcements by webhook: new api.update event (opt in per key on the key card; off by default)
  9. 新增 泰国时间(UTC+07:00)
    error.user_message: ready-to-show text for end users on outages, no credits or key problems (white-label keys omit tungkao.com)
  10. 新增 泰国时间(UTC+07:00)
    GET /status:按服务显示 API 状态(无需密钥)
  11. 新增 泰国时间(UTC+07:00)
    密钥开关及状态变更时间 + 每个网站每项服务 1 个密钥
  12. 改进 泰国时间(UTC+07:00)
    API v1 永久冻结(仅新增)+ X-Tungkao-Api-Version header + 提前 12 个月的弃用通知
  13. 文档 泰国时间(UTC+07:00)
    每个 API 独立文档页及 AI 链接(10 种语言)
  14. 安全 泰国时间(UTC+07:00)
    每个 API 密钥域名验证(1 密钥 = 1 网站)——现有密钥照常可用
  15. 新增 泰国时间(UTC+07:00)
    可选 HMAC 请求签名——不开启则一切照旧
  16. 新增 泰国时间(UTC+07:00)
    API 密钥有效期、到期提醒和续期——密钥字符串不变
  17. 新增 泰国时间(UTC+07:00)
    所有服务支持 test 模式密钥(模拟、免费)

✅ 现有代码照常可用,无需修改

🛡️ 稳定性承诺:一次对接,长期可用

🚦 系统状态(GET /status)

随时查看 API 是否正常,无需密钥

GET https://api.tungkao.com/status

curl https://api.tungkao.com/status
{
  "success": true,
  "data": {
    "status": "ok",
    "services": [
      { "id": "slip_verify", "status": "ok", "routes": ["ok", "ok", "busy"] },
      { "id": "slip_deposit", "status": "ok", "routes": ["ok", "ok", "busy"] },
      { "id": "login", "status": "ok" },
      { "id": "telegram", "status": "ok" },
      { "id": "discord", "status": "ok" },
      { "id": "email", "status": "busy" },
      { "id": "crypto", "status": "ok" },
      { "id": "core", "status": "ok" }
    ],
    "paused": [],
    "updated_at": "2026-11-14T12:00:00.000Z"
  }
}

🏷️ TUNGKAO 署名要求

Powered by TUNGKAO