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

TUNGKAO API

Deposit bukti transfer

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_deposit

Deposit bukti transfer

Isi saldo pengguna: memeriksa bukti, mencatat deposit pengguna itu, dan memberi tahu situs lewat webhook.

🕒 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_deposit.md?lang=id
https://api.tungkao.com/changelog/slip_deposit.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_deposit 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. Atur rekening penerima dan URL webhook pada key di portal.
  2. Kirim bukti dengan customer_ref (ID pengguna Anda).
  3. Saat webhook deposit.succeeded (verifikasi tanda tangannya) tambahkan saldo pengguna.

📡 Panggilan API + contoh kode

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

Verifikasi tanda tangan webhook

Setiap webhook membawa X-Tungkao-Signature: t=…,v1=…. Verifikasi sebelum memercayai data (secret webhook tampil saat Anda mengatur URL).

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]));
}

📚 Contoh penggunaan

Contoh 1

Credit a member's deposit

Situasi: Member member-1001 deposits 300 THB and attaches the slip

Permintaan
POST /v1/deposits/slip
{
  "image_base64": "<base64 of the slip image>",
  "customer_ref": "member-1001",
  "expected_amount": "300.00"
}
Contoh respons
{
  "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

Contoh 2

Attach your own data to the deposit

Situasi: You want to know which promotion the deposit came from

Permintaan
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

Contoh 3

Receive the result by webhook

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

Contoh 4

Check a deposit later

Situasi: Your site missed the webhook or wants to re-check

Permintaan
GET /v1/deposits/dep_8f2c…
Contoh respons
{
  "success": true,
  "data": {
    "deposit_id": "dep_8f2c…",
    "status": "succeeded"
  }
}

➡️ succeeded = credit · failed = rejected · pending = wait

Contoh 5

Member resubmits the same slip

Situasi: A member tries to deposit again with the same slip

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

➡️ DUPLICATE; no new deposit is created

📜 Riwayat pembaruan API ini

  1. 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)
  2. 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)
  3. Ditambah Waktu Thailand (UTC+07:00)
    GET /status: status API per layanan (tanpa key)
  4. Ditambah Waktu Thailand (UTC+07:00)
    Sakelar on/off key dengan waktu perubahan + satu key per layanan per situs
  5. Ditingkatkan Waktu Thailand (UTC+07:00)
    API v1 dibekukan permanen (hanya penambahan) + header X-Tungkao-Api-Version + pemberitahuan penghentian 12 bulan
  6. Dokumen Waktu Thailand (UTC+07:00)
    Halaman dokumen per API dengan tautan AI (10 bahasa)
  7. Keamanan Waktu Thailand (UTC+07:00)
    Verifikasi domain per API key (1 key = 1 situs) — key lama tetap berfungsi
  8. Ditambah Waktu Thailand (UTC+07:00)
    Tanda tangan request HMAC opsional — tidak ada yang berubah jika tidak diaktifkan
  9. Ditambah Waktu Thailand (UTC+07:00)
    Masa berlaku API key, pengingat, dan perpanjangan — string key tidak berubah
  10. Ditambah Waktu Thailand (UTC+07:00)
    Key mode test (simulasi, gratis) untuk semua layanan
  11. Baru Waktu Thailand (UTC+07:00)
    Meluncurkan deposit bukti transfer dengan webhook

✅ 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