Schemas
Objects the API returns.
Order
Returned by every purchase endpoint, inside data.
Fields
| Name | Type | Description |
|---|---|---|
idrequired | string | Our order ID. Starts with IR. |
referencerequired | string | The Idempotency-Key you sent with the purchase. |
servicerequired | string | What was bought, in words. |
categoryrequired | string | Product category.One of: Airtime, Data, Electricity, TV, Education, Insurance |
recipientrequired | string | Phone, meter, smartcard or other number the order was delivered to. |
amountrequired | number | Price in naira. |
statusrequired | string | Where the order is. See Order statuses.One of: paid, processing, pending, delivered, refund_due, refunding, refunded, failed |
paymentStatusrequired | string | Always paid for API purchases: they are billed to your account. |
token | string | Electricity token, exam PIN or provider confirmation. Only set when delivered. |
message | string | Why an order failed or is waiting. Null when delivered. |
receiptUrl | string | Path to the PDF receipt, relative to the site. Only set when delivered. |
addressProofrequired | boolean | True for electricity and TV: the receipt shows the registered name and address. |
createdAtrequired | string | When the order was created (UTC, YYYY-MM-DD HH:MM:SS). |
Error
Returned with every 4xx and 5xx response.
Fields
| Name | Type | Description |
|---|---|---|
typerequired | string | Error category, e.g. order_error, unauthorized, not_found. |
messagerequired | string | What went wrong, in words you can show to your team. |

