TUNGKAO Dokumentasi API
Tekan tombol lalu pilih “Simpan sebagai PDF”

TUNGKAO API

Verifikasi bukti transfer bank

API v1 · Terakhir diperbarui: Waktu Thailand (UTC+07:00)

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

Sesuai ketentuan, halaman yang memakai layanan wajib menampilkan “Powered by TUNGKAO” (atau “Secured by TUNGKAO” untuk login/pembayaran) yang tertaut ke https://tungkao.com

🧾
API · slip_verify

Verifikasi bukti transfer bank

Memeriksa bukti asli, jumlahnya cocok, dibayar ke Anda, dan belum dipakai — untuk toko yang pelanggannya melampirkan bukti.

🕒 Terakhir diperbarui: Waktu Thailand (UTC+07:00) · ✅ Kode lama tetap berjalan

🤖 Minta AI menulis integrasinya

Salin tautan ini untuk dibaca AI (seluruh API dalam Markdown) atau tekan tombol: prompt disalin dan AI dibuka

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

Tautan ini mengembalikan pembaruan API ini sebagai JSON (tanpa key, dari asal mana pun). Tampilkan di halaman admin sebagai kotak “Pengumuman pembaruan” dan tandai “Baru” saat last_updated berubah

Salin + buka di: Menekan tombol AI otomatis menyalin prompt — jika kotak chat kosong, tinggal tempel

🔑 Key yang dipakai

Buat key slip_verify di portal merchant (API key) dan kirim header ini di setiap request — key layanan lain tidak berfungsi di sini

Authorization: Bearer $TUNGKAO_KEY

📋 Langkah

  1. Pelanggan mengunggah bukti; situs Anda membaca teks QR-nya (diawali 0041…).
  2. Kirim qr_payload, jumlah yang diharapkan, dan rekening penerima ke API.
  3. Terima pesanan hanya jika status VALID.

📡 Panggilan API + contoh kode

POST/v1/slip/verify
curl -X POST https://api.tungkao.com/v1/slip/verify \
  -H "Authorization: Bearer $TUNGKAO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"qr_payload":"0041000600000101030040220014…","expected_amount":"500.00","receivers":[{"bank":"KBANK","account_number":"1234567890"}]}'

📖 Ringkasan: memakai key di beberapa situs

KasusPengaturan key (halaman API Keys)Hasil
2 situs (aaa.com, bbb.com) menerima ke rekening yang samaKedua key: Grup A (atau Seluruh akun)Bukti yang lolos di aaa.com mengembalikan DUPLICATE di bbb.com — hanya bisa dipakai di satu situs ✅
2 situs berbagi rekening tetapi key terpisah (default)Kedua key: Hanya key iniSatu bukti lolos di kedua situs ⚠️ pelanggan bisa top-up dua kali — tautkan key
2 situs dengan rekening penerima berbedaHanya key ini (default)Bukti untuk satu situs sudah mengembalikan RECEIVER_MISMATCH di situs lain ✅
2 situs di akun tungkao berbeda (pemilik berbeda) tetapi rekening penerima samaKey tidak bisa ditautkan antar akun tungkaoSatu bukti lolos di keduanya ⚠️ — beli kedua key dari satu akun tungkao lalu tautkan
Satu situs memakai 2 key (mis. situs web + aplikasi)Kedua key: grup yang samaBukti hanya bisa dipakai sekali, dari situs web maupun aplikasi ✅

DUPLICATE terdeteksi langsung dari nomor referensi di QR. Atur di kartu “Perlindungan bukti ganda antar key” pada halaman API Keys (default key baru: hanya key ini).

📚 Contoh penggunaan

Contoh 1

Customer tops up with a matching slip (passes)

Situasi: A customer transfers 500 THB to your account and uploads the slip on your top-up page

Permintaan
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00"
}
Contoh respons
{
  "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

Contoh 2

Send the QR text instead of the image (faster)

Situasi: Your app reads the QR on the slip itself and sends only the QR text

Permintaan
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

Contoh 3

The customer sends the same slip again

Situasi: The customer attaches the same 500 THB slip again to top up twice

Permintaan
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00"
}
Contoh respons
{
  "success": false,
  "status": "DUPLICATE",
  "message": "This slip has already been used"
}

➡️ DUPLICATE → do not credit; tell the customer the slip was already used

Contoh 4

Wrong amount or wrong account

Situasi: The customer paid 300 THB for a 500 THB order, or paid another account

Permintaan
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00",
  "receivers": [
    {
      "bank": "KBANK",
      "account_number": "123-4-56789-0"
    }
  ]
}
Contoh respons
{
  "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

Contoh 5

Slip is too old

Situasi: You only accept slips paid within the last 30 minutes

Permintaan
POST /v1/slip/verify
{
  "image_base64": "<base64 of the slip image>",
  "expected_amount": "500.00",
  "max_age_minutes": 30
}
Contoh respons
{
  "success": false,
  "status": "DATE_MISMATCH"
}

➡️ DATE_MISMATCH when the slip is older than allowed

Contoh 6

Two sites, one receiving account

Situasi: 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

Contoh 7

Every verifier is down

Situasi: All upstream verifiers fail at once (rare; backups are tried first)

Contoh respons
{
  "success": false,
  "status": "SERVICE_UNAVAILABLE"
}

➡️ HTTP 503 and nothing is charged. Ask the customer to retry later, or queue it for manual review

💡 Lainnya

📜 Riwayat pembaruan API ini

  1. Ditambah Waktu Thailand (UTC+07:00)
    Duplicate-slip protection between keys is now configurable: this key only / group A–E / whole account — for several sites that receive into the same account
  2. Ditambah Waktu Thailand (UTC+07:00)
    API update announcements by webhook: new api.update event (opt in per key on the key card; off by default)
  3. Ditambah Waktu Thailand (UTC+07:00)
    error.user_message: ready-to-show text for end users on outages, no credits or key problems (white-label keys omit tungkao.com)
  4. Ditambah Waktu Thailand (UTC+07:00)
    GET /status: status API per layanan (tanpa key)
  5. Ditambah Waktu Thailand (UTC+07:00)
    Sakelar on/off key dengan waktu perubahan + satu key per layanan per situs
  6. Ditingkatkan Waktu Thailand (UTC+07:00)
    API v1 dibekukan permanen (hanya penambahan) + header X-Tungkao-Api-Version + pemberitahuan penghentian 12 bulan
  7. Dokumen Waktu Thailand (UTC+07:00)
    Halaman dokumen per API dengan tautan AI (10 bahasa)
  8. Keamanan Waktu Thailand (UTC+07:00)
    Verifikasi domain per API key (1 key = 1 situs) — key lama tetap berfungsi
  9. Ditambah Waktu Thailand (UTC+07:00)
    Tanda tangan request HMAC opsional — tidak ada yang berubah jika tidak diaktifkan
  10. Ditambah Waktu Thailand (UTC+07:00)
    Masa berlaku API key, pengingat, dan perpanjangan — string key tidak berubah
  11. Ditambah Waktu Thailand (UTC+07:00)
    Key mode test (simulasi, gratis) untuk semua layanan
  12. Baru Waktu Thailand (UTC+07:00)
    Meluncurkan API v1 verifikasi bukti (failover otomatis 3 penyedia)

✅ Kode lama tetap berjalan

🛡️ Janji stabilitas: integrasi sekali, terus berjalan

🚦 Status sistem (GET /status)

Cek kapan saja apakah API normal — tanpa key

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

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

🏷️ Ketentuan mencantumkan kredit TUNGKAO

Powered by TUNGKAO