{
  "openapi": "3.1.0",
  "info": {
    "title": "Aboki Data API",
    "version": "1.0",
    "summary": "Buy data, airtime, power, TV and exam PINs from your Aboki Data wallet.",
    "description": "The Aboki Data partner API. Authenticate with an API key (`abk_test_…` or `abk_live_…`) as a Bearer token. Money is whole kobo everywhere (₦1 = 100 kobo), in fields named `*_kobo`; rates are basis points in fields named `*_bp` (250 = 2.5%). Every response uses the envelope `{success, status_code, message, data, meta}`; errors add `error_code`. Guides: https://abokidata.com/docs",
    "contact": {
      "name": "Aboki Data partner team",
      "email": "partners@abokidata.com",
      "url": "https://abokidata.com/docs"
    },
    "termsOfService": "https://abokidata.com/legal/developer-terms",
    "license": {
      "name": "Proprietary",
      "url": "https://abokidata.com/legal/developer-terms"
    }
  },
  "servers": [
    {
      "url": "https://api.abokidata.com/api/v1",
      "description": "Production. Test and live mode are selected by the key, not the URL."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Services and products",
      "description": "List the services you can buy and the products, SKUs and prices (in kobo) for your account type. Use these to build your menus and find the sku for a purchase."
    },
    {
      "name": "Wallet and transactions",
      "description": "Read your wallet balance (or your test wallet, with a test key) and the ledger of credits and debits on your live wallet."
    },
    {
      "name": "Airtime",
      "description": "Top up any MTN, Airtel, Glo or 9mobile number with an amount in kobo, one at a time or up to 50 numbers in one request."
    },
    {
      "name": "Data",
      "description": "Buy a data bundle by sku for one number, or the same bundle for up to 50 numbers in one request."
    },
    {
      "name": "Cable TV",
      "description": "Check a DStv, GOtv, StarTimes or Showmax smartcard number, then pay for a bouquet by sku."
    },
    {
      "name": "Electricity",
      "description": "Check a prepaid meter number with its distribution company, then buy a token for an amount in kobo."
    },
    {
      "name": "Exam PINs",
      "description": "Buy exam PINs, such as WAEC, NECO and NABTEB, from the EXAM_PIN catalogue. The PIN and serial number are returned on the order."
    },
    {
      "name": "Orders and bulk status",
      "description": "Look up an order by its ID, Aboki Data reference or your own reference, list recent orders, and follow a bulk batch."
    }
  ],
  "paths": {
    "/services": {
      "get": {
        "operationId": "list-services",
        "tags": [
          "Services and products"
        ],
        "summary": "List services",
        "description": "Returns the services that are currently available. The `service_code` (or `id`) is what you pass to [List products](#list-products).\n\nThis endpoint also works without a key, at standard prices. Limited to 120 requests per minute per IP address; cache the result.",
        "responses": {
          "200": {
            "description": "Services catalogue retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Service"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Services catalogue retrieved.",
                  "data": [
                    {
                      "id": "6f1c2a9e-4b7d-4e21-9a3c-2d5e8f7a1b90",
                      "service_code": "AIRTIME",
                      "name": "Airtime Top-up",
                      "category_type": "AIRTIME",
                      "is_active": true,
                      "image_url": null,
                      "image_svg_url": null
                    },
                    {
                      "id": "9d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f60",
                      "service_code": "DATA",
                      "name": "Mobile Data Bundles",
                      "category_type": "DATA",
                      "is_active": true,
                      "image_url": null,
                      "image_svg_url": null
                    }
                  ],
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:00.123456Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. `UNAUTHORIZED`: A key was sent but is invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `RATE_LIMIT_EXCEEDED`: More than 120 requests in a minute from your IP address for this path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 401,
            "code": "UNAUTHORIZED",
            "when": "A key was sent but is invalid or revoked."
          },
          {
            "status": 403,
            "code": "IP_NOT_WHITELISTED",
            "when": "The request came from outside your IP allowlist."
          },
          {
            "status": 429,
            "code": "RATE_LIMIT_EXCEEDED",
            "when": "More than 120 requests in a minute from your IP address for this path."
          }
        ]
      }
    },
    "/services/{service}/products": {
      "get": {
        "operationId": "list-products",
        "tags": [
          "Services and products"
        ],
        "summary": "List products and prices",
        "description": "Returns what you can buy in a service, priced for your account type (standard for Customer accounts, wholesale for API Partner accounts).\n\n**Airtime** returns networks and their airtime types with a discount in basis points (`discount_bp`); you buy airtime by `network` and `type` with your own amount. **Every other service** returns products with a `sku` and a fixed `selling_price_kobo`. For electricity the product identifies the distribution company; you are charged `amount_kobo × (1 − discount_bp / 10000)`.\n\nPrices and discounts use your account type's rule, falling back to the Customer rule, the same way purchases are charged; the order's `amount_debited_kobo` is always what you paid. Limited to 120 requests per minute per IP address and path.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "required": true,
            "description": "A `service_code` such as `DATA` (any case) or the service `id`.",
            "schema": {
              "type": "string"
            },
            "example": "DATA"
          },
          {
            "name": "network",
            "in": "query",
            "required": false,
            "description": "Only products for this network or biller group, e.g. `MTN` (case-insensitive).",
            "schema": {
              "type": "string"
            },
            "example": "MTN"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Only products of this type, e.g. `SME` for data. Ignored for airtime.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Products retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "description": "For airtime, a list of networks with their types and discounts. For every other service, products sorted by face value.",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Product"
                          },
                          {
                            "$ref": "#/components/schemas/AirtimeNetwork"
                          }
                        ]
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "summary": "Products retrieved.",
                    "value": {
                      "success": true,
                      "status_code": 200,
                      "message": "Products retrieved.",
                      "data": [
                        {
                          "sku": "DATA_MTN_SME_1GB",
                          "name": "MTN SME 1GB - 30 days",
                          "type": "SME",
                          "network": "MTN",
                          "validity_period": "30 days",
                          "data_size": "1GB",
                          "validity_days": 30,
                          "is_active": true,
                          "service_code": "DATA",
                          "face_value_kobo": 30000,
                          "selling_price_kobo": 28500,
                          "discount_bp": 500
                        }
                      ],
                      "meta": {
                        "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                        "timestamp": "2026-10-17T12:00:00.123456Z"
                      }
                    }
                  },
                  "airtime": {
                    "summary": "Airtime networks and types",
                    "value": {
                      "success": true,
                      "status_code": 200,
                      "message": "Products retrieved.",
                      "data": [
                        {
                          "code": "MTN",
                          "name": "MTN",
                          "types": [
                            {
                              "code": "SHARE_AND_SELL",
                              "name": "Share and Sell",
                              "discount_bp": 300
                            },
                            {
                              "code": "VTU",
                              "name": "VTU",
                              "discount_bp": 200
                            }
                          ]
                        },
                        {
                          "code": "AIRTEL",
                          "name": "Airtel",
                          "types": [
                            {
                              "code": "VTU",
                              "name": "VTU",
                              "discount_bp": 200
                            }
                          ]
                        }
                      ],
                      "meta": {
                        "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                        "timestamp": "2026-10-17T12:00:00.123456Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. `UNAUTHORIZED`: A key was sent but is invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `SERVICE_NOT_FOUND`: No service has that code or id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. `RATE_LIMIT_EXCEEDED`: More than 120 requests in a minute from your IP address for this path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 404,
            "code": "SERVICE_NOT_FOUND",
            "when": "No service has that code or id."
          },
          {
            "status": 401,
            "code": "UNAUTHORIZED",
            "when": "A key was sent but is invalid or revoked."
          },
          {
            "status": 429,
            "code": "RATE_LIMIT_EXCEEDED",
            "when": "More than 120 requests in a minute from your IP address for this path."
          }
        ]
      }
    },
    "/wallets/me": {
      "get": {
        "operationId": "get-wallet",
        "tags": [
          "Wallet and transactions"
        ],
        "summary": "Get wallet balance",
        "description": "With a **live** key, returns your Aboki Data wallets; purchases are paid from `main_wallet.available_balance`. With a **test** key, returns your test wallet instead, with `is_test: true` and the balance also at the top level.",
        "responses": {
          "200": {
            "description": "Wallet retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Wallet"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "summary": "Wallet retrieved.",
                    "value": {
                      "success": true,
                      "status_code": 200,
                      "message": "Wallet retrieved.",
                      "data": {
                        "currency": "NGN",
                        "main_wallet": {
                          "available_balance_kobo": 12500050,
                          "reserved_balance_kobo": 49000,
                          "ledger_balance_kobo": 12549050,
                          "is_locked": false
                        },
                        "bonus_wallet": {
                          "available_balance_kobo": 0,
                          "reserved_balance_kobo": 0,
                          "ledger_balance_kobo": 0,
                          "is_locked": false
                        },
                        "commission_wallet": {
                          "available_balance_kobo": 0,
                          "reserved_balance_kobo": 0,
                          "ledger_balance_kobo": 0,
                          "is_locked": false
                        },
                        "cashback_wallet": {
                          "available_balance_kobo": 1200,
                          "reserved_balance_kobo": 0,
                          "ledger_balance_kobo": 1200,
                          "is_locked": false
                        }
                      },
                      "meta": {
                        "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                        "timestamp": "2026-10-17T12:00:00.123456Z"
                      }
                    }
                  },
                  "test-key": {
                    "summary": "Sandbox test wallet retrieved.",
                    "value": {
                      "success": true,
                      "status_code": 200,
                      "message": "Sandbox test wallet retrieved.",
                      "data": {
                        "currency": "NGN",
                        "is_test": true,
                        "available_balance_kobo": 89951000,
                        "reserved_balance_kobo": 0,
                        "ledger_balance_kobo": 89951000,
                        "main_wallet": {
                          "available_balance_kobo": 89951000,
                          "reserved_balance_kobo": 0,
                          "ledger_balance_kobo": 89951000,
                          "is_locked": false,
                          "is_test": true
                        },
                        "bonus_wallet": {
                          "available_balance_kobo": 0,
                          "reserved_balance_kobo": 0,
                          "ledger_balance_kobo": 0,
                          "is_locked": false
                        },
                        "commission_wallet": {
                          "available_balance_kobo": 0,
                          "reserved_balance_kobo": 0,
                          "ledger_balance_kobo": 0,
                          "is_locked": false
                        },
                        "cashback_wallet": {
                          "available_balance_kobo": 0,
                          "reserved_balance_kobo": 0,
                          "ledger_balance_kobo": 0,
                          "is_locked": false
                        }
                      },
                      "meta": {
                        "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                        "timestamp": "2026-10-17T12:00:00.123456Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. `UNAUTHORIZED`: The key is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `WALLET_NOT_FOUND`: No live wallet exists for the account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 401,
            "code": "UNAUTHORIZED",
            "when": "The key is missing, invalid or revoked."
          },
          {
            "status": 404,
            "code": "WALLET_NOT_FOUND",
            "when": "No live wallet exists for the account."
          }
        ]
      }
    },
    "/transactions": {
      "get": {
        "operationId": "list-transactions",
        "tags": [
          "Wallet and transactions"
        ],
        "summary": "List transactions",
        "description": "Returns ledger entries (credits and debits) on your **live** wallets, newest first, using cursor pagination. Test-mode orders do not create ledger entries, so they never appear here, even with a test key; use [List orders](/docs/api/orders#list-orders) for those.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Number of entries to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "example": 20
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "The `next_cursor` (or `prev_cursor`) from the previous page's `meta.pagination`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "direction",
            "in": "query",
            "description": "`next` for older entries, `prev` for newer ones.",
            "schema": {
              "type": "string",
              "enum": [
                "next",
                "prev"
              ],
              "default": "next"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Only credits or only debits.",
            "schema": {
              "type": "string",
              "enum": [
                "CREDIT",
                "DEBIT"
              ]
            }
          },
          {
            "name": "service_category",
            "in": "query",
            "description": "Only entries for one service, e.g. `AIRTIME` or `DATA` (any case).",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "date_from",
            "in": "query",
            "description": "Only entries on or after this date: `YYYY-MM-DD` or an ISO 8601 timestamp.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date_to",
            "in": "query",
            "description": "Only entries up to the end of this date: `YYYY-MM-DD` or an ISO 8601 timestamp. Must not be before `date_from`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Free-text search in the narration and reference.",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transactions retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Transaction"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/MetaCursor"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Transactions retrieved.",
                  "data": [
                    {
                      "id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                      "reference": "RES-20261017-3F9A1C2B7D4E",
                      "batch_reference": "RES-20261017-3F9A1C2B7D4E",
                      "type": "VTU Purchase",
                      "wallet_type": "MAIN",
                      "direction": "DEBIT",
                      "amount_kobo": 49000,
                      "currency": "NGN",
                      "narration": "MTN Airtime VTU to 08031234560 (VTU-20261017-9A8B7C6D5E4F)",
                      "description": "MTN Airtime VTU — 08031234560",
                      "service_category": "AIRTIME",
                      "created_at": "2026-10-17T12:00:00.000Z"
                    }
                  ],
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:00.123456Z",
                    "pagination": {
                      "limit": 20,
                      "has_more": true,
                      "next_cursor": "eyJjcmVhdGVkX2F0IjoxNzYwNzAyNDAwMDAwLCJpZCI6IjAxOTlmMmE0In0",
                      "prev_cursor": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. `INVALID_CURSOR`: The cursor is not one this API issued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. `UNAUTHORIZED`: The key is missing, invalid or revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "INVALID_CURSOR",
            "when": "The cursor is not one this API issued."
          },
          {
            "status": 401,
            "code": "UNAUTHORIZED",
            "when": "The key is missing, invalid or revoked."
          }
        ]
      }
    },
    "/transactions/{id}": {
      "get": {
        "operationId": "get-transaction",
        "tags": [
          "Wallet and transactions"
        ],
        "summary": "Get a transaction",
        "description": "Returns one ledger entry with the wallet balance before and after it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The transaction `id` (a UUID) from List transactions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d"
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TransactionDetail"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Transaction retrieved.",
                  "data": {
                    "id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                    "transaction_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                    "reference": "RES-20261017-3F9A1C2B7D4E",
                    "type": "VTU Purchase",
                    "wallet_type": "MAIN",
                    "direction": "DEBIT",
                    "amount_kobo": 49000,
                    "currency": "NGN",
                    "old_balance_kobo": 12549050,
                    "new_balance_kobo": 12500050,
                    "order_status": "Successful",
                    "narration": "MTN Airtime VTU to 08031234560 (VTU-20261017-9A8B7C6D5E4F)",
                    "created_at": "2026-10-17T12:00:00.000Z"
                  },
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:00.123456Z"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. `NOT_FOUND`: No transaction with that id on your account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 404,
            "code": "NOT_FOUND",
            "when": "No transaction with that id on your account."
          }
        ]
      }
    },
    "/vtu/airtime/purchase": {
      "post": {
        "operationId": "purchase-airtime",
        "x-idempotent": true,
        "tags": [
          "Airtime"
        ],
        "summary": "Buy airtime",
        "description": "Sends airtime of any amount from ₦100 to ₦1,000,000 (`amount_kobo` 10000 to 100000000) to one number. Get the networks and `type` values from [List products](/docs/api/catalog#list-products) with service `AIRTIME`. You pay `amount_kobo` less the discount for your account type; the response's `amount_debited_kobo` is the exact charge.\n\nThe phone number's network is not checked against `network` for single purchases, so validate it on your side.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AirtimePurchase"
              },
              "example": {
                "network": "MTN",
                "type": "VTU",
                "phone_number": "08031234560",
                "amount_kobo": 50000,
                "reference": "your-order-1042"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/OrderDelivered"
          },
          "202": {
            "$ref": "#/components/responses/OrderPending"
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: A 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. `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. `WALLET_LOCKED`: Your live wallet is locked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `PRODUCT_NOT_FOUND`: The sku, network or type is unknown or switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. `CONFLICT`: An order with this reference already exists on your account. `DUPLICATE_PURCHASE`: Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait. `ORDER_ALREADY_PLACED`: A 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. `IDEMPOTENCY_IN_FLIGHT`: The first request with this key is still running. `IDEMPOTENCY_PAYLOAD_MISMATCH`: This key was used with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/OrderFailed"
          },
          "502": {
            "description": "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The provider could not be reached before the order was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable. `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "A 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."
          },
          {
            "status": 400,
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "when": "No Idempotency-Key header."
          },
          {
            "status": 403,
            "code": "WALLET_LOCKED",
            "when": "Your live wallet is locked."
          },
          {
            "status": 404,
            "code": "PRODUCT_NOT_FOUND",
            "when": "The sku, network or type is unknown or switched off."
          },
          {
            "status": 409,
            "code": "CONFLICT",
            "when": "An order with this reference already exists on your account."
          },
          {
            "status": 409,
            "code": "DUPLICATE_PURCHASE",
            "when": "Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait."
          },
          {
            "status": 409,
            "code": "ORDER_ALREADY_PLACED",
            "when": "A 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."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_IN_FLIGHT",
            "when": "The first request with this key is still running."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_PAYLOAD_MISMATCH",
            "when": "This key was used with a different body."
          },
          {
            "status": 422,
            "code": "INSUFFICIENT_BALANCE",
            "when": "Not enough available balance (test wallet in test mode)."
          },
          {
            "status": 422,
            "code": "DAILY_LIMIT_EXCEEDED",
            "when": "Customer accounts only: the purchase exceeds your daily limit."
          },
          {
            "status": 422,
            "code": "VTU_ORDER_FAILED",
            "when": "The provider refused the order. Nothing was charged."
          },
          {
            "status": 502,
            "code": "EXTERNAL_PROVIDER_ERROR",
            "when": "The provider could not be reached before the order was sent."
          },
          {
            "status": 503,
            "code": "PRODUCT_UNAVAILABLE",
            "when": "The product is temporarily unavailable."
          },
          {
            "status": 503,
            "code": "NO_PROVIDERS_AVAILABLE",
            "when": "No provider can fulfil the order right now. Nothing was charged."
          }
        ]
      }
    },
    "/vtu/airtime/bulk": {
      "post": {
        "operationId": "bulk-airtime",
        "x-idempotent": true,
        "tags": [
          "Airtime"
        ],
        "summary": "Buy airtime in bulk",
        "description": "Sends airtime to up to **50** numbers in one request. The total is reserved at once and the orders are processed in the background; the response is always `202`. Follow progress with [Get a bulk batch](/docs/api/orders#get-bulk-batch) and read each item's `status`, or wait for one webhook per order.\n\nEvery number must belong to `network` (checked by its prefix); for a number ported to another network, set `network` on that line. A number repeated in the batch is bought once. Every line is checked before anything is reserved: a bad line (not a Nigerian number, wrong network, below ₦100, or the same product sent to that number within your duplicate-guard window) is reported in `400 BULK_LINES_INVALID`, with one `details` entry per line, and nothing is charged. Bulk requests do not take `reference` or `callback_url`; webhooks go to your account webhook URL.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AirtimeBulk"
              },
              "example": {
                "network": "MTN",
                "type": "VTU",
                "amount_kobo": 50000,
                "recipients": [
                  {
                    "phone_number": "08031112220"
                  },
                  {
                    "phone_number": "08061112224",
                    "amount_kobo": 100000
                  },
                  {
                    "phone_number": "08021112228",
                    "network": "AIRTEL"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkAccepted"
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: A field is missing or invalid, or more than 50 numbers (\"A batch can have up to 50 numbers. This one has 62.\"). `BULK_LINES_INVALID`: One or more lines cannot be bought. `details` lists each one as `{field: \"recipients[3]\", message}` (`phone_numbers[3]` for data). Nothing was charged; fix the lines and send the batch again with a new key. `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `PRODUCT_NOT_FOUND`: The sku, network or type is unknown or switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable. `INSUFFICIENT_BALANCE`: Not enough available balance for the whole batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "A field is missing or invalid, or more than 50 numbers (\"A batch can have up to 50 numbers. This one has 62.\")."
          },
          {
            "status": 400,
            "code": "BULK_LINES_INVALID",
            "when": "One or more lines cannot be bought. `details` lists each one as `{field: \"recipients[3]\", message}` (`phone_numbers[3]` for data). Nothing was charged; fix the lines and send the batch again with a new key."
          },
          {
            "status": 400,
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "when": "No Idempotency-Key header."
          },
          {
            "status": 404,
            "code": "PRODUCT_NOT_FOUND",
            "when": "The sku, network or type is unknown or switched off."
          },
          {
            "status": 422,
            "code": "INSUFFICIENT_BALANCE",
            "when": "Not enough available balance for the whole batch."
          },
          {
            "status": 503,
            "code": "PRODUCT_UNAVAILABLE",
            "when": "The product is temporarily unavailable."
          }
        ]
      }
    },
    "/vtu/data/purchase": {
      "post": {
        "operationId": "purchase-data",
        "x-idempotent": true,
        "tags": [
          "Data"
        ],
        "summary": "Buy data",
        "description": "Buys one data bundle for one number. Find the `sku` with [List products](/docs/api/catalog#list-products) for service `DATA`, for example `?network=MTN&type=SME`. The price is the product's `selling_price_kobo`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataPurchase"
              },
              "example": {
                "sku": "DATA_MTN_SME_1GB",
                "phone_number": "08031234560",
                "reference": "your-order-1043"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/OrderDelivered"
          },
          "202": {
            "$ref": "#/components/responses/OrderPending"
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: A 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. `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. `WALLET_LOCKED`: Your live wallet is locked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `PRODUCT_NOT_FOUND`: The sku, network or type is unknown or switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. `CONFLICT`: An order with this reference already exists on your account. `DUPLICATE_PURCHASE`: Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait. `ORDER_ALREADY_PLACED`: A 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. `IDEMPOTENCY_IN_FLIGHT`: The first request with this key is still running. `IDEMPOTENCY_PAYLOAD_MISMATCH`: This key was used with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/OrderFailed"
          },
          "502": {
            "description": "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The provider could not be reached before the order was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable. `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "A 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."
          },
          {
            "status": 400,
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "when": "No Idempotency-Key header."
          },
          {
            "status": 403,
            "code": "WALLET_LOCKED",
            "when": "Your live wallet is locked."
          },
          {
            "status": 404,
            "code": "PRODUCT_NOT_FOUND",
            "when": "The sku, network or type is unknown or switched off."
          },
          {
            "status": 409,
            "code": "CONFLICT",
            "when": "An order with this reference already exists on your account."
          },
          {
            "status": 409,
            "code": "DUPLICATE_PURCHASE",
            "when": "Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait."
          },
          {
            "status": 409,
            "code": "ORDER_ALREADY_PLACED",
            "when": "A 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."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_IN_FLIGHT",
            "when": "The first request with this key is still running."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_PAYLOAD_MISMATCH",
            "when": "This key was used with a different body."
          },
          {
            "status": 422,
            "code": "INSUFFICIENT_BALANCE",
            "when": "Not enough available balance (test wallet in test mode)."
          },
          {
            "status": 422,
            "code": "DAILY_LIMIT_EXCEEDED",
            "when": "Customer accounts only: the purchase exceeds your daily limit."
          },
          {
            "status": 422,
            "code": "VTU_ORDER_FAILED",
            "when": "The provider refused the order. Nothing was charged."
          },
          {
            "status": 502,
            "code": "EXTERNAL_PROVIDER_ERROR",
            "when": "The provider could not be reached before the order was sent."
          },
          {
            "status": 503,
            "code": "PRODUCT_UNAVAILABLE",
            "when": "The product is temporarily unavailable."
          },
          {
            "status": 503,
            "code": "NO_PROVIDERS_AVAILABLE",
            "when": "No provider can fulfil the order right now. Nothing was charged."
          }
        ]
      }
    },
    "/vtu/data/bulk": {
      "post": {
        "operationId": "bulk-data",
        "x-idempotent": true,
        "tags": [
          "Data"
        ],
        "summary": "Buy data in bulk",
        "description": "Buys the same bundle for up to **50** numbers. Every number must belong to the bundle's network (checked by its prefix); for a number ported to that network, send `{ \"phone_number\": \"…\", \"ported\": true }` instead of a plain string. A number repeated in the batch is bought once. Bad lines are reported together in `400 BULK_LINES_INVALID` and nothing is charged. The orders are processed in the background and the response is always `202`; see [Get a bulk batch](/docs/api/orders#get-bulk-batch).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataBulk"
              },
              "example": {
                "sku": "DATA_MTN_SME_1GB",
                "phone_numbers": [
                  "08031112220",
                  "08061112224",
                  {
                    "phone_number": "08021112228",
                    "ported": true
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/BulkAccepted"
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: A field is missing or invalid, or more than 50 numbers (\"A batch can have up to 50 numbers. This one has 62.\"). `BULK_LINES_INVALID`: One or more lines cannot be bought. `details` lists each one as `{field: \"recipients[3]\", message}` (`phone_numbers[3]` for data). Nothing was charged; fix the lines and send the batch again with a new key. `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `PRODUCT_NOT_FOUND`: The sku, network or type is unknown or switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable. `INSUFFICIENT_BALANCE`: Not enough available balance for the whole batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "A field is missing or invalid, or more than 50 numbers (\"A batch can have up to 50 numbers. This one has 62.\")."
          },
          {
            "status": 400,
            "code": "BULK_LINES_INVALID",
            "when": "One or more lines cannot be bought. `details` lists each one as `{field: \"recipients[3]\", message}` (`phone_numbers[3]` for data). Nothing was charged; fix the lines and send the batch again with a new key."
          },
          {
            "status": 400,
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "when": "No Idempotency-Key header."
          },
          {
            "status": 404,
            "code": "PRODUCT_NOT_FOUND",
            "when": "The sku, network or type is unknown or switched off."
          },
          {
            "status": 422,
            "code": "INSUFFICIENT_BALANCE",
            "when": "Not enough available balance for the whole batch."
          },
          {
            "status": 503,
            "code": "PRODUCT_UNAVAILABLE",
            "when": "The product is temporarily unavailable."
          }
        ]
      }
    },
    "/vtu/cable/validate": {
      "post": {
        "operationId": "validate-smartcard",
        "tags": [
          "Cable TV"
        ],
        "summary": "Validate a smartcard",
        "description": "Checks a smartcard or IUC number with the cable provider and returns the customer's name, so your customer can confirm it before paying. Send the `sku` of the bouquet you are about to buy (the same value you send to [Pay for a cable TV bouquet](#purchase-cable)); Aboki Data finds the TV provider from it. A well-formed request always returns `200`; check `is_valid`. No Idempotency-Key is needed.\n\nThe old `biller` field is refused with `400`: \"Use sku instead of biller (the sku of the bouquet you will buy).\"",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmartcardValidate"
              },
              "example": {
                "sku": "CABLE_DSTV_COMPACT",
                "smartcard_number": "7032345670"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Smartcard number verified.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/SmartcardResult"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "summary": "Smartcard number verified.",
                    "value": {
                      "success": true,
                      "status_code": 200,
                      "message": "Smartcard number verified.",
                      "data": {
                        "is_valid": true,
                        "customer_name": "ADEBAYO OLUWASEUN"
                      },
                      "meta": {
                        "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                        "timestamp": "2026-10-17T12:00:00.123456Z"
                      }
                    }
                  },
                  "not-valid": {
                    "summary": "Smartcard number could not be verified.",
                    "value": {
                      "success": true,
                      "status_code": 200,
                      "message": "Smartcard number could not be verified.",
                      "data": {
                        "is_valid": false,
                        "customer_name": null,
                        "error_message": "We couldn't verify smartcard •••• 5670. Check the number and the TV provider, then try again."
                      },
                      "meta": {
                        "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                        "timestamp": "2026-10-17T12:00:00.123456Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: sku or smartcard_number is missing, `biller` was sent, or the sku is not a cable TV plan (\"… is not one of our cable TV plans. Use a sku from the cable TV catalogue.\").",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The provider could not be reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "sku or smartcard_number is missing, `biller` was sent, or the sku is not a cable TV plan (\"… is not one of our cable TV plans. Use a sku from the cable TV catalogue.\")."
          },
          {
            "status": 502,
            "code": "EXTERNAL_PROVIDER_ERROR",
            "when": "The provider could not be reached."
          }
        ]
      }
    },
    "/vtu/cable/purchase": {
      "post": {
        "operationId": "purchase-cable",
        "x-idempotent": true,
        "tags": [
          "Cable TV"
        ],
        "summary": "Pay for a cable TV bouquet",
        "description": "Pays for a bouquet on a smartcard. Find the bouquet `sku` with [List products](/docs/api/catalog#list-products) for service `CABLE_TV`. Validate the smartcard first so your customer can confirm the name.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CablePurchase"
              },
              "example": {
                "sku": "CABLE_DSTV_COMPACT",
                "smartcard_number": "7032345670",
                "reference": "your-order-1044"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/OrderDelivered"
          },
          "202": {
            "$ref": "#/components/responses/OrderPending"
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: A 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. `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. `WALLET_LOCKED`: Your live wallet is locked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `PRODUCT_NOT_FOUND`: The sku, network or type is unknown or switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. `CONFLICT`: An order with this reference already exists on your account. `DUPLICATE_PURCHASE`: Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait. `ORDER_ALREADY_PLACED`: A 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. `IDEMPOTENCY_IN_FLIGHT`: The first request with this key is still running. `IDEMPOTENCY_PAYLOAD_MISMATCH`: This key was used with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/OrderFailed"
          },
          "502": {
            "description": "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The provider could not be reached before the order was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable. `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "A 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."
          },
          {
            "status": 400,
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "when": "No Idempotency-Key header."
          },
          {
            "status": 403,
            "code": "WALLET_LOCKED",
            "when": "Your live wallet is locked."
          },
          {
            "status": 404,
            "code": "PRODUCT_NOT_FOUND",
            "when": "The sku, network or type is unknown or switched off."
          },
          {
            "status": 409,
            "code": "CONFLICT",
            "when": "An order with this reference already exists on your account."
          },
          {
            "status": 409,
            "code": "DUPLICATE_PURCHASE",
            "when": "Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait."
          },
          {
            "status": 409,
            "code": "ORDER_ALREADY_PLACED",
            "when": "A 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."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_IN_FLIGHT",
            "when": "The first request with this key is still running."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_PAYLOAD_MISMATCH",
            "when": "This key was used with a different body."
          },
          {
            "status": 422,
            "code": "INSUFFICIENT_BALANCE",
            "when": "Not enough available balance (test wallet in test mode)."
          },
          {
            "status": 422,
            "code": "DAILY_LIMIT_EXCEEDED",
            "when": "Customer accounts only: the purchase exceeds your daily limit."
          },
          {
            "status": 422,
            "code": "VTU_ORDER_FAILED",
            "when": "The provider refused the order. Nothing was charged."
          },
          {
            "status": 502,
            "code": "EXTERNAL_PROVIDER_ERROR",
            "when": "The provider could not be reached before the order was sent."
          },
          {
            "status": 503,
            "code": "PRODUCT_UNAVAILABLE",
            "when": "The product is temporarily unavailable."
          },
          {
            "status": 503,
            "code": "NO_PROVIDERS_AVAILABLE",
            "when": "No provider can fulfil the order right now. Nothing was charged."
          }
        ]
      }
    },
    "/vtu/electricity/validate": {
      "post": {
        "operationId": "validate-meter",
        "tags": [
          "Electricity"
        ],
        "summary": "Validate a meter",
        "description": "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](#purchase-electricity)); 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`.\n\nThe old `biller` field is refused with `400`: \"Use sku instead of biller (the sku of the electricity plan you will buy).\"",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MeterValidate"
              },
              "example": {
                "sku": "ELECTRICITY_IKEDC_PREPAID",
                "meter_number": "45012345670"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Meter number verified.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MeterResult"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "summary": "Meter number verified.",
                    "value": {
                      "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"
                      }
                    }
                  },
                  "postpaid": {
                    "summary": "Meter number could not be verified.",
                    "value": {
                      "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"
                      }
                    }
                  },
                  "not-found": {
                    "summary": "Meter number could not be verified.",
                    "value": {
                      "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"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: sku 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.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The provider could not be reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "sku 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."
          },
          {
            "status": 502,
            "code": "EXTERNAL_PROVIDER_ERROR",
            "when": "The provider could not be reached."
          }
        ]
      }
    },
    "/vtu/electricity/purchase": {
      "post": {
        "operationId": "purchase-electricity",
        "x-idempotent": true,
        "tags": [
          "Electricity"
        ],
        "summary": "Buy an electricity token",
        "description": "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](/docs/api/catalog#list-products) for service `ELECTRICITY`. The token is in `token` on the order once it succeeds.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ElectricityPurchase"
              },
              "example": {
                "sku": "ELECTRICITY_IKEDC_PREPAID",
                "meter_number": "45012345670",
                "amount_kobo": 100000,
                "reference": "your-order-1045"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done. Order delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEnvelope"
                },
                "example": {
                  "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"
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/OrderPending"
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: A 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. `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. `WALLET_LOCKED`: Your live wallet is locked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `PRODUCT_NOT_FOUND`: The sku, network or type is unknown or switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. `CONFLICT`: An order with this reference already exists on your account. `DUPLICATE_PURCHASE`: Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait. `ORDER_ALREADY_PLACED`: A 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. `IDEMPOTENCY_IN_FLIGHT`: The first request with this key is still running. `IDEMPOTENCY_PAYLOAD_MISMATCH`: This key was used with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/OrderFailed"
          },
          "502": {
            "description": "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The provider could not be reached before the order was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable. `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "A 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."
          },
          {
            "status": 400,
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "when": "No Idempotency-Key header."
          },
          {
            "status": 403,
            "code": "WALLET_LOCKED",
            "when": "Your live wallet is locked."
          },
          {
            "status": 404,
            "code": "PRODUCT_NOT_FOUND",
            "when": "The sku, network or type is unknown or switched off."
          },
          {
            "status": 409,
            "code": "CONFLICT",
            "when": "An order with this reference already exists on your account."
          },
          {
            "status": 409,
            "code": "DUPLICATE_PURCHASE",
            "when": "Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait."
          },
          {
            "status": 409,
            "code": "ORDER_ALREADY_PLACED",
            "when": "A 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."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_IN_FLIGHT",
            "when": "The first request with this key is still running."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_PAYLOAD_MISMATCH",
            "when": "This key was used with a different body."
          },
          {
            "status": 422,
            "code": "INSUFFICIENT_BALANCE",
            "when": "Not enough available balance (test wallet in test mode)."
          },
          {
            "status": 422,
            "code": "DAILY_LIMIT_EXCEEDED",
            "when": "Customer accounts only: the purchase exceeds your daily limit."
          },
          {
            "status": 422,
            "code": "VTU_ORDER_FAILED",
            "when": "The provider refused the order. Nothing was charged."
          },
          {
            "status": 502,
            "code": "EXTERNAL_PROVIDER_ERROR",
            "when": "The provider could not be reached before the order was sent."
          },
          {
            "status": 503,
            "code": "PRODUCT_UNAVAILABLE",
            "when": "The product is temporarily unavailable."
          },
          {
            "status": 503,
            "code": "NO_PROVIDERS_AVAILABLE",
            "when": "No provider can fulfil the order right now. Nothing was charged."
          }
        ]
      }
    },
    "/vtu/exam/purchase": {
      "post": {
        "operationId": "purchase-exam-pin",
        "x-idempotent": true,
        "tags": [
          "Exam PINs"
        ],
        "summary": "Buy an exam PIN",
        "description": "Buys one exam PIN. Find the `sku` with [List products](/docs/api/catalog#list-products) for service `EXAM_PIN`. `phone_number` is your customer's number and becomes the order's recipient. In live mode the PIN and serial number are returned together in `token`, as the provider sends them.\n\nThe duplicate guard applies per phone number and product, so a second PIN of the same exam for the same phone number within the window is refused; lower the window in Developer settings if you need that.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExamPurchase"
              },
              "example": {
                "sku": "EXAM_WAEC_PIN",
                "phone_number": "08031234560",
                "reference": "your-order-1046"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done. Order delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEnvelope"
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Done. Order delivered.",
                  "data": {
                    "order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4f",
                    "order_ref": "VTU-20261017-7A8B9C0D1E2F",
                    "reference": "your-order-1046",
                    "client_reference": "your-order-1046",
                    "recipient": "08031234560",
                    "description": "WAEC Result Checker PIN — 08031234560",
                    "face_value_kobo": 350000,
                    "amount_debited_kobo": 345000,
                    "status": "SUCCESS_SETTLED",
                    "customer_status": "delivered",
                    "money_location": "spent",
                    "is_test": false,
                    "token": "Serial No: WRC123456789 | Pin: 123456789012",
                    "created_at": "2026-10-17T12:00:00.000Z",
                    "updated_at": "2026-10-17T12:00:01.870Z"
                  },
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:01.884Z"
                  }
                }
              }
            }
          },
          "202": {
            "$ref": "#/components/responses/OrderPending"
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: A 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. `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. `WALLET_LOCKED`: Your live wallet is locked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found. `PRODUCT_NOT_FOUND`: The sku, network or type is unknown or switched off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. `CONFLICT`: An order with this reference already exists on your account. `DUPLICATE_PURCHASE`: Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait. `ORDER_ALREADY_PLACED`: A 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. `IDEMPOTENCY_IN_FLIGHT`: The first request with this key is still running. `IDEMPOTENCY_PAYLOAD_MISMATCH`: This key was used with a different body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/OrderFailed"
          },
          "502": {
            "description": "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The provider could not be reached before the order was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable. `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "A 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."
          },
          {
            "status": 400,
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "when": "No Idempotency-Key header."
          },
          {
            "status": 403,
            "code": "WALLET_LOCKED",
            "when": "Your live wallet is locked."
          },
          {
            "status": 404,
            "code": "PRODUCT_NOT_FOUND",
            "when": "The sku, network or type is unknown or switched off."
          },
          {
            "status": 409,
            "code": "CONFLICT",
            "when": "An order with this reference already exists on your account."
          },
          {
            "status": 409,
            "code": "DUPLICATE_PURCHASE",
            "when": "Same product to the same recipient within your duplicate-guard window. `retry_after_seconds` says how long to wait."
          },
          {
            "status": 409,
            "code": "ORDER_ALREADY_PLACED",
            "when": "A 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."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_IN_FLIGHT",
            "when": "The first request with this key is still running."
          },
          {
            "status": 409,
            "code": "IDEMPOTENCY_PAYLOAD_MISMATCH",
            "when": "This key was used with a different body."
          },
          {
            "status": 422,
            "code": "INSUFFICIENT_BALANCE",
            "when": "Not enough available balance (test wallet in test mode)."
          },
          {
            "status": 422,
            "code": "DAILY_LIMIT_EXCEEDED",
            "when": "Customer accounts only: the purchase exceeds your daily limit."
          },
          {
            "status": 422,
            "code": "VTU_ORDER_FAILED",
            "when": "The provider refused the order. Nothing was charged."
          },
          {
            "status": 502,
            "code": "EXTERNAL_PROVIDER_ERROR",
            "when": "The provider could not be reached before the order was sent."
          },
          {
            "status": 503,
            "code": "PRODUCT_UNAVAILABLE",
            "when": "The product is temporarily unavailable."
          },
          {
            "status": 503,
            "code": "NO_PROVIDERS_AVAILABLE",
            "when": "No provider can fulfil the order right now. Nothing was charged."
          }
        ]
      }
    },
    "/vtu/orders": {
      "get": {
        "operationId": "list-orders",
        "tags": [
          "Orders and bulk status"
        ],
        "summary": "List orders",
        "description": "Returns your most recent orders, newest first. A test key lists test orders and a live key lists live orders. Use `status` and `reference` to find specific orders; to look up one order, use [Get an order](#get-order).",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Number of orders to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "example": 20
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only orders with this status (any case).",
            "schema": {
              "$ref": "#/components/schemas/OrderStatus"
            }
          },
          {
            "name": "reference",
            "in": "query",
            "description": "Only the order with this `order_ref` or your `reference`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Orders retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status_code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Order"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/MetaList"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Orders retrieved.",
                  "data": [
                    {
                      "order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                      "order_ref": "VTU-20261017-9A8B7C6D5E4F",
                      "reference": "your-order-1042",
                      "client_reference": "your-order-1042",
                      "recipient": "08031234560",
                      "description": "MTN Airtime VTU — 08031234560",
                      "face_value_kobo": 50000,
                      "amount_debited_kobo": 49000,
                      "status": "SUCCESS_SETTLED",
                      "customer_status": "delivered",
                      "money_location": "spent",
                      "is_test": true,
                      "created_at": "2026-10-17T12:00:00.000Z",
                      "updated_at": "2026-10-17T12:00:00.412Z"
                    }
                  ],
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:00.123456Z",
                    "pagination": {
                      "limit": 20,
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. `VALIDATION_ERROR`: Unknown status value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 400,
            "code": "VALIDATION_ERROR",
            "when": "Unknown status value."
          }
        ]
      }
    },
    "/vtu/orders/{id}": {
      "get": {
        "operationId": "get-order",
        "tags": [
          "Orders and bulk status"
        ],
        "summary": "Get an order",
        "description": "Returns the current state of one order. `{id}` can be the `order_id`, the `order_ref` or your own `reference`. Use this (or [Verify an order](#verify-order)) to resolve a pending order.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "`order_id`, `order_ref` or your `reference`.",
            "schema": {
              "type": "string"
            },
            "example": "VTU-20261017-9A8B7C6D5E4F"
          }
        ],
        "responses": {
          "200": {
            "description": "Order status retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEnvelope"
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Order status retrieved.",
                  "data": {
                    "order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                    "order_ref": "VTU-20261017-9A8B7C6D5E4F",
                    "reference": "your-order-1042",
                    "client_reference": "your-order-1042",
                    "recipient": "08031234560",
                    "description": "MTN Airtime VTU — 08031234560",
                    "face_value_kobo": 50000,
                    "amount_debited_kobo": 49000,
                    "status": "SUCCESS_SETTLED",
                    "customer_status": "delivered",
                    "money_location": "spent",
                    "is_test": false,
                    "created_at": "2026-10-17T12:00:00.000Z",
                    "updated_at": "2026-10-17T12:00:03.020Z"
                  },
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:09.511Z"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. `NOT_FOUND`: No order on your account matches.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 404,
            "code": "NOT_FOUND",
            "when": "No order on your account matches."
          }
        ]
      }
    },
    "/vtu/orders/verify/{reference}": {
      "get": {
        "operationId": "verify-order",
        "tags": [
          "Orders and bulk status"
        ],
        "summary": "Verify an order",
        "description": "Looks up an order by your own `reference` (or its `order_ref`) and returns its current state. This is the requery endpoint: call it after a timeout or a `202` to learn whether an order exists and how it ended, **before** you consider buying again.",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Your `reference`, or the `order_ref`.",
            "schema": {
              "type": "string"
            },
            "example": "your-order-1042"
          }
        ],
        "responses": {
          "200": {
            "description": "Order verification retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderEnvelope"
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Order verification retrieved.",
                  "data": {
                    "order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                    "order_ref": "VTU-20261017-9A8B7C6D5E4F",
                    "reference": "your-order-1042",
                    "client_reference": "your-order-1042",
                    "recipient": "08031234560",
                    "description": "MTN Airtime VTU — 08031234560",
                    "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"
                  },
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:05.003Z"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. `NOT_FOUND`: No order matches. If your purchase timed out, it was not created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 404,
            "code": "NOT_FOUND",
            "when": "No order matches. If your purchase timed out, it was not created."
          }
        ]
      }
    },
    "/vtu/bulk/{batch_id}": {
      "get": {
        "operationId": "get-bulk-batch",
        "tags": [
          "Orders and bulk status"
        ],
        "summary": "Get a bulk batch",
        "description": "Returns a bulk batch and every order in it. The batch-level `status` and counts are recomputed each time an order in it finishes; read **each item's `status`** (or `customer_status`) to know what was delivered to whom.",
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "description": "The `batch_id` from the bulk purchase response.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f"
          }
        ],
        "responses": {
          "200": {
            "description": "Bulk batch status retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkEnvelope"
                },
                "example": {
                  "success": true,
                  "status_code": 200,
                  "message": "Bulk batch status retrieved.",
                  "data": {
                    "batch_id": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
                    "batch_ref": "BULK-20261017-4C8E2A6B9D1F",
                    "service_code": "AIRTIME",
                    "network": "MTN",
                    "status": "COMPLETED",
                    "total_count": 2,
                    "successful_count": 2,
                    "failed_count": 0,
                    "pending_count": 0,
                    "total_amount_kobo": 147000,
                    "created_at": "2026-10-17T12:00:00.000Z",
                    "updated_at": "2026-10-17T12:00:04.210Z",
                    "items": [
                      {
                        "order_id": "0199f2b0-2222-7c3d-8e4f-5a6b7c8d9e0f",
                        "order_ref": "VTU-20261017-1A2B3C4D5E6F",
                        "reference": "VTU-20261017-1A2B3C4D5E6F",
                        "recipient": "08031112220",
                        "description": "MTN Airtime VTU — 08031112220",
                        "face_value_kobo": 50000,
                        "amount_debited_kobo": 49000,
                        "status": "SUCCESS_SETTLED",
                        "customer_status": "delivered",
                        "money_location": "spent",
                        "is_test": false,
                        "batch_id": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
                        "created_at": "2026-10-17T12:00:00.000Z",
                        "updated_at": "2026-10-17T12:00:02.020Z"
                      }
                    ]
                  },
                  "meta": {
                    "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                    "timestamp": "2026-10-17T12:00:10.000Z"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found. `NOT_FOUND`: No batch with that id on your account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-errors": [
          {
            "status": 404,
            "code": "NOT_FOUND",
            "when": "No batch with that id on your account."
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "abk_test_<48 hex> | abk_live_<48 hex>",
        "description": "Your API key from Developer settings in the Aboki Data app."
      }
    },
    "responses": {
      "OrderDelivered": {
        "description": "Done. Order delivered.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/OrderEnvelope"
            },
            "example": {
              "success": true,
              "status_code": 200,
              "message": "Done. Order delivered.",
              "data": {
                "order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
                "order_ref": "VTU-20261017-9A8B7C6D5E4F",
                "reference": "your-order-1042",
                "client_reference": "your-order-1042",
                "recipient": "08031234560",
                "description": "MTN Airtime VTU — 08031234560",
                "face_value_kobo": 50000,
                "amount_debited_kobo": 49000,
                "status": "SUCCESS_SETTLED",
                "customer_status": "delivered",
                "money_location": "spent",
                "is_test": false,
                "created_at": "2026-10-17T12:00:00.000Z",
                "updated_at": "2026-10-17T12:00:00.412Z"
              },
              "meta": {
                "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                "timestamp": "2026-10-17T12:00:00.430211Z"
              }
            }
          }
        }
      },
      "OrderPending": {
        "description": "Order received and processing. We will notify you when it is done.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/OrderEnvelope"
            },
            "example": {
              "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"
              }
            }
          }
        }
      },
      "OrderFailed": {
        "description": "The provider refused the order",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "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"
              }
            }
          }
        }
      },
      "BulkAccepted": {
        "description": "Bulk order submitted and processing in the background.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BulkEnvelope"
            },
            "example": {
              "success": true,
              "status_code": 202,
              "message": "Bulk airtime order submitted and processing in the background.",
              "data": {
                "batch_id": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
                "batch_ref": "BULK-20261017-4C8E2A6B9D1F",
                "service_code": "AIRTIME",
                "network": "MTN",
                "status": "PROCESSING",
                "total_count": 2,
                "successful_count": 0,
                "failed_count": 0,
                "pending_count": 2,
                "total_amount_kobo": 147000,
                "created_at": "2026-10-17T12:00:00.000Z",
                "updated_at": "2026-10-17T12:00:00.000Z",
                "items": [
                  {
                    "order_id": "0199f2b0-2222-7c3d-8e4f-5a6b7c8d9e0f",
                    "order_ref": "VTU-20261017-1A2B3C4D5E6F",
                    "reference": "VTU-20261017-1A2B3C4D5E6F",
                    "recipient": "08031112220",
                    "description": "MTN Airtime VTU — 08031112220",
                    "face_value_kobo": 50000,
                    "amount_debited_kobo": 49000,
                    "status": "FUNDS_RESERVED",
                    "customer_status": "processing",
                    "money_location": "held",
                    "is_test": false,
                    "batch_id": "0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
                    "created_at": "2026-10-17T12:00:00.000Z",
                    "updated_at": "2026-10-17T12:00:00.000Z"
                  }
                ],
                "poll_url": "/api/v1/vtu/bulk/0199f2b0-1a2b-7c3d-8e4f-5a6b7c8d9e0f"
              },
              "meta": {
                "request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
                "timestamp": "2026-10-17T12:00:00.123456Z"
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Unique ID of this request (also in the `X-Request-ID` header). Quote it when you contact support."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MetaList": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "pagination": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean",
                "description": "True when more matching orders exist than were returned."
              }
            }
          }
        }
      },
      "MetaCursor": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "pagination": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Pass as `cursor` to get the next (older) page."
              },
              "prev_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Pass as `cursor` with `direction=prev` to go back."
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Always `false`."
          },
          "status_code": {
            "type": "integer",
            "description": "Same as the HTTP status."
          },
          "error_code": {
            "type": "string",
            "description": "Stable code to branch on, e.g. `INSUFFICIENT_BALANCE`. See [errors](/docs/errors)."
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation. Do not parse it."
          },
          "details": {
            "type": "array",
            "description": "Extra context, when available. For `VTU_ORDER_FAILED` it holds the `order_ref`; for `BULK_LINES_INVALID` one entry per bad line (`field` is `recipients[3]` or `phone_numbers[3]`).",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "retry_after_seconds": {
            "type": "integer",
            "description": "Only on `DUPLICATE_PURCHASE` and `SERVICE_MAINTENANCE`."
          },
          "order_id": {
            "type": "string",
            "format": "uuid",
            "description": "Only on `ORDER_ALREADY_PLACED`. The order that already exists for your key."
          },
          "order_ref": {
            "type": "string",
            "description": "Only on `ORDER_ALREADY_PLACED`."
          },
          "maintenance": {
            "type": "object",
            "description": "Only on `SERVICE_MAINTENANCE`.",
            "properties": {
              "level": {
                "type": "string",
                "enum": [
                  "READ_ONLY",
                  "FULL"
                ],
                "description": "`READ_ONLY`: reads work, purchases are refused. `FULL`: every request is refused."
              },
              "expected_end_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "Service": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "service_code": {
            "type": "string",
            "description": "Code to use with List products: `AIRTIME`, `DATA`, `CABLE_TV`, `ELECTRICITY` or `EXAM_PIN`."
          },
          "name": {
            "type": "string"
          },
          "category_type": {
            "type": "string",
            "enum": [
              "AIRTIME",
              "DATA",
              "CABLE_TV",
              "ELECTRICITY",
              "EXAM_PIN"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "256×256 PNG of the service's tile icon. Links never change in place",
            "so cache by link.": null
          },
          "image_svg_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same artwork as SVG."
          }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "description": "The product identifier to send when buying. Treat it as opaque; it can change when the catalogue is updated."
          },
          "name": {
            "type": "string"
          },
          "network": {
            "type": "string",
            "description": "Network or biller group, e.g. `MTN`. Absent for ungrouped products."
          },
          "type": {
            "type": "string",
            "description": "Product type within the network, e.g. `SME`. Absent when not applicable."
          },
          "validity_period": {
            "type": [
              "string",
              "null"
            ],
            "description": "For example `30 days`."
          },
          "data_size": {
            "type": "string",
            "description": "Data bundles only, e.g. `1GB`."
          },
          "validity_days": {
            "type": "integer"
          },
          "is_active": {
            "type": "boolean"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "PNG icon for the plan (its own, else its brand's, else the service's). Links never change in place, so cache by link."
          },
          "image_svg_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same artwork as SVG."
          },
          "service_code": {
            "type": "string"
          },
          "face_value_kobo": {
            "type": "integer",
            "description": "Value delivered, in kobo."
          },
          "selling_price_kobo": {
            "type": "integer",
            "description": "What you pay, in kobo, for your account type."
          },
          "discount_bp": {
            "type": "integer",
            "description": "Discount for your account type, in basis points (`200` means 2%)."
          }
        }
      },
      "AirtimeNetwork": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Send as `network`: `MTN`, `AIRTEL`, `GLO` or `9MOBILE`."
          },
          "name": {
            "type": "string"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "image_svg_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "types": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Send as `type`, e.g. `VTU` (standard top-up) or `SHARE_AND_SELL` (MTN)."
                },
                "name": {
                  "type": "string"
                },
                "discount_bp": {
                  "type": "integer",
                  "description": "Discount taken off the amount you send, in basis points."
                }
              }
            }
          }
        }
      },
      "Balance": {
        "type": "object",
        "properties": {
          "available_balance_kobo": {
            "type": "integer",
            "description": "Spendable now, in kobo."
          },
          "reserved_balance_kobo": {
            "type": "integer",
            "description": "Held for orders that have not finished."
          },
          "ledger_balance_kobo": {
            "type": "integer",
            "description": "Available plus reserved."
          },
          "is_locked": {
            "type": "boolean"
          },
          "is_test": {
            "type": "boolean",
            "description": "Test key only."
          }
        }
      },
      "Wallet": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "description": "Always `NGN`."
          },
          "main_wallet": {
            "$ref": "#/components/schemas/Balance"
          },
          "bonus_wallet": {
            "$ref": "#/components/schemas/Balance"
          },
          "commission_wallet": {
            "$ref": "#/components/schemas/Balance"
          },
          "cashback_wallet": {
            "$ref": "#/components/schemas/Balance"
          },
          "daily_limit_summary": {
            "type": "object",
            "description": "Live key only: your daily spend limit and what is left today (`daily_limit_kobo`, `daily_spent_today_kobo`, `daily_remaining_kobo`, `resets_at`). API Partner accounts are not held to it."
          },
          "is_test": {
            "type": "boolean",
            "description": "Test key only."
          },
          "available_balance_kobo": {
            "type": "integer",
            "description": "Test key only: the test wallet's spendable balance."
          },
          "reserved_balance_kobo": {
            "type": "integer",
            "description": "Test key only."
          },
          "ledger_balance_kobo": {
            "type": "integer",
            "description": "Test key only."
          }
        }
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string",
            "description": "Ledger reference (same as `batch_reference`)."
          },
          "batch_reference": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "For example `VTU Purchase`, `Refund`, `Wallet Top Up`, `Cashback`."
          },
          "wallet_type": {
            "type": "string",
            "enum": [
              "MAIN",
              "BONUS",
              "COMMISSION",
              "CASHBACK"
            ]
          },
          "direction": {
            "type": "string",
            "enum": [
              "DEBIT",
              "CREDIT"
            ]
          },
          "amount_kobo": {
            "type": "integer",
            "description": "In kobo."
          },
          "currency": {
            "type": "string"
          },
          "narration": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "service_category": {
            "type": "string"
          },
          "token": {
            "type": "string",
            "description": "Present when the related order delivered a token."
          },
          "delivery_token": {
            "type": "string",
            "description": "The same value as `token`."
          },
          "metadata": {
            "type": "object",
            "description": "Extra details on the entry",
            "when there are any. Informational; keys can change.": null
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TransactionDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "transaction_id": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "wallet_type": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "enum": [
              "DEBIT",
              "CREDIT"
            ]
          },
          "amount_kobo": {
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "old_balance_kobo": {
            "type": "integer",
            "description": "Wallet balance before this entry."
          },
          "new_balance_kobo": {
            "type": "integer",
            "description": "Wallet balance after this entry."
          },
          "order_status": {
            "type": "string",
            "description": "For purchases, a display label: `Successful`, `Failed`, `Refunded`, `Under Review` or `Processing`. Branch on the order's `status`, not this."
          },
          "narration": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrderStatus": {
        "type": "string",
        "enum": [
          "INITIATED",
          "FUNDS_RESERVED",
          "DISPATCHING_PROVIDER",
          "PENDING_PROVIDER_QUERY",
          "ADMIN_MANUAL_REVIEW",
          "SUCCESS_SETTLED",
          "FAILED_UNRESERVED",
          "FAILED_REFUNDED"
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "format": "uuid"
          },
          "order_ref": {
            "type": "string",
            "description": "Aboki Data reference, e.g. `VTU-20261017-9A8B7C6D5E4F`."
          },
          "reference": {
            "type": "string",
            "description": "Your `reference` if you sent one, otherwise the `order_ref`."
          },
          "client_reference": {
            "type": "string",
            "description": "Your `reference`. Only present if you sent one."
          },
          "recipient": {
            "type": "string",
            "description": "Phone number (as `0XXXXXXXXXX`), smartcard number or meter number."
          },
          "description": {
            "type": "string",
            "description": "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_kobo": {
            "type": "integer",
            "description": "Value delivered, in kobo."
          },
          "amount_debited_kobo": {
            "type": "integer",
            "description": "What your wallet paid, in kobo."
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "customer_status": {
            "type": "string",
            "enum": [
              "processing",
              "delivered",
              "failed"
            ],
            "description": "The three-state view of `status`: `processing` until a final status, `delivered` for `SUCCESS_SETTLED`, `failed` for `FAILED_UNRESERVED` and `FAILED_REFUNDED`."
          },
          "money_location": {
            "type": "string",
            "enum": [
              "not_charged",
              "held",
              "spent",
              "refunded"
            ],
            "description": "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."
          },
          "is_test": {
            "type": "boolean"
          },
          "token": {
            "type": "string",
            "description": "Electricity token, or the exam PIN and serial number. Only when delivered."
          },
          "units": {
            "type": "string",
            "description": "Units purchased, when the provider returns them."
          },
          "meter_number": {
            "type": "string",
            "description": "Electricity orders, when the provider returns it."
          },
          "pin": {
            "type": "string",
            "description": "Exam PIN, when returned separately (test mode)."
          },
          "serial_number": {
            "type": "string",
            "description": "Exam serial number, when returned separately (test mode)."
          },
          "failure_reason": {
            "type": "string",
            "description": "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."
          },
          "metadata": {
            "type": "object",
            "description": "Delivery details only: any of `token`, `delivery_token`, `units`, `meter_number`, `pin`, `serial_number`. Provider and operational details are never included."
          },
          "batch_id": {
            "type": "string",
            "format": "uuid",
            "description": "Bulk orders only."
          },
          "poll_url": {
            "type": "string",
            "description": "Only on `202` responses: the path to check this order."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrderEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "status_code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/Order"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "BulkBatch": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "format": "uuid"
          },
          "batch_ref": {
            "type": "string",
            "description": "For example `BULK-20261017-4C8E2A6B9D1F`."
          },
          "service_code": {
            "type": "string",
            "enum": [
              "AIRTIME",
              "DATA"
            ]
          },
          "network": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "PROCESSING",
              "COMPLETED",
              "PARTIALLY_COMPLETED",
              "FAILED"
            ],
            "description": "Summary only. Read `items[].status` for each order."
          },
          "total_count": {
            "type": "integer"
          },
          "successful_count": {
            "type": "integer"
          },
          "failed_count": {
            "type": "integer"
          },
          "pending_count": {
            "type": "integer"
          },
          "total_amount_kobo": {
            "type": "integer",
            "description": "Total reserved for the batch, in kobo."
          },
          "items": {
            "type": "array",
            "description": "One order per recipient (same fields as an order).",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          },
          "poll_url": {
            "type": "string",
            "description": "On the `202` response: the path to check this batch."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BulkEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "status_code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/BulkBatch"
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "Reference": {
        "type": "string",
        "maxLength": 100,
        "description": "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."
      },
      "CallbackUrl": {
        "type": "string",
        "format": "uri",
        "maxLength": 500,
        "description": "HTTPS URL to receive this order's webhooks instead of your account webhook URL. Signed with the same secret."
      },
      "Amount": {
        "type": [
          "integer",
          "string"
        ],
        "description": "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`.",
        "minimum": 10000,
        "maximum": 100000000
      },
      "AirtimePurchase": {
        "type": "object",
        "required": [
          "network",
          "type",
          "phone_number",
          "amount_kobo"
        ],
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "MTN",
              "AIRTEL",
              "GLO",
              "9MOBILE"
            ],
            "description": "Network `code` from the airtime catalogue."
          },
          "type": {
            "type": "string",
            "description": "Airtime type `code` from the catalogue, e.g. `VTU` or `SHARE_AND_SELL`."
          },
          "phone_number": {
            "type": "string",
            "description": "`0XXXXXXXXXX`, `+234XXXXXXXXXX` or `234XXXXXXXXXX`. Send it as a string."
          },
          "amount_kobo": {
            "$ref": "#/components/schemas/Amount"
          },
          "reference": {
            "$ref": "#/components/schemas/Reference"
          },
          "callback_url": {
            "$ref": "#/components/schemas/CallbackUrl"
          }
        }
      },
      "AirtimeBulk": {
        "type": "object",
        "required": [
          "network",
          "type"
        ],
        "properties": {
          "network": {
            "type": "string",
            "enum": [
              "MTN",
              "AIRTEL",
              "GLO",
              "9MOBILE"
            ]
          },
          "type": {
            "type": "string",
            "description": "Airtime type `code`, as for a single purchase."
          },
          "amount_kobo": {
            "type": [
              "integer",
              "string"
            ],
            "description": "Default amount, in kobo, for recipients without their own. Required unless every recipient has an `amount_kobo`. At least 10000 (₦100)."
          },
          "recipients": {
            "type": "array",
            "description": "Up to 50. Send this or `phone_numbers`.",
            "items": {
              "type": "object",
              "properties": {
                "phone_number": {
                  "type": "string",
                  "description": "`0XXXXXXXXXX`, `+234XXXXXXXXXX` or `234XXXXXXXXXX`. Must belong to `network` unless `network` is set on this line."
                },
                "amount_kobo": {
                  "type": "integer",
                  "description": "Overrides the default amount for this number",
                  "in kobo. At least 10000 (₦100).": null
                },
                "network": {
                  "type": "string",
                  "enum": [
                    "MTN",
                    "AIRTEL",
                    "GLO",
                    "9MOBILE"
                  ],
                  "description": "For a number ported to another network: the network to send this line on."
                }
              }
            }
          },
          "phone_numbers": {
            "type": "array",
            "description": "Up to 50 numbers, all charged the default `amount_kobo`. Used only if `recipients` is not sent.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DataPurchase": {
        "type": "object",
        "required": [
          "sku",
          "phone_number"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "Data product `sku` from the catalogue."
          },
          "phone_number": {
            "type": "string",
            "description": "`0XXXXXXXXXX`, `+234XXXXXXXXXX` or `234XXXXXXXXXX`. Send it as a string."
          },
          "reference": {
            "$ref": "#/components/schemas/Reference"
          },
          "callback_url": {
            "$ref": "#/components/schemas/CallbackUrl"
          }
        }
      },
      "DataBulk": {
        "type": "object",
        "required": [
          "sku",
          "phone_numbers"
        ],
        "properties": {
          "sku": {
            "type": "string"
          },
          "phone_numbers": {
            "type": "array",
            "description": "Up to 50 numbers on the bundle's network, each `0XXXXXXXXXX`, `+234XXXXXXXXXX` or `234XXXXXXXXXX`. A number ported to this network goes in as an object instead: `{ \"phone_number\": \"08021112228\", \"ported\": true }`.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SmartcardValidate": {
        "type": "object",
        "required": [
          "sku",
          "smartcard_number"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "The `sku` of the bouquet you will buy, from the CABLE_TV catalogue. The TV provider is taken from it."
          },
          "smartcard_number": {
            "type": "string",
            "description": "Smartcard or IUC number."
          }
        }
      },
      "SmartcardResult": {
        "type": "object",
        "properties": {
          "is_valid": {
            "type": "boolean"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_message": {
            "type": "string",
            "description": "Only when `is_valid` is false."
          }
        }
      },
      "CablePurchase": {
        "type": "object",
        "required": [
          "sku",
          "smartcard_number"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "Bouquet `sku` from the CABLE_TV catalogue."
          },
          "smartcard_number": {
            "type": "string"
          },
          "reference": {
            "$ref": "#/components/schemas/Reference"
          },
          "callback_url": {
            "$ref": "#/components/schemas/CallbackUrl"
          }
        }
      },
      "MeterValidate": {
        "type": "object",
        "required": [
          "sku",
          "meter_number"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "The `sku` of the electricity plan you will buy, from the ELECTRICITY catalogue. The distribution company is taken from it."
          },
          "meter_number": {
            "type": "string",
            "description": "Prepaid meter number."
          }
        }
      },
      "MeterResult": {
        "type": "object",
        "properties": {
          "is_valid": {
            "type": "boolean"
          },
          "customer_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "customer_address": {
            "type": "string",
            "description": "Only when the distribution company (or the sandbox) returns it."
          },
          "meter_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "`PREPAID` or `POSTPAID`."
          },
          "error_message": {
            "type": "string",
            "description": "Only when `is_valid` is false. Plain language you can show your customer."
          }
        }
      },
      "ElectricityPurchase": {
        "type": "object",
        "required": [
          "sku",
          "meter_number",
          "amount_kobo"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "Distribution company `sku` from the ELECTRICITY catalogue."
          },
          "meter_number": {
            "type": "string"
          },
          "amount_kobo": {
            "$ref": "#/components/schemas/Amount"
          },
          "reference": {
            "$ref": "#/components/schemas/Reference"
          },
          "callback_url": {
            "$ref": "#/components/schemas/CallbackUrl"
          }
        }
      },
      "ExamPurchase": {
        "type": "object",
        "required": [
          "sku",
          "phone_number"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "Exam PIN `sku` from the EXAM_PIN catalogue."
          },
          "phone_number": {
            "type": "string",
            "description": "Your customer's number: `0XXXXXXXXXX`, `+234XXXXXXXXXX` or `234XXXXXXXXXX`. Send it as a string."
          },
          "reference": {
            "$ref": "#/components/schemas/Reference"
          },
          "callback_url": {
            "$ref": "#/components/schemas/CallbackUrl"
          }
        }
      }
    }
  }
}
