Skip to content

Core concepts

Order lifecycle

A purchase reserves funds, goes to a provider and ends in exactly one final status. Your integration only needs to react to the final ones.

Read the HTTP status first

HTTPOrder statusWhat to do
200SUCCESS_SETTLEDDelivered. Show the result (and the token or PIN, if any) to your customer.
202PENDING_PROVIDER_QUERYNot final. Wait for the webhook, or check the order at the poll_url path in the response. Do not buy again.
422FAILED_UNRESERVEDThe provider refused it. Nothing was charged. The error code is VTU_ORDER_FAILED.

All statuses

StatusFinalMeaning
INITIATEDNoThe order was created.
FUNDS_RESERVEDNoThe amount is held in your wallet.
DISPATCHING_PROVIDERNoThe order is being sent to the provider.
PENDING_PROVIDER_QUERYNoThe provider has not confirmed yet; Aboki Data keeps checking.
ADMIN_MANUAL_REVIEWNoAboki Data staff are reviewing the order. Funds stay reserved.
SUCCESS_SETTLEDYesDelivered and charged.
FAILED_UNRESERVEDYesFailed before any charge; the reservation was released.
FAILED_REFUNDEDYesFailed after the provider was contacted; the amount was returned to your wallet.

The short view: customer_status and money_location

Every order also carries two fields that collapse the eight statuses into what a customer needs to know. Branch on status for your records and show these two:

statuscustomer_statusmoney_location
INITIATEDprocessingnot_charged
FUNDS_RESERVED, DISPATCHING_PROVIDER, PENDING_PROVIDER_QUERY, ADMIN_MANUAL_REVIEWprocessingheld
SUCCESS_SETTLEDdeliveredspent
FAILED_UNRESERVED, FAILED_REFUNDEDfailedrefunded

When an order fails, failure_reason is written for your customer (for example This order didn't go through. Your money is back in your wallet.) and is safe to show as it is.

Statuses can be added

Treat any status you do not recognise as not final, and keep checking the order. In rare cases Aboki Data corrects a final order after review (for example refunding one that was reported as not delivered); you get a webhook when that happens.

Resolving a pending order

  1. Store the order_id, order_ref and your own reference from the 202 response.
  2. Wait for an order.success, order.failed or order.refunded webhook.
  3. If no webhook arrives, call GET /vtu/orders/verify/{reference} with back-off (for example after 10 s, 30 s, 1 min, then every 5 min).
  4. Tell your customer the result only when the status is final.

Amounts on an order

face_value_kobo is the value delivered to the recipient (for example 50000 for ₦500 of airtime). amount_debited_kobo is what your wallet paid after any discount for your account type. Amounts are whole kobo (₦1 = 100 kobo).