Developer docs

Dokumentasi API

Endpoint dasar untuk create payment, cek status, payment method, dan webhook signature.

Create Payment

POST /api/v1/payments
X-Public-Key: pk_sandbox_demo
Authorization: Bearer sk_sandbox_demo
Content-Type: application/json

{
  "order_id": "INV-001",
  "amount": 100000,
  "payment_method": "QRIS",
  "customer_name": "Budi"
}

Response

{
  "success": true,
  "transaction_id": "PAY-20260621-AB12",
  "status": "pending",
  "payment_url": "https://domain.com/checkout/PAY-..."
}

Webhook event

{
  "event": "payment.paid",
  "transaction_id": "PAY-20260621-AB12",
  "order_id": "INV-001",
  "amount": 100000,
  "fee": 1500,
  "net_amount": 98500,
  "status": "paid"
}

Error code

401 API key tidak valid
404 Payment tidak ditemukan
422 Payload tidak valid
500 Provider atau routing error