PayGet API Documentation

Complete API reference for PayGet integration

GET Get Profile

Mendapatkan detail profil pengguna berdasarkan API Key

/api/profile
Authentication
Type Key Value
Header x-api-key YOUR_API_KEY
Query Param apiKey YOUR_API_KEY
Example Request
GET /api/profile HTTP/1.1 Host: https://payget.sakuin.id x-api-key: YOUR_API_KEY
Success Response (200)
{ "success": true, "profile": { "username": "john_doe", "level": "member", "balance": 100000 } }
Error Responses
{ "success": false, "message": "API Key is required." }

{ "success": false, "message": "Invalid API Key." }
POST Withdraw

Mengajukan permintaan penarikan dana

/api/withdraw
Authentication
Type Key Value
Header x-api-key YOUR_API_KEY
Header Content-Type application/json
Body Parameters
Parameter Type Required Description
paymentMethod string Required DANA, SHOPEEPAY, GOPAY, OVO
amount number Required Minimal 10000
phoneNumber string Required Nomor telepon untuk pembayaran
Example Request
POST /api/withdraw HTTP/1.1 Host: https://payget.sakuin.id x-api-key: YOUR_API_KEY Content-Type: application/json { "paymentMethod": "DANA", "amount": 50000, "phoneNumber": "081234567890" }
Success Response (200)
{ "success": true, "message": "Withdrawal request submitted successfully.", "withdrawal": { "id": "a1b2c3d4", "amount": 50000, "bankFee": 300, "profitFee": 500, "totalFee": 800, "finalAmount": 49200, "status": "Pending" } }
Fee Structure:
  • Dana: Fee bank 300 + 1% keuntungan
  • ShopeePay: Fee bank 650 + 1% keuntungan
  • GoPay/OVO: Fee bank 800 + 1% keuntungan
  • Jumlah minimal penarikan: Rp 10.000
  • Status: Pending sampai disetujui admin
POST Create Payment

Membuat permintaan pembayaran (top up saldo)

/api/payment
Authentication
Type Key Value
Header x-api-key YOUR_API_KEY
Header Content-Type application/json
Body Parameters
Parameter Type Required Description
amount number Required Minimal 1000
Example Request
POST /api/payment HTTP/1.1 Host: https://payget.sakuin.id x-api-key: YOUR_API_KEY Content-Type: application/json { "amount": 50000 }
Success Response (200)
{ "success": true, "message": "Payment request created successfully.", "payment": { "id": "a1b2c3d4e5f6g7h8", "amount": 50000, "fee": 350, "finalAmount": 50350, "qris": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...", "exp": "2024-01-15T10:33:00.000Z", "status": "Pending" } }
Fee Structure:
  • Fee 0.8% hanya untuk amount >= Rp 500.000
  • Tidak ada fee untuk amount < Rp 500.000
  • Jumlah minimal: Rp 100
  • Payment expired dalam 5 menit
  • QRIS code dalam format base64
GET Payment Status

Mengecek status pembayaran berdasarkan Payment ID

/api/payment-status/:id
Path Parameters
Parameter Type Required Description
id string Required Payment ID yang ingin dicek
Example Request
GET /api/payment-status/a1b2c3d4e5f6g7h8 HTTP/1.1 Host: https://payget.sakuin.id
Success Response (200)
{ "success": true, "status": "Pending", "id": "a1b2c3d4e5f6g7h8", "amount": 50000 }
Status Payment:
  • Pending: Menunggu konfirmasi
  • Success: Berhasil dikonfirmasi
  • Completed: Selesai, saldo sudah ditambahkan
  • Cancelled: Dibatalkan
  • Expired: Kadaluarsa (lebih dari 5 menit)