Dokumentasi API

Selamat datang di dokumentasi resmi ZullPay API. Layanan ini memungkinkan Anda membuat sistem pembayaran otomatis (QRIS Instant) untuk aplikasi atau website Anda.

Base URL

https://pg.chestcloudx.my.id/api/payment

Autentikasi

Setiap permintaan wajib menyertakan parameter apikey. Jaga kerahasiaan kunci ini.

apikey=LOGIN_UNTUK_LIHAT_KEY

1. Buat Pembayaran (Deposit)

Endpoint ini digunakan untuk membuat tagihan baru (QRIS). Sistem akan mengembalikan URL QR Code dan data transaksi.

POST https://pg.chestcloudx.my.id/api/payment/deposit

Parameter Header

KeyValueWajib?
Content-Typeapplication/jsonYa

Parameter Body (JSON)

FieldTipeDeskripsi
amountNumberJumlah deposit (Min. 5000). Contoh: 10000
feeNumberBiaya admin tambahan (Opsional). Contoh: 500

Contoh Request

curl -X POST 'https://pg.chestcloudx.my.id/api/payment/deposit?apikey=LOGIN_UNTUK_LIHAT_KEY' \
-H 'Content-Type: application/json' \
-d '{
    "amount": "10000",
    "fee": "500"
}'

Respon Sukses (200 OK)

{
  "status": "success",
  "message": "Permintaan deposit berhasil dibuat.",
  "data": {
    "orderId": "ORD-54af-1762872744352",
    "baseAmount": 10000,
    "adminFee": 500,
    "uniqueCode": 59,
    "amountToPay": 10559,
    "qrCodeUrl": "https://pg.chestcloudx.my.id/qr/ORD-54af.png",
    "expiryTime": "2026-05-05T16:24:00+07:00"
  }
}

2. Cek Status (Polling)

Gunakan endpoint ini untuk mengecek status pembayaran secara berkala (Realtime). Lakukan request setiap 10–30 detik.

⚠️ Wajib menyertakan API Key.

GET https://pg.chestcloudx.my.id/api/payment/status/{orderId}?apikey=...

Contoh Request

curl -X GET 'https://pg.chestcloudx.my.id/api/payment/status/ORD-12345?apikey=LOGIN_UNTUK_LIHAT_KEY'

Respon: Lunas (Settlement)

{
  "_id": "6729c1d0f1a...",
  "orderId": "ORD-54af-1762254576493",
  "status": "settlement",
  "amount": 10559,
  "mutationId": "180027946",
  "paymentId": "QR-Z8L8I61O",
  "updatedAt": "2026-05-05T11:10:05.120Z"
}

Respon: Menunggu (Pending)

{
  "orderId": "ORD-54af-1762254576493",
  "status": "pending",
  "updatedAt": "2026-05-05T11:09:36.500Z"
}

3. Update Status (Cancel/Expire)

Endpoint ini berguna jika User membatalkan pembayaran di frontend Anda, atau timer waktu habis.

⚠️ Wajib menyertakan API Key.

POST https://pg.chestcloudx.my.id/api/payment/update-status?apikey=...

Parameter Body (JSON)

FieldTipeDeskripsi
orderIdStringID Order yang didapat saat membuat deposit.
newStatusStringPilih: cancel atau expire

Contoh Request

curl -X POST 'https://pg.chestcloudx.my.id/api/payment/update-status?apikey=LOGIN_UNTUK_LIHAT_KEY' \
-H 'Content-Type: application/json' \
-d '{
    "orderId": "ORD-12345",
    "newStatus": "cancel"
}'

4. Endpoint Tambahan

Selain endpoint payment di atas, ZullPay menyediakan endpoint lain untuk auth, user, withdrawal, dan admin.

POST /api/auth/register
{ "user_id":"namauser", "username":"Nama", "password":"min6char", "email":"x@y.com" }
POST /api/auth/login
{ "user_id":"namauser", "password":"passwd" }
GET /api/user/me?apikey=...
POST /api/user/regenerate-key?apikey=...
GET /api/payment/history?apikey=...
POST /api/withdrawals/request?apikey=...
{ "amount":50000, "bankName":"BCA", "accountNumber":"123", "accountName":"Nama" }
GET /api/notifications?apikey=...
POST /api/notifications/mark-read?apikey=...
{ "id": 123 }
GET /api/admin/stats?apikey=ADMIN_KEY
GET /api/admin/transactions?apikey=ADMIN_KEY
GET /api/admin/users?apikey=ADMIN_KEY
POST /api/admin/users/update-role?apikey=ADMIN_KEY
{ "userId":1, "newRole":"admin" }
POST /api/admin/withdrawals/process?apikey=ADMIN_KEY
{ "withdrawalId":1, "action":"completed" }
POST /api/admin/notifications/send?apikey=ADMIN_KEY
{ "targetUserId":"all", "title":"Info", "message":"..." }