SANDBOX — simulated integrations, synthetic data, no real money moves · Docs describe the sandbox build
Skip to content

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.

These actions are also available to your staff in the Partner portal (Ready for release and application detail pages). Each step can be recorded once — repeating it returns 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.

POST/api/v1/orders/{merchant_order_reference}/equityscope orders:write
amount
integer (kobo)required
Must equal application.equity.amount exactly; otherwise 422 EQUITY_AMOUNT_MISMATCH.
payment_reference
string (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"}'
200 OK
{
  "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#

POST/api/v1/orders/{merchant_order_reference}/fulfilscope orders:write
status
"PREPARED" | "DISPATCHED" | "COLLECTED"required
PREPARED is informational. DISPATCHED (shipped) or COLLECTED (customer collected in person) consumes the release authorisation and moves the application to DISPATCHED; COLLECTED also completes delivery immediately.
tracking_reference
string (≤120)optional
Carrier tracking number. Included in goods.dispatched.
carrier
string (≤120)optional
Carrier name. Included in goods.dispatched.
note
string (≤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"}'
200 OK
{
  "ok": true
}

Requires an active release authorisation; otherwise 409 RELEASE_NOT_AUTHORIZED (the blocked attempt is audited).

Confirm delivery#

POST/api/v1/orders/{merchant_order_reference}/deliverscope orders:write
note
string (≤500)optional
e.g. “Signed for by customer”.
exception
booleanoptional
Set true to report a delivery problem instead of confirming delivery. The Bank’s operations team is alerted; the application stays DISPATCHED.
delivered_at
ISO 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#

POST/api/v1/orders/{merchant_order_reference}/cancelscope orders:write
reason
string (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.

200 OK
{
  "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.

200 OK
{
  "status": "CANCELLATION_REQUESTED",
  "requires_reversal": true,
  "cancellation_id": "6b0f3c7e-2a4d-4f55-9f0c-8e8b1a2d3c4e"
}

Request a return#

POST/api/v1/orders/{merchant_order_reference}/returnscope orders:write
type
enumrequired
One of FULL_RETURN, PARTIAL_RETURN, DAMAGED, INCORRECT_PRODUCT, NON_DELIVERY.
reason
string (3–500)required
Description of the problem.
items
arrayoptional
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}]}'
200 OK
{
  "return_id": "1d5c8b2a-7e44-4a1b-b0f6-5c3e9d8a2f10",
  "status": "REQUESTED"
}
When returns are accepted
Application statusReturn allowed?
READY_FOR_RELEASE, DISPATCHED, DELIVERED, COMPLETEDYes
Any other statusNo — 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.