Files
api-wipay/ENDPOINT_COMPARISON.md

6.7 KiB

Perbandingan Endpoint API Lama vs API Baru

Dokumen ini membandingkan endpoint antara timo.wipay.id (CodeIgniter) dengan timo.wipay.id_api (Slim 4).

Format URL

API Lama (CodeIgniter)

  • Base URL: http://timo.wipay.id/index.php/timo/{method}
  • Atau dengan rewrite: http://timo.wipay.id/timo/{method}

API Baru (Slim 4)

  • Base URL: http://localhost:8000/timo/{method}
  • Atau production: http://timo.wipay.id_api/timo/{method}

Perbandingan Endpoint

Authentication Endpoints

Method API Lama API Baru Status
Registrasi POST /timo/daftar POST /timo/daftar SAMA
Login POST /timo/login POST /timo/login SAMA
Login Token POST /timo/login_token POST /timo/login_token SAMA
Update Akun POST /timo/update_akun POST /timo/update_akun SAMA
Update Password POST /timo/update_password POST /timo/update_password SAMA

SL Management Endpoints

Method API Lama API Baru Status
Cek SL POST /timo/cek_sl POST /timo/cek_sl SAMA
Confirm SL POST /timo/confirm_sl POST /timo/confirm_sl SAMA
Hapus SL POST /timo/hapus_sl POST /timo/hapus_sl SAMA

Tagihan Endpoints

Method API Lama API Baru Status
History Tagihan GET /timo/history/{sl}/{periode} GET /timo/history/{sl}/{periode} SAMA
Tagihan Saat Ini GET /timo/tagihan/{sl} GET /timo/tagihan/{sl} SAMA

Pembayaran Endpoints

Method API Lama API Baru Status
Request Pembayaran POST /timo/request_pembayaran POST /timo/request_pembayaran SAMA
Cek Pembayaran POST /timo/cek_pembayaran POST /timo/cek_pembayaran SAMA
Cek Transfer POST /timo/cek_transfer POST /timo/cek_transfer SAMA
Batal Pembayaran POST /timo/batal_pembayaran POST /timo/batal_pembayaran SAMA
Confirm Pembayaran POST /timo/confirm_pembayaran POST /timo/confirm_pembayaran SAMA
History Bayar POST /timo/history_bayar POST /timo/history_bayar SAMA

Laporan Endpoints

Method API Lama API Baru Status
Jenis Laporan POST /timo/jenis_laporan POST /timo/jenis_laporan SAMA
History Gangguan POST /timo/history_gangguan POST /timo/history_gangguan SAMA

WIPAY Endpoints

Method API Lama API Baru Status
Cek WIPAY POST /timo/cek_wipay POST /timo/cek_wipay SAMA
Buat Kode POST /timo/buat_kode POST /timo/buat_kode SAMA
Cek Kode POST /timo/cek_kode POST /timo/cek_kode SAMA
Reset Kode POST /timo/reset_kode POST /timo/reset_kode SAMA

Note: Di API lama, buat_kode, cek_kode, reset_kode digunakan untuk reset password. Di API baru juga sama.

Other Endpoints

Method API Lama API Baru Status
Promo POST /timo/promo POST /timo/promo SAMA
Riwayat Pasang POST /timo/riwayat_pasang POST /timo/riwayat_pasang SAMA
Jadwal Catat Meter POST /timo/jadwal_catat_meter POST /timo/jadwal_catat_meter SAMA
Request Order Baca Mandiri POST /timo/request_order_baca_mandiri POST /timo/request_order_baca_mandiri SAMA

Upload Endpoints

Method API Lama API Baru Status
Upload Catat Meter POST /timo/upload_catat_meter POST /timo/upload_catat_meter SAMA
Upload PP POST /timo/upload_pp POST /timo/upload_pp SAMA
Hapus PP POST /timo/hapus_pp POST /timo/hapus_pp SAMA
Upload Gangguan POST /timo/upload_gangguan POST /timo/upload_gangguan SAMA
Upload Pasang Baru POST /timo/upload_pasang_baru POST /timo/upload_pasang_baru SAMA
Upload Bukti Transfer POST /timo/upload_bukti_transfer POST /timo/upload_bukti_transfer SAMA
Upload Baca Mandiri POST /timo/upload_baca_mandiri POST /timo/upload_baca_mandiri SAMA

External API Endpoints

Method API Lama API Baru Status
API Mandiri GET /api/mandiri/{tanggal} GET /api/mandiri/{tanggal} SAMA
Fast Test GET /fast/test GET /fast/test SAMA
Fast Check Bill POST /fast/check_bill POST /fast/check_bill SAMA
Fast Process Payment POST /fast/process_payment POST /fast/process_payment SAMA
Fast Process Payment GET GET /fast/process_payment_get GET /fast/process_payment_get SAMA
Fast Payment Status GET /fast/payment_status GET /fast/payment_status SAMA
Fast Payment Status POST POST /fast/payment_status POST /fast/payment_status SAMA
Fast Check WIPAY Saldo GET /fast/check_wipay_saldo GET /fast/check_wipay_saldo SAMA
Fast Check WIPAY Saldo POST POST /fast/check_wipay_saldo POST /fast/check_wipay_saldo SAMA
Fast Check WIPAY Saldo GET GET /fast/check_wipay_saldo_get GET /fast/check_wipay_saldo_get SAMA
Fast Mandiri GET /fast/mandiri/{tanggal} GET /fast/mandiri/{tanggal} SAMA
Site Verify BRI POST /site/verify_bri POST /site/verify_bri SAMA
Site Approve POST /site/approve/{id_trx} POST /site/approve/{id_trx} SAMA

Summary

SEMUA ENDPOINT SUDAH SAMA!

  • Total endpoint internal: 33 endpoint
  • Total endpoint external: 13 endpoint
  • Total: 46 endpoint - Semua sudah sesuai dengan API lama

Perbedaan Struktur (Bukan Endpoint)

API Lama (CodeIgniter)

  • Routing: Controller/Method based
  • URL: /timo/{method} atau /index.php/timo/{method}
  • Parameter: POST body atau URL parameter

API Baru (Slim 4)

  • Routing: Explicit route definition
  • URL: /timo/{method} (sama)
  • Parameter: POST body atau URL parameter (sama)

Kesimpulan

URL endpoint 100% sama dengan API lama

Tidak ada perubahan endpoint, sehingga:

  • Client/mobile app tidak perlu diubah
  • Backward compatible
  • Drop-in replacement untuk API lama

Catatan Penting

  1. Base URL berbeda (karena folder berbeda):

    • Lama: http://timo.wipay.id/timo/...
    • Baru: http://timo.wipay.id_api/timo/... (atau sesuai konfigurasi server)
  2. Response format sama - Sudah diverifikasi identik

  3. Payload format sama - Sudah diverifikasi identik

  4. Authentication sama - Token user untuk internal API, API Key untuk external API