Payments API
Once an escrow is created, the buyer pays through the hosted checkout at escrow_url. These endpoints back that flow — you typically don't call them directly, but they're documented here for completeness.
Endpoints
| Method | Path | Auth | Idempotent |
|---|---|---|---|
GET | /api/gateways/available-methods | none | — |
POST | /api/escrows/:id/pay | session cookie | Yes |
List the payment methods currently enabled for production traffic. Updates in near real-time as RekberPay enables/disables gateways.
Request
GET /api/gateways/available-methodsResponse
200 OK
{
"success": true,
"data": [
{
"provider": "qris_manual",
"display_name": "QRIS Manual",
"supported_methods": ["qris"],
"is_manual": true,
"config": {
"qris_image_url": "https://api.rekberpay.com/uploads/qris/sample.png"
},
"fee_percent": 0,
"fee_fixed": 0
},
{
"provider": "paymento",
"display_name": "Crypto Paymento",
"supported_methods": ["crypto", "qris", "bank_transfer"],
"is_manual": false,
"fee_percent": 0.5,
"fee_fixed": 0
}
]
}| Field | Type | Description |
|---|---|---|
provider | string | Gateway provider name, passed to POST /pay |
display_name | string | Localized name for the buyer |
supported_methods | array | Array of string methods e.g. ["qris", "bank_transfer", "crypto"] |
is_manual | boolean | True if this is a manual settlement gateway |
config | object | null | Configuration for manual methods (images, bank accounts) |
fee_percent | number | Percentage surcharge fee (e.g., 0.5 represents 0.5%) |
fee_fixed | number | Flat surcharge fee in IDR (rupiah) |
If a gateway is in maintenance or disabled by admins, it's omitted from this list. The hosted checkout uses the same data, so what you see here is exactly what the buyer sees.
Initiate payment with a chosen method. Called by the buyer's session, not by partners directly. Documented for transparency.
Authentication: session cookie (set when buyer logs in / signs up) Idempotency: supported via Idempotency-Key header
Request
POST /api/escrows/7f8a9b0c-.../pay
Content-Type: application/json
Cookie: rekberpay_session=...
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000Body
| Field | Type | Required | Description |
|---|---|---|---|
method | string | Yes | One of qris, bank_transfer, gopay, shopeepay, crypto |
provider | string | — | Specific gateway provider (optional; auto-selected if omitted) |
Example
{
"method": "qris",
"provider": "qris_manual"
}Response
201 Created
{
"success": true,
"data": {
"payment_link_id": "pay_8f9a0b1c2d3e4f5a6b7c8d9e",
"gateway_order_id": "RBP-7f8a9b0c-1781234567890-a1b2",
"method": "crypto",
"provider": "paymento",
"payment_url": "https://app.paymento.io/gateway?token=...",
"qr_code_url": null,
"va_number": null,
"va_bank": null,
"deep_link_url": null,
"expires_at": "2026-05-18T07:30:00.000Z",
"amount": 22612500,
"escrow_amount": 22500000,
"surcharge": 112500
}
}| Field | Type | Description |
|---|---|---|
payment_link_id | string | Internal payment ID |
gateway_order_id | string | Gateway-side order ID |
method | string | Echo of the method |
provider | string | The specific provider selected |
payment_url | URL | null | URL to redirect for hosted gateway flows |
qr_code_url | URL | null | QR code URL (for QRIS) |
va_number | string | null | Virtual Account number (if applicable) |
va_bank | string | null | Virtual Account bank name (if applicable) |
deep_link_url | URL | null | Deep link for mobile wallets (if applicable) |
expires_at | ISO 8601 | When this payment session expires |
amount | integer | Total amount to be paid (base escrow amount + gateway surcharge) |
escrow_amount | integer | Base escrow amount |
surcharge | integer | Surcharge fee (configured percentage/fixed additional gateway fee) |
QRIS codes generally expire after 15 minutes. If the buyer takes longer, generate a new payment by retrying the call (with a fresh Idempotency-Key).
Errors
| Status | Code | Cause |
|---|---|---|
400 | MISSING_METHOD | Payment method is required |
400 | UNSUPPORTED_METHOD | No enabled gateway supports this method |
401 | UNAUTHORIZED | Buyer not logged in |
403 | NOT_BUYER | Logged-in user isn't the escrow's buyer |
404 | ESCROW_NOT_FOUND | No such escrow |
409 | INVALID_STATE | Escrow already paid or cancelled |
502 | GATEWAY_ERROR | Payment gateway returned an error |
503 | NO_GATEWAYS | No payment gateways are enabled |
503 | ADAPTER_NOT_LOADED | Gateway adapter is configured but not loaded |
See also
- Reference: Escrows — escrow creation and status
- Reference: Webhooks —
payment.completedevent - Guide: Creating escrows — full lifecycle