Autentikasi
Tiga skema, tergantung endpoint:
Session cookie — login via POST /api/v1/auth/login lalu kirim cookie session untuk endpoint commerce/admin.X-Api-Key — RECEH: header X-Api-Key: robpay_… (fallback query ?api_key=).Bearer — RECEH notify: Authorization: Bearer <notify_token> dari aplikasi HP merchant.HMAC — RECEH webhook: header X-Signature / X-Timestamp / X-Nonce (HMAC-SHA256 atas timestamp.nonce.body).License key — endpoint lisensi memakai key plaintext (SHA-256 di server) + device fingerprint.
Semua respons sukses berbentuk { "success": true, ... }; error berbentuk { "success": false, "error": "…" } dengan HTTP status yang sesuai.
health
GET/api/v1/openapi.json
Responses
| Kode | Keterangan |
|---|
200 | this document |
Contoh
curl -s https://robrion.ai.id/api/v1/openapi.json
GET/health/live
Responses
| Kode | Keterangan |
|---|
200 | liveness |
Contoh
curl -s https://robrion.ai.id/health/live
GET/health/ready
Responses
| Kode | Keterangan |
|---|
200 | readiness + store counts |
Contoh
curl -s https://robrion.ai.id/health/ready
catalog
GET/api/v1/catalog/plans
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
product | query | tidak | string |
Responses
Contoh
curl -s https://robrion.ai.id/api/v1/catalog/plans
GET/api/v1/catalog/products
Responses
| Kode | Keterangan |
|---|
200 | product registry (KEISEI, RECEH, AKINAI, KHANSI) |
Contoh
curl -s https://robrion.ai.id/api/v1/catalog/products
GET/api/v1/catalog/products/{key}
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
key | path | ya | string: keisei | receh | akinai | khansi |
Responses
| Kode | Keterangan |
|---|
200 | product + plans |
404 | not found |
Contoh
curl -s https://robrion.ai.id/api/v1/catalog/products/receh
POST/api/v1/leads
Contoh
curl -s -X post https://robrion.ai.id/api/v1/leads \
-H 'Content-Type: application/json' \
-d '{}'
auth
POST/api/v1/auth/login
Contoh
curl -s -X post https://robrion.ai.id/api/v1/auth/login \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/v1/auth/logout
Responses
Contoh
curl -s -X post https://robrion.ai.id/api/v1/auth/logout \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/v1/auth/register
Contoh
curl -s -X post https://robrion.ai.id/api/v1/auth/register \
-H 'Content-Type: application/json' \
-d '{}'
GET/api/v1/me
Responses
| Kode | Keterangan |
|---|
200 | current user + organizations |
401 | unauthorized |
Contoh
curl -s https://robrion.ai.id/api/v1/me
GET/api/v1/organizations
Responses
| Kode | Keterangan |
|---|
200 | my organizations |
Contoh
curl -s https://robrion.ai.id/api/v1/organizations
commerce
GET/api/v1/invoices
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | invoices |
Contoh
curl -s https://robrion.ai.id/api/v1/invoices
GET/api/v1/licenses
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | licenses |
Contoh
curl -s https://robrion.ai.id/api/v1/licenses
POST/api/v1/licenses/{id}/activate
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | activation counted against seats |
422 | seat limit or license not active |
Contoh
curl -s -X post https://robrion.ai.id/api/v1/licenses/00000000-0000-0000-0000-000000000000/activate \
-H 'Content-Type: application/json' \
-d '{}'
GET/api/v1/orders
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | my tenant orders |
Contoh
curl -s https://robrion.ai.id/api/v1/orders
POST/api/v1/orders
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
Idempotency-Key | header | ya | string |
X-Org-Id | header | tidak | string |
Contoh
curl -s -X post https://robrion.ai.id/api/v1/orders \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/v1/orders/{id}/pay
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | paid: order + invoice + licenses + subscriptions |
Contoh
curl -s -X post https://robrion.ai.id/api/v1/orders/00000000-0000-0000-0000-000000000000/pay \
-H 'Content-Type: application/json' \
-d '{}'
GET/api/v1/products/{key}/adapter
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | capabilities + entitlement for this tenant |
Contoh
curl -s https://robrion.ai.id/api/v1/products/receh/adapter
GET/api/v1/subscriptions
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | subscriptions |
Contoh
curl -s https://robrion.ai.id/api/v1/subscriptions
GET/api/v1/support/tickets
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Org-Id | header | ya | string |
Responses
Contoh
curl -s https://robrion.ai.id/api/v1/support/tickets
POST/api/v1/support/tickets
Contoh
curl -s -X post https://robrion.ai.id/api/v1/support/tickets \
-H 'Content-Type: application/json' \
-d '{}'
admin
GET/api/v1/admin/audit
Responses
| Kode | Keterangan |
|---|
200 | last 100 audit events |
Contoh
curl -s https://robrion.ai.id/api/v1/admin/audit
GET/api/v1/admin/customers
Responses
| Kode | Keterangan |
|---|
200 | organizations |
Contoh
curl -s https://robrion.ai.id/api/v1/admin/customers
GET/api/v1/admin/overview
Responses
| Kode | Keterangan |
|---|
200 | real counts from store |
403 | admin only |
Contoh
curl -s https://robrion.ai.id/api/v1/admin/overview
POST/api/v1/admin/products/{key}/status
Contoh
curl -s -X post https://robrion.ai.id/api/v1/admin/products/receh/status \
-H 'Content-Type: application/json' \
-d '{}'
webhooks
POST/api/v1/webhooks/{provider}
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
X-Signature | header | tidak | string |
Contoh
curl -s -X post https://robrion.ai.id/api/v1/webhooks/dana \
-H 'Content-Type: application/json' \
-d '{}'
licenses
GET/api/admin/licenses
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
status | query | tidak | string |
product | query | tidak | string |
Responses
| Kode | Keterangan |
|---|
200 | all licenses (admin) |
Contoh
curl -s https://robrion.ai.id/api/admin/licenses
DELETE/api/license/activations
Responses
Contoh
curl -s https://robrion.ai.id/api/license/activations
GET/api/license/activations
Parameters
| Nama | Lokasi | Wajib | Tipe |
|---|
licenseId | query | ya | string |
Responses
| Kode | Keterangan |
|---|
200 | activations of my license |
403 | not yours |
Contoh
curl -s https://robrion.ai.id/api/license/activations
POST/api/license/heartbeat
Responses
| Kode | Keterangan |
|---|
200 | ok + status + expires |
403 | not activated / suspended |
410 | expired |
Contoh
curl -s -X post https://robrion.ai.id/api/license/heartbeat \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/license/validate
Responses
| Kode | Keterangan |
|---|
200 | Ed25519 token 2-part, 24 jam |
403 | invalid/revoked/expired |
409 | device bound to another license / activation limit |
503 | signing not configured |
Contoh
curl -s -X post https://robrion.ai.id/api/license/validate \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/license/verify
Responses
| Kode | Keterangan |
|---|
200 | valid + licenseId + expires |
403 | invalid/revoked/expired (generic) |
Contoh
curl -s -X post https://robrion.ai.id/api/license/verify \
-H 'Content-Type: application/json' \
-d '{}'
GET/api/licenses
Responses
| Kode | Keterangan |
|---|
200 | my licenses (key_hint only, never plaintext) |
Contoh
curl -s https://robrion.ai.id/api/licenses
POST/api/licenses
Responses
| Kode | Keterangan |
|---|
201 | created - plaintext key returned ONCE |
403 | admin only |
Contoh
curl -s -X post https://robrion.ai.id/api/licenses \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/licenses/activate
Responses
| Kode | Keterangan |
|---|
200 | legacy JWT 3-part + features + plan |
401 | {detail: invalid_key} |
403 | {detail: revoked|license_expired|max_installs_reached} |
429 | rate limited |
Contoh
curl -s -X post https://robrion.ai.id/api/licenses/activate \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/licenses/check
Responses
| Kode | Keterangan |
|---|
200 | {status: active|expired|revoked|license_expired} |
401 | {detail: invalid_token} |
Contoh
curl -s -X post https://robrion.ai.id/api/licenses/check \
-H 'Content-Type: application/json' \
-d '{}'
POST/api/licenses/deactivate
Responses
| Kode | Keterangan |
|---|
200 | {ok: true, install_id} |
401 | {detail: invalid_key} |
Contoh
curl -s -X post https://robrion.ai.id/api/licenses/deactivate \
-H 'Content-Type: application/json' \
-d '{}'
GET/api/licenses/public-key
Responses
| Kode | Keterangan |
|---|
200 | {kty, crv, x, pem} legacy Ed25519 public key |
503 | legacy signing not configured |
Contoh
curl -s https://robrion.ai.id/api/licenses/public-key
PATCH/api/licenses/{id}
Responses
| Kode | Keterangan |
|---|
200 | status updated |
Contoh
curl -s -X patch https://robrion.ai.id/api/licenses/00000000-0000-0000-0000-000000000000 \
-H 'Content-Type: application/json' \
-d '{}'
RECEH — QRIS Gateway
Ringkasan endpoint RECEH (di luar OpenAPI di atas)
Gateway QRIS port Robpay. Semua rute di bawah dilayani di https://pay.robrion.ai.id (dan apex). Nominal dalam rupiah (integer minor), fee dihitung server.
Buat order QRIS
curl -s -X POST https://pay.robrion.ai.id/create-qris?account=dana-1 \
-H 'X-Api-Key: robpay_...' -H 'Content-Type: application/json' \
-d '{"amount": 10000}'
Respons: qris_id, trx_id, amount (nominal + fee unik), qris_code (payload EMVCo), qris_url (halaman checkout), expires_in: "5 menit".
Cek status order
curl -s 'https://pay.robrion.ai.id/api/qr-status?qris_id=<id>&account=dana-1'
Notifikasi HP (dari APK RECEH Notify)
curl -s -X POST https://pay.robrion.ai.id/notify/dana-1 \
-H 'Authorization: Bearer <notify_token>' \
-d '{"amount": 10100, "text": "DANA ...", "notified_at": 1794735900}'
Matching FIFO berdasarkan jumlah persis + order PENDING terlama. Replay aman: tidak ada double-settle.
Webhook settlement (HMAC)
curl -s -X POST https://pay.robrion.ai.id/webhook/dana-1 \
-H 'X-Signature: <hmac>' -H 'X-Timestamp: <unix>' -H 'X-Nonce: <unik>' \
-d '{"qris_id": "...", "amount": 10100}'
Signature = HMAC-SHA256(webhook_secret, timestamp.nonce.raw_body), nonce sekali pakai, toleransi ±300 detik.
Halaman checkout
GET /qr/{account}/{qris_id} — halaman bayar dengan QR, countdown 5 menit, polling status tiap 250ms, auto-redirect ke /done saat lunas.
ROBRION API v0.1.0 — spesifikasi: openapi.json