API v2 is in alpha and may change at any time. Use v1 for production.
Guides

Errors

v1 response envelope

Every v1 response looks like this:

JSONCode
{ "status": "success", "code": 200, "message": "…", "data": { } }

Errors use "status": "error". Validation errors add an errors object keyed by field:

JSONCode
{ "status": "error", "code": 422, "message": "Validasi gagal", "errors": { "0.packageCode": ["The 0.packageCode field is required."] } }

message is meant for logs and may be in Indonesian. Branch on the HTTP status, not on the message text.

Status codes

CodeMeaning
200Done
202Accepted, finishing in the background (top-ups, and v2 purchases)
400Missing input, insufficient balance, or the action isn't allowed in this state
401X-API-KEY header missing
403API key invalid
404Not found, or it doesn't belong to your account
409That transaction_id is still being processed (v2: or it was used for a different request)
422Validation failed, or the eSIM has expired (error_type: ESIM_EXPIRED)
500Failed. For checkout, your balance was refunded and you can retry with the same transaction_id.
503Temporarily unavailable. Nothing was charged. Retry.
Last modified on