Get started
Authentication
Authenticate every request with a secret key sent as a Bearer token. Keys are scoped, optionally IP-restricted, and can be rotated without downtime.
Bearer secret keys#
Send your key in the Authorization header. Keys look like sk_test_ or sk_live_ followed by 40 alphanumeric characters. Missing, malformed, revoked or expired keys return 401 INVALID_API_KEY.
curl https://pay-with-araf.onrender.com/api/v1/applications/ARAF-2026-000002 \
-H "Authorization: Bearer $ARAF_SECRET_KEY"Create keys in Partner portal → Integration → API keys (requires the Manage API credentials and webhooks permission). The full secret is shown once, at creation; afterwards only its prefix and last four characters are visible.
Scopes#
Each key carries one or more scopes. A request outside the key’s scopes fails with 403 INSUFFICIENT_SCOPE. Grant each key only what it needs.
| Scope | Allows | Endpoints |
|---|---|---|
| checkout:write | Create checkout sessions | POST /checkout/sessions |
| checkout:read | Read checkout sessions | GET /checkout/sessions/{id} |
| applications:read | Read application status | GET /applications/{reference} |
| orders:read | Read orders and release authorisations | GET /orders/{reference}, GET /releases/{reference} |
| orders:write | Confirm fulfilment, delivery, cancellation and returns | POST /orders/{reference}/fulfil, /deliver, /cancel, /return |
| settlements:read | Read settlements | GET /settlements |
| webhooks:read | Read webhook events | GET /webhook-events |
| webhooks:write | Retry webhook events | POST /webhook-events/{id}/retry |
IP allowlists#
Optionally restrict a key to up to 20 IPv4/IPv6 addresses. Requests from other addresses fail with 403 IP_NOT_ALLOWED. Use the egress IPs of your production servers; leave the list empty in early sandbox development.
Rotation and revocation#
- Rotate issues a new key with the same scopes and IP allowlist. The old key keeps working for 24 hours and then expires, so you can deploy the new key without downtime.
- Revoke disables a key immediately. Use it if a key may have been exposed.
- Keys can be created with an expiry of 1–730 days. Expired keys fail with
401 INVALID_API_KEY. - Each key’s last used time is visible in the portal, and every request is listed under Integration → API requests with its correlation ID.
Keep keys secret#
Never put a secret key in frontend code
Requests are rate-limited per key (see rate limits). The Bank never asks for your secret key; quote the key prefix (e.g. sk_test_Ab12Cd34) and a correlation ID instead.