T4TopupH2H API

Mulai cepat

Dari cek profil sampai membuat order pertama.

Panduan singkat supaya integrasi H2H T4Topup bisa jalan dalam hitungan menit.

1. Siapkan kredensial

ItemKeterangan
Base URLhttps://api.t4topup.id/v1/member-api
API keyDiberikan bersama akses H2H Anda
IP serverHarus sudah ada di whitelist

Kirim API key lewat salah satu header:

x-api-key: YOUR_API_KEY

atau

Authorization: Bearer YOUR_API_KEY

2. Cek profil & saldo

curl -sS "https://api.t4topup.id/v1/member-api/profile" \
  -H "x-api-key: YOUR_API_KEY"

Contoh respons:

{
  "member_id": "...",
  "member_name": "Nama Anda",
  "member_role": "RESELLER",
  "member_balance": 150000
}

Jika mendapat IP_NOT_WHITELISTED, daftarkan IP yang tercantum di response ke whitelist.

3. Lihat produk

curl -sS "https://api.t4topup.id/v1/member-api/products?category_code=MLBB" \
  -H "x-api-key: YOUR_API_KEY"

Catat code (atau id) produk yang ingin dipesan.

4. Buat order

curl -sS -X POST "https://api.t4topup.id/v1/member-api/orders" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_code": "MLBB_ID_5",
    "partner_ref": "ORDER-1001",
    "data": {
      "user_id": "348553128",
      "server_id": "943"
    }
  }'

Tips:

  • Selalu kirim partner_ref unik — supaya retry aman (idempotent)
  • Isi data sesuai kebutuhan produk (misalnya user_id + server_id untuk MLBB)
  • Saldo akan dipotong saat order berhasil dibuat

5. Cek status

curl -sS "https://api.t4topup.id/v1/member-api/orders/ORDER-1001" \
  -H "x-api-key: YOUR_API_KEY"

Gunakan partner_ref atau nomor invoice. Untuk update otomatis, lihat Webhook.

Contoh lengkap bahasa lain ada di Contoh kode.

Checklist sukses

  • GET /profile berhasil
  • Produk muncul di GET /products
  • POST /orders mengembalikan invoice_number
  • Saldo berkurang sesuai harga
  • GET /orders/:ref menampilkan status terkini

On this page