Skip to content

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

MethodPathAuthIdempotent
GET/api/gateways/available-methodsnone
POST/api/escrows/:id/paysession cookieYes

GET/api/gateways/available-methods

List the payment methods currently enabled for production traffic. Updates in near real-time as RekberPay enables/disables gateways.

Request

http
GET /api/gateways/available-methods

Response

200 OK

json
{
    "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
        }
    ]
}
FieldTypeDescription
providerstringGateway provider name, passed to POST /pay
display_namestringLocalized name for the buyer
supported_methodsarrayArray of string methods e.g. ["qris", "bank_transfer", "crypto"]
is_manualbooleanTrue if this is a manual settlement gateway
configobject | nullConfiguration for manual methods (images, bank accounts)
fee_percentnumberPercentage surcharge fee (e.g., 0.5 represents 0.5%)
fee_fixednumberFlat 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.


POST/api/escrows/:id/pay

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

http
POST /api/escrows/7f8a9b0c-.../pay
Content-Type: application/json
Cookie: rekberpay_session=...
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

Body

FieldTypeRequiredDescription
methodstringYesOne of qris, bank_transfer, gopay, shopeepay, crypto
providerstringSpecific gateway provider (optional; auto-selected if omitted)

Example

json
{
    "method": "qris",
    "provider": "qris_manual"
}

Response

201 Created

json
{
    "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
    }
}
FieldTypeDescription
payment_link_idstringInternal payment ID
gateway_order_idstringGateway-side order ID
methodstringEcho of the method
providerstringThe specific provider selected
payment_urlURL | nullURL to redirect for hosted gateway flows
qr_code_urlURL | nullQR code URL (for QRIS)
va_numberstring | nullVirtual Account number (if applicable)
va_bankstring | nullVirtual Account bank name (if applicable)
deep_link_urlURL | nullDeep link for mobile wallets (if applicable)
expires_atISO 8601When this payment session expires
amountintegerTotal amount to be paid (base escrow amount + gateway surcharge)
escrow_amountintegerBase escrow amount
surchargeintegerSurcharge fee (configured percentage/fixed additional gateway fee)
Don't display QRIS codes longer than 15 minutes

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

StatusCodeCause
400MISSING_METHODPayment method is required
400UNSUPPORTED_METHODNo enabled gateway supports this method
401UNAUTHORIZEDBuyer not logged in
403NOT_BUYERLogged-in user isn't the escrow's buyer
404ESCROW_NOT_FOUNDNo such escrow
409INVALID_STATEEscrow already paid or cancelled
502GATEWAY_ERRORPayment gateway returned an error
503NO_GATEWAYSNo payment gateways are enabled
503ADAPTER_NOT_LOADEDGateway adapter is configured but not loaded

See also

Released under the proprietary RekberPay license. Built for Indonesian merchants.