Pay with ARAF · API v1
Embedded Murabaha financing for your checkout
Pay with ARAF lets your customers buy now and pay over time with non-interest (Murabaha) asset financing from The Alternative Bank. You create a checkout session on your server, redirect the customer, and fulfil the order only when the Bank authorises goods release.
How it works#
- 1
Create a checkout session (server-side)
When the customer chooses “Pay with ARAF”, your server callsPOST /api/v1/checkout/sessionswith the cart (integer kobo), anIdempotency-Key, and approved return/cancel URLs. You receive acheckout_urland anapplication_reference. - 2
Redirect the customer
Send the customer tocheckout_url. The Bank’s hosted checkout handles identity, eligibility, the offer, documents and the repayment mandate. You never see BVNs, credit scores or statements. - 3
Listen for webhooks
Your endpoint receives signed events as the application progresses —application.*,financing.*,vendor.*,goods.*. Treat them as notifications and confirm state through the API. - 4
Verify the release authorisation
When you receivegoods.release_authorized, callGET /api/v1/releases/{reference}. Onlyrelease_authorized: truewithstatus: "AUTHORIZED"permits you to hand over the goods. - 5
Fulfil and confirm delivery
Record dispatch or collection withPOST /orders/{ref}/fulfil, then confirm delivery withPOST /orders/{ref}/deliver. The Bank pays the vendor directly; see Settlements.
Release goods only on a verified release authorisation
financing.approved or even vendor.payment_confirmed is not proof that you may release goods. The only acceptable proof is GET /api/v1/releases/{reference} returning release_authorized: true.- EligibleIndicative only
- SubmittedNot approved
- ApprovedNot paid
- Vendor paidNot released
- Release authorisedHand over goods
Quickstart#
Get a sandbox secret key (sk_test_…) from Partner portal → Integration → API keys, then create your first session. Amounts are integer kobo: ₦450,000.00 is 45000000.
curl -X POST https://pay-with-araf.onrender.com/api/v1/checkout/sessions \
-H "Authorization: Bearer $ARAF_SECRET_KEY" \
-H "Idempotency-Key: order-ORD-10045-attempt-1" \
-H "Content-Type: application/json" \
-d '{"merchant_order_reference":"ORD-10045","currency":"NGN","amount":45000000,"items":[{"sku":"PHONE-001","name":"Sandbox Smartphone X","quantity":1,"unit_amount":45000000,"category":"smartphones","vendor_reference":"VENDOR-LEKKI-ELEC"}],"customer":{"email":"customer@example.com","phone":"+2348030000001"},"return_url":"https://shop.example.com/orders/ORD-10045","cancel_url":"https://shop.example.com/cart"}'Try it without writing code in the API explorer, and use the sandbox test identities to drive the customer journey to any outcome.
Key principles#
- Server-side only. Secret keys never go into browsers or mobile apps. Create sessions from your backend with amounts from your own database.
- Money is integer kobo.
amountmust equal the sum ofunit_amount × quantity; the API recomputes it and rejects mismatches. - Idempotent writes.
POST /checkout/sessionsrequires anIdempotency-Key; retries with the same key return the original response. - Events are at-least-once. De-duplicate by
event_idand useresource_versionto ignore stale updates. - Privacy by design. Merchants receive operational statuses only — never BVNs, credit scores, statements, salary, affordability or decline reasons.
Where to next#
- Sandbox & production — keys, base URLs and go-live.
- Authentication — scopes, IP allowlists and rotation.
- Event catalogue — every event with an example payload.
- Errors & idempotency — the full error catalogue.