Skip to content

API reference

Electricity

Check a prepaid meter number with its distribution company, then buy a token for an amount in kobo.

Validate a meter

POST/vtu/electricity/validate

Checks a prepaid meter number with its distribution company and returns the customer's name. Send the sku of the electricity plan you are about to buy (the same value you send to Buy an electricity token); Aboki Data finds the distribution company from it. Postpaid meters return is_valid: false; only prepaid electricity is supported. A well-formed request always returns 200; check is_valid.

The old biller field is refused with 400: "Use sku instead of biller (the sku of the electricity plan you will buy)."

Request body

  • skustringrequired

    The sku of the electricity plan you will buy, from the ELECTRICITY catalogue. The distribution company is taken from it.

  • meter_numberstringrequired

    Prepaid meter number.

Returns: data

  • is_validbooleanoptional
  • customer_namestring | nulloptional
  • customer_addressstringoptional

    Only when the distribution company (or the sandbox) returns it.

  • meter_typestring | nulloptional

    PREPAID or POSTPAID.

  • error_messagestringoptional

    Only when is_valid is false. Plain language you can show your customer.

Errors

HTTPerror_codeWhen
400VALIDATION_ERRORsku or meter_number is missing, `biller` was sent, the sku is not an electricity plan ("… is not one of our electricity plans. Use a sku from the electricity catalogue."), or meters for that distribution company cannot be checked yet.
502EXTERNAL_PROVIDER_ERRORThe provider could not be reached.
POST /vtu/electricity/validate
curl -X POST "https://api.abokidata.com/api/v1/vtu/electricity/validate" \
  -H "Authorization: Bearer $ABOKI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "sku": "ELECTRICITY_IKEDC_PREPAID",
  "meter_number": "45012345670"
}'
Meter number verified.
200
{
  "success": true,
  "status_code": 200,
  "message": "Meter number verified.",
  "data": {
    "is_valid": true,
    "customer_name": "CHIOMA NWOSU",
    "meter_type": "PREPAID"
  },
  "meta": {
    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
    "timestamp": "2026-10-17T12:00:00.123456Z"
  }
}
Meter number could not be verified.
200
{
  "success": true,
  "status_code": 200,
  "message": "Meter number could not be verified.",
  "data": {
    "is_valid": false,
    "customer_name": "CHIOMA NWOSU",
    "meter_type": "POSTPAID",
    "error_message": "Meter •••• 5670 is a postpaid meter. We sell prepaid tokens only for now."
  },
  "meta": {
    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
    "timestamp": "2026-10-17T12:00:00.123456Z"
  }
}
Meter number could not be verified.
200
{
  "success": true,
  "status_code": 200,
  "message": "Meter number could not be verified.",
  "data": {
    "is_valid": false,
    "customer_name": null,
    "meter_type": null,
    "error_message": "We couldn't verify meter •••• 5670. Check the number and the electricity company, then try again."
  },
  "meta": {
    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
    "timestamp": "2026-10-17T12:00:00.123456Z"
  }
}

Base URL https://api.abokidata.com/api/v1

Buy an electricity token

POST/vtu/electricity/purchase

Buys a prepaid token for ₦100 to ₦1,000,000 (amount_kobo 10000 to 100000000; your distribution company may set its own minimum). Use the sku of the distribution company from List products for service ELECTRICITY. The token is in token on the order once it succeeds.

Headers

  • Idempotency-Keystringrequired

    A unique value you generate for this order (for example a UUID or your order ID), reused unchanged if you retry. See Idempotency.

Request body

  • skustringrequired

    Distribution company sku from the ELECTRICITY catalogue.

  • meter_numberstringrequired
  • amount_kobointeger | stringrequired

    Whole kobo (₦1 = 100 kobo), as an integer or a string of digits: 50000 is ₦500. Decimals are refused, and so is a naira field named amount. Between 10000 and 100000000.

  • referencestringoptional

    Your own ID for this order. Must be unique on your account across test and live, even if an earlier order with it failed. Use it to look the order up later. Up to 100 characters.

  • callback_urlstring (uri)optional

    HTTPS URL to receive this order's webhooks instead of your account webhook URL. Signed with the same secret. Up to 500 characters.

Returns: data

  • order_idstring (uuid)optional
  • order_refstringoptional

    Aboki Data reference, e.g. VTU-20261017-9A8B7C6D5E4F.

  • referencestringoptional

    Your reference if you sent one, otherwise the order_ref.

  • client_referencestringoptional

    Your reference. Only present if you sent one.

  • recipientstringoptional

    Phone number (as 0XXXXXXXXXX), smartcard number or meter number.

  • descriptionstringoptional

    The product name and the recipient, e.g. MTN SME 1GB - 30 days — 08031234560 (or Purchase for 08031234560 when the product name is not known).

  • face_value_kobointegeroptional

    Value delivered, in kobo.

  • amount_debited_kobointegeroptional

    What your wallet paid, in kobo.

  • statusstringoptional

    One of INITIATED, FUNDS_RESERVED, DISPATCHING_PROVIDER, PENDING_PROVIDER_QUERY, ADMIN_MANUAL_REVIEW, SUCCESS_SETTLED, FAILED_UNRESERVED, FAILED_REFUNDED.

  • customer_statusstringoptional

    The three-state view of status: processing until a final status, delivered for SUCCESS_SETTLED, failed for FAILED_UNRESERVED and FAILED_REFUNDED. One of processing, delivered, failed.

  • money_locationstringoptional

    Where the money is: not_charged for INITIATED, held while reserved (FUNDS_RESERVED, DISPATCHING_PROVIDER, PENDING_PROVIDER_QUERY, ADMIN_MANUAL_REVIEW), spent for SUCCESS_SETTLED, refunded for either failed status. One of not_charged, held, spent, refunded.

  • is_testbooleanoptional
  • tokenstringoptional

    Electricity token, or the exam PIN and serial number. Only when delivered.

  • unitsstringoptional

    Units purchased, when the provider returns them.

  • meter_numberstringoptional

    Electricity orders, when the provider returns it.

  • pinstringoptional

    Exam PIN, when returned separately (test mode).

  • serial_numberstringoptional

    Exam serial number, when returned separately (test mode).

  • failure_reasonstringoptional

    Why the order failed, in plain language you can show your customer, e.g. This order didn't go through. Your money is back in your wallet. Only when it failed.

  • metadataobjectoptional

    Delivery details only: any of token, delivery_token, units, meter_number, pin, serial_number. Provider and operational details are never included.

  • batch_idstring (uuid)optional

    Bulk orders only.

  • poll_urlstringoptional

    Only on 202 responses: the path to check this order.

  • created_atstring (date-time)optional
  • updated_atstring (date-time)optional

Errors

HTTPerror_codeWhen
400VALIDATION_ERRORA field is missing, invalid or of the wrong JSON type (`phone_number must be a string.`), or a naira field such as `amount` was sent instead of `amount_kobo`; the message says which.
400IDEMPOTENCY_KEY_REQUIREDNo Idempotency-Key header.
403WALLET_LOCKEDYour live wallet is locked.
404PRODUCT_NOT_FOUNDThe sku, network or type is unknown or switched off.
409CONFLICTAn order with this reference already exists on your account.
409DUPLICATE_PURCHASESame product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait.
409ORDER_ALREADY_PLACEDA retry with the same key arrived after the first attempt wrote the order but failed to answer. The body carries that order's `order_id` and `order_ref`; check it instead of buying again.
409IDEMPOTENCY_IN_FLIGHTThe first request with this key is still running.
409IDEMPOTENCY_PAYLOAD_MISMATCHThis key was used with a different body.
422INSUFFICIENT_BALANCENot enough available balance (test wallet in test mode).
422DAILY_LIMIT_EXCEEDEDCustomer accounts only: the purchase exceeds your daily limit.
422VTU_ORDER_FAILEDThe provider refused the order. Nothing was charged.
502EXTERNAL_PROVIDER_ERRORThe provider could not be reached before the order was sent.
503PRODUCT_UNAVAILABLEThe product is temporarily unavailable.
503NO_PROVIDERS_AVAILABLENo provider can fulfil the order right now. Nothing was charged.
POST /vtu/electricity/purchase
curl -X POST "https://api.abokidata.com/api/v1/vtu/electricity/purchase" \
  -H "Authorization: Bearer $ABOKI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ord_7Hk2pQ9xR4" \
  -d '{
  "sku": "ELECTRICITY_IKEDC_PREPAID",
  "meter_number": "45012345670",
  "amount_kobo": 100000,
  "reference": "your-order-1045"
}'
Done. Order delivered.
200
{
  "success": true,
  "status_code": 200,
  "message": "Done. Order delivered.",
  "data": {
    "order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4e",
    "order_ref": "VTU-20261017-5D6E7F8A9B0C",
    "reference": "your-order-1045",
    "client_reference": "your-order-1045",
    "recipient": "45012345670",
    "description": "Ikeja Electric Prepaid — 45012345670",
    "face_value_kobo": 100000,
    "amount_debited_kobo": 99000,
    "status": "SUCCESS_SETTLED",
    "customer_status": "delivered",
    "money_location": "spent",
    "is_test": false,
    "token": "1234-5678-9012-3456-7890",
    "created_at": "2026-10-17T12:00:00.000Z",
    "updated_at": "2026-10-17T12:00:02.140Z"
  },
  "meta": {
    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
    "timestamp": "2026-10-17T12:00:02.152Z"
  }
}
Order received and processing. We will notify you when it is done.
202
{
  "success": true,
  "status_code": 202,
  "message": "Order received and processing. We will notify you when it is done.",
  "data": {
    "order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
    "order_ref": "VTU-20261017-9A8B7C6D5E4F",
    "reference": "your-order-1042",
    "client_reference": "your-order-1042",
    "recipient": "08031234562",
    "description": "MTN Airtime VTU — 08031234562",
    "face_value_kobo": 50000,
    "amount_debited_kobo": 49000,
    "status": "PENDING_PROVIDER_QUERY",
    "customer_status": "processing",
    "money_location": "held",
    "is_test": false,
    "created_at": "2026-10-17T12:00:00.000Z",
    "updated_at": "2026-10-17T12:00:00.640Z",
    "poll_url": "/api/v1/vtu/orders/0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d"
  },
  "meta": {
    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
    "timestamp": "2026-10-17T12:00:00.655Z"
  }
}
The provider refused the order
422
{
  "success": false,
  "status_code": 422,
  "error_code": "VTU_ORDER_FAILED",
  "message": "This order could not be completed.",
  "details": [
    {
      "field": "order_ref",
      "message": "VTU-20261017-1B2C3D4E5F60"
    }
  ],
  "meta": {
    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
    "timestamp": "2026-10-17T12:00:00.300Z"
  }
}

Base URL https://api.abokidata.com/api/v1