Orders & money
Fulfilment, cancellations & returns
Record what happens to the goods after release, and ask the Bank to cancel or reverse an order. All endpoints take your merchant_order_reference and require the orders:write scope.
409 FULFILMENT_DUPLICATE.Confirm customer equity#
If your configuration allows customer equity, a customer may choose to pay part of the price themselves (for example ₦2,000,000 of a ₦5,000,000 item). You collect that equity directly, after the Bank approves the financing (application.equity.payable is true). The Bank finances only the remainder (financed_amount, ₦3,000,000 in the example), charges its profit only on that amount, and pays the vendor only that amount — and only after you confirm the equity.
/api/v1/orders/{merchant_order_reference}/equityscope orders:writeamountinteger (kobo)required- Must equal
application.equity.amountexactly; otherwise422 EQUITY_AMOUNT_MISMATCH. payment_referencestring (4–64, A–Z 0–9 . _ -)required- Your receipt reference. Repeating the same reference is idempotent; a different one after confirmation returns 409 EQUITY_ALREADY_CONFIRMED.
curl -X POST https://pay-with-araf.onrender.com/api/v1/orders/ORD-10045/equity \
-H "Authorization: Bearer $ARAF_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"amount":200000000,"payment_reference":"ALTMALL-EQ-10045"}'{
"status": "CONFIRMED",
"idempotent_replay": false
}You then receive application.equity_confirmed. Before approval the call returns 409 INVALID_STATE; if the customer chose no equity it returns 409 EQUITY_NOT_REQUIRED.
Record fulfilment#
/api/v1/orders/{merchant_order_reference}/fulfilscope orders:writestatus"PREPARED" | "DISPATCHED" | "COLLECTED"requiredPREPAREDis informational.DISPATCHED(shipped) orCOLLECTED(customer collected in person) consumes the release authorisation and moves the application toDISPATCHED;COLLECTEDalso completes delivery immediately.tracking_referencestring (≤120)optional- Carrier tracking number. Included in goods.dispatched.
carrierstring (≤120)optional- Carrier name. Included in goods.dispatched.
notestring (≤500)optional- Free-text note for the record.
curl -X POST https://pay-with-araf.onrender.com/api/v1/orders/ORD-10045/fulfil \
-H "Authorization: Bearer $ARAF_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"DISPATCHED","tracking_reference":"GIG-123","carrier":"GIG Logistics"}'{
"ok": true
}Requires an active release authorisation; otherwise 409 RELEASE_NOT_AUTHORIZED (the blocked attempt is audited).
Confirm delivery#
/api/v1/orders/{merchant_order_reference}/deliverscope orders:writenotestring (≤500)optional- e.g. “Signed for by customer”.
exceptionbooleanoptional- Set
trueto report a delivery problem instead of confirming delivery. The Bank’s operations team is alerted; the application staysDISPATCHED. delivered_atISO 8601optional- Accepted for your records.
curl -X POST https://pay-with-araf.onrender.com/api/v1/orders/ORD-10045/deliver \
-H "Authorization: Bearer $ARAF_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"note":"Signed for by customer"}'Only valid while the application is DISPATCHED (else 409 INVALID_STATE). Confirming delivery emits goods.delivered and completes origination; repayments continue between the customer and the Bank.
Cancel an order#
/api/v1/orders/{merchant_order_reference}/cancelscope orders:writereasonstring (3–500)required- Why the order is being cancelled.
curl -X POST https://pay-with-araf.onrender.com/api/v1/orders/ORD-10045/cancel \
-H "Authorization: Bearer $ARAF_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"Item out of stock"}'Before the vendor is paid
The application is cancelled immediately and order.cancelled is emitted.
{
"status": "CANCELLED",
"requires_reversal": false
}Once a vendor payment instruction exists
Cancellation becomes a reversal request reviewed by the Bank: any active release authorisation is suspended (goods.release_suspended, reason CANCELLATION_REQUESTED), and the vendor must refund the Bank before the order is finally cancelled (refund.initiated → refund.completed → order.cancelled). Do not release the goods.
{
"status": "CANCELLATION_REQUESTED",
"requires_reversal": true,
"cancellation_id": "6b0f3c7e-2a4d-4f55-9f0c-8e8b1a2d3c4e"
}Request a return#
/api/v1/orders/{merchant_order_reference}/returnscope orders:writetypeenumrequired- One of
FULL_RETURN,PARTIAL_RETURN,DAMAGED,INCORRECT_PRODUCT,NON_DELIVERY. reasonstring (3–500)required- Description of the problem.
itemsarrayoptional- For partial returns:
[{ sku, quantity }].
curl -X POST https://pay-with-araf.onrender.com/api/v1/orders/ORD-10045/return \
-H "Authorization: Bearer $ARAF_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"DAMAGED","reason":"Screen cracked on arrival","items":[{"sku":"PHONE-001","quantity":1}]}'{
"return_id": "1d5c8b2a-7e44-4a1b-b0f6-5c3e9d8a2f10",
"status": "REQUESTED"
}| Application status | Return allowed? |
|---|---|
| READY_FOR_RELEASE, DISPATCHED, DELIVERED, COMPLETED | Yes |
| Any other status | No — 409 INVALID_STATE (cancel instead) |
The Bank reviews each return. If a refund is due, the vendor refunds the Bank and you receive refund.initiated and refund.completed.