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." }
API Playground
Response:
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 30 menit
  • QRIS code dalam format base64
API Playground
Response:
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
  • Expired: Kadaluarsa (lebih dari 30 menit)
API Playground
Response: