openapi: 3.1.0
info:
  title: Pay Sef API
  version: "1.0"
  summary: Buy airtime, data, cable TV, electricity and exam PINs from your Pay Sef wallet.
  description: >-
    The Pay Sef partner API. Authenticate with an API key (`pays_test_…` or `pays_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`. Request bodies can be up
    to 32 KB. A key only works on the endpoints listed here; any other endpoint answers `403
    FORBIDDEN`.


    Two addresses, one API. Build and test against the sandbox address,
    `https://sandbox.paysef.com/api/v1`, with a test key. It takes test keys only: a live key or a
    call with no key answers `403 SANDBOX_TEST_KEY_REQUIRED`. To go live, change both the address to
    `https://api.paysef.com/api/v1` and the key to your live key. The key, not the address, decides
    whether an order is a test, so test keys keep working on `api.paysef.com` too.


    Client contract. Responses look the same whichever network delivered the order. Branch on
    `error_code` and `customer_status`, never on `message` or a display label. Lists put paging in
    `meta.pagination`, as a cursor page `{limit, has_more, next_cursor, prev_cursor}`. Timestamps
    are UTC ISO 8601 ending in `Z`. Keys are only ever added: ignore keys you do not know, and a key
    marked deprecated stays until integrations have moved off it. New endpoints answer `201` for a
    create, `202` with `poll_url` for work that finishes later, and `200` otherwise; existing
    endpoints keep the codes they have. Guides: https://paysef.com/docs
  contact:
    name: Pay Sef support
    email: support@paysef.com
    url: https://paysef.com/docs
  termsOfService: https://paysef.com/legal/developer-terms
  license:
    name: Proprietary
    url: https://paysef.com/legal/developer-terms
servers:
  - url: https://api.paysef.com/api/v1
    description: Live. Takes live and test keys; the key decides test or live.
  - url: https://sandbox.paysef.com/api/v1
    description: Sandbox. Takes test keys (pays_test_…) only; any other call answers 403
      SANDBOX_TEST_KEY_REQUIRED.
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: Check a JAMB profile ID, then buy WAEC, NECO, NABTEB or JAMB PINs from the EXAM_PIN
      catalogue. The PIN and serial number come back on the order.
  - name: Orders and bulk status
    description: Look up an order by its ID, Pay Sef 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, sorted by name. The `service_code` (or
        `id`) is what you pass to [List products](#list-products).


        This endpoint also works without a key on `api.paysef.com` (not on the sandbox address), 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.
            `FORBIDDEN`: The key's account is suspended, frozen or closed."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: "Too many requests. `RATE_LIMIT_EXCEEDED`: More than 120 requests within 60 seconds
            from your IP address for this path. When the wait is known, `retry_after_seconds` and
            the `Retry-After` header say how long."
          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: 403
          code: FORBIDDEN
          when: The key's account is suspended, frozen or closed.
        - status: 429
          code: RATE_LIMIT_EXCEEDED
          when: More than 120 requests within 60 seconds from your IP address for this path. When the wait is
            known, `retry_after_seconds` and the `Retry-After` header say how long.
  /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).


        **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)`.


        Prices 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. A
        service that is switched off returns an empty list. 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. For data: `SME`, `GIFTING`, `CORPORATE`, `AWOOF`,
            `DATA_SHARE` or `DIRECT` (a plan with no type of its own is `SME`). 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 (sorted by name) 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: AIRTEL
                        name: Airtel
                        types:
                          - code: VTU
                            name: VTU
                            discount_bp: 200
                      - code: MTN
                        name: MTN
                        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"
        "403":
          description: "Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `FORBIDDEN`: The key's account is suspended, frozen or closed."
          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 within 60 seconds
            from your IP address for this path. When the wait is known, `retry_after_seconds` and
            the `Retry-After` header say how long."
          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: 403
          code: IP_NOT_WHITELISTED
          when: The request came from outside your IP allowlist.
        - status: 403
          code: FORBIDDEN
          when: The key's account is suspended, frozen or closed.
        - status: 429
          code: RATE_LIMIT_EXCEEDED
          when: More than 120 requests within 60 seconds from your IP address for this path. When the wait is
            known, `retry_after_seconds` and the `Retry-After` header say how long.
  /wallets/me:
    get:
      operationId: get-wallet
      tags:
        - Wallet and transactions
      summary: Get wallet balance
      description: "With a **live** key, returns your Pay Sef 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
                      daily_limit_summary:
                        kyc_tier: TIER_2_DOCUMENT_VERIFIED
                        daily_limit_kobo: 100000000
                        daily_spent_today_kobo: 49000
                        daily_remaining_kobo: 99951000
                        resets_at: 2026-10-18T00:00:00.000Z
                        next_tier: null
                        next_tier_daily_limit_kobo: null
                    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"
        "403":
          description: "Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `WALLET_NOT_FOUND`: One of the account's live wallets does not exist.
            `PROFILE_NOT_FOUND`: The account has no customer profile."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors:
        - status: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - &a1
          status: 403
          code: IP_NOT_WHITELISTED
          when: The request came from outside your IP allowlist.
        - &a2
          status: 403
          code: ACCOUNT_SUSPENDED
          when: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED` work the same way.
        - status: 404
          code: WALLET_NOT_FOUND
          when: One of the account's live wallets does not exist.
        - status: 404
          code: PROFILE_NOT_FOUND
          when: The account has no customer profile.
        - &a3
          status: 503
          code: SERVICE_MAINTENANCE
          when: Pay Sef is under maintenance. `retry_after_seconds` and the `Retry-After` header say when to
            try again.
  /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.


        Each entry links to what it came from: a purchase carries `order_id`, `order_ref` and
        `customer_status` (`processing`, `delivered` or `failed`); a wallet top-up carries
        `deposit_reference`. Entries with no order or deposit leave these keys out. Show `label`
        (`Purchase`, `Wallet top-up`, `Refund`, …); `type` stays for integrations that already read
        it.
      parameters:
        - name: limit
          in: query
          description: Number of entries to return. Values outside 1 to 100 are clamped.
          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: "`prev` for newer entries; anything else means `next` (older)."
          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
                    label: Purchase
                    wallet_type: MAIN
                    direction: DEBIT
                    amount_kobo: 49000
                    currency: NGN
                    narration: MTN Airtime to 08031234560 (VTU-20261017-9A8B7C6D5E4F)
                    description: MTN Airtime — 08031234560
                    service_category: AIRTIME
                    order_id: 0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4e
                    order_ref: VTU-20261017-9A8B7C6D5E4F
                    customer_status: delivered
                    created_at: 2026-10-17T12:00:00.000Z
                  - id: 0199f1c0-2a7d-7e15-8b60-4c9d0e1f2a3b
                    reference: DEP-20261017-0199F1C02A7D
                    batch_reference: DEP-20261017-0199F1C02A7D
                    type: Wallet Top Up
                    label: Wallet top-up
                    wallet_type: MAIN
                    direction: CREDIT
                    amount_kobo: 4995000
                    currency: NGN
                    narration: Wallet top-up by bank transfer.
                    description: Wallet top-up by bank transfer.
                    deposit_reference: DEP-20261017-7C1A9E3B5D2F
                    created_at: 2026-10-17T09:12:03.198Z
                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.
            `VALIDATION_ERROR`: `type` is not CREDIT or DEBIT, a date cannot be read, `date_to` is
            before `date_from`, `q` is over 100 characters or `service_category` is over 40."
          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"
        "403":
          description: "Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          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: 400
          code: VALIDATION_ERROR
          when: "`type` is not CREDIT or DEBIT, a date cannot be read, `date_to` is before `date_from`, `q` is
            over 100 characters or `service_category` is over 40."
        - status: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - *a1
        - *a2
        - *a3
  /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, and the same links as
        [List transactions](#list-transactions). A purchase adds `customer_status` (`processing`,
        `delivered` or `failed`, the same values as the order's own `customer_status`); branch on
        that. `order_status` is a display label kept for older integrations and is deprecated.


        A wallet top-up adds `deposit`: `deposit_reference` (the reference support asks for),
        `paid_at` (when the payer's bank made the transfer, UTC), `gross_amount_kobo`, `fee_kobo`,
        `net_amount_kobo` (equal to the entry's `amount_kobo`, and `gross = fee + net`),
        `gateway_reference`, `session_id`, and `sender` (`{name, bank_name, account_last4}`, with
        the name shortened to `Ibrahim A.`, or `null` when the bank did not say who paid).
      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
                  label: Purchase
                  wallet_type: MAIN
                  direction: DEBIT
                  amount_kobo: 49000
                  currency: NGN
                  old_balance_kobo: 12549050
                  new_balance_kobo: 12500050
                  order_id: 0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4e
                  order_ref: VTU-20261017-9A8B7C6D5E4F
                  customer_status: delivered
                  order_status: Successful
                  narration: MTN Airtime to 08031234560 (VTU-20261017-9A8B7C6D5E4F)
                  batch_reference: RES-20261017-3F9A1C2B7D4E
                  description: MTN Airtime — 08031234560
                  service_category: AIRTIME
                  created_at: 2026-10-17T12:00:00.000Z
                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"
        "403":
          description: "Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `NOT_FOUND`: No transaction with that id on your account."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          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: NOT_FOUND
          when: No transaction with that id on your account.
        - *a1
        - *a2
        - *a3
  /vtu/airtime/purchase:
    post:
      operationId: purchase-airtime
      x-idempotent: true
      parameters:
        - $ref: "#/components/parameters/IdempotencyKey"
      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.


        The phone number's network is not checked against `network` for single purchases, so
        validate it on your side. A `network` and `type` pair that is not in the catalogue is
        refused with `400`: "GLO GIFTING airtime is not available. Choose another network or type."
      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.`), a naira field such as `amount` was sent instead of
            `amount_kobo`, or the Idempotency-Key is over 100 characters. Airtime only: the network
            and type are not on sale. Purchases by sku only: the sku belongs to another service
            ("DATA_MTN_SME_1GB" is not a TV package. Choose one from the TV packages list.), or an
            amount was sent for a fixed-price plan. The message says which.
            `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.'
          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"
        "403":
          description: 'Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way. `WALLET_LOCKED`: Your live wallet is on hold ("Your wallet is on
            hold, so it cannot be used right now. Your money is safe. Contact support to sort it
            out.").'
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `PRODUCT_NOT_FOUND`: Purchases by sku only: the sku is unknown or switched
            off. `PRICING_RULE_NOT_FOUND`: The product has no price for your account type yet.
            `WALLET_NOT_FOUND`: Your live wallet does not exist."
          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 (the amount is not compared). `retry_after_seconds` says how long to wait.
            `ORDER_ALREADY_PLACED`: This Idempotency-Key already placed an order (for example 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 after 8 seconds.
            `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. `details`
            says why: `{field: sku, message: SERVICE_DISABLED}` or `GROUP_DISABLED`.
            `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was
            charged. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance. `retry_after_seconds` and
            the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors: &a4
        - status: 400
          code: VALIDATION_ERROR
          when: 'A field is missing, invalid or of the wrong JSON type (`phone_number must be a string.`), a
            naira field such as `amount` was sent instead of `amount_kobo`, or the Idempotency-Key
            is over 100 characters. Airtime only: the network and type are not on sale. Purchases by
            sku only: the sku belongs to another service ("DATA_MTN_SME_1GB" is not a TV package.
            Choose one from the TV packages list.), or an amount was sent for a fixed-price plan.
            The message says which.'
        - status: 400
          code: IDEMPOTENCY_KEY_REQUIRED
          when: No Idempotency-Key header.
        - status: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - *a1
        - *a2
        - status: 403
          code: WALLET_LOCKED
          when: Your live wallet is on hold ("Your wallet is on hold, so it cannot be used right now. Your
            money is safe. Contact support to sort it out.").
        - status: 404
          code: PRODUCT_NOT_FOUND
          when: "Purchases by sku only: the sku is unknown or switched off."
        - status: 404
          code: PRICING_RULE_NOT_FOUND
          when: The product has no price for your account type yet.
        - status: 404
          code: WALLET_NOT_FOUND
          when: Your live wallet does not exist.
        - 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 (the amount is not
            compared). `retry_after_seconds` says how long to wait.
        - status: 409
          code: ORDER_ALREADY_PLACED
          when: This Idempotency-Key already placed an order (for example 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 after 8 seconds.
        - 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. In test mode the message gives the test wallet balance and how
            to reset it.
        - 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. `details` says why: `{field: sku, message:
            SERVICE_DISABLED}` or `GROUP_DISABLED`."
        - status: 503
          code: NO_PROVIDERS_AVAILABLE
          when: No provider can fulfil the order right now. Nothing was charged.
        - *a3
  /vtu/airtime/bulk:
    post:
      operationId: bulk-airtime
      x-idempotent: true
      parameters:
        - $ref: "#/components/parameters/IdempotencyKey"
      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.


        Every 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. The 50-number limit counts numbers after repeats are merged. Bulk
        requests do not take `reference` or `callback_url`; webhooks go to your account webhook URL.
        Sending the same Idempotency-Key again returns the existing batch with `202`.
      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, more than 50 numbers
            (\"A batch can have up to 50 numbers. This one has 62.\"), the airtime network or type
            is not on sale (\"We don't sell Glo GIFTING airtime right now.\"), the data sku is not a
            data plan, or the Idempotency-Key is over 100 characters. `BULK_LINES_INVALID`: One or
            more lines cannot be bought. `details` lists each one as `{field: \"recipients[3]\",
            message}` (`phone_numbers[3]` for data), for example \"You just bought this for 0803 111
            2220. Remove the line or try again in 40 seconds.\" 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"
        "401":
          description: "Unauthorized. `UNAUTHORIZED`: The key is missing, 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.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way. `WALLET_LOCKED`: Your live wallet is on hold."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `PRODUCT_NOT_FOUND`: The data sku is unknown or switched off.
            `PRICING_RULE_NOT_FOUND`: The product has no price for your account type yet.
            `WALLET_NOT_FOUND`: Your live wallet does not exist."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "409":
          description: "Conflict. `IDEMPOTENCY_IN_FLIGHT`: The first request with this key is still running
            after 8 seconds. `IDEMPOTENCY_PAYLOAD_MISMATCH`: This key was used with a different
            body."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: "Unprocessable. `INSUFFICIENT_BALANCE`: Not enough available balance for the whole
            batch. `DAILY_LIMIT_EXCEEDED`: Customer accounts only: the batch exceeds your daily
            limit."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable.
            `SERVICE_MAINTENANCE`: Pay Sef is under maintenance. `retry_after_seconds` and the
            `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors: &a5
        - status: 400
          code: VALIDATION_ERROR
          when: A field is missing or invalid, more than 50 numbers ("A batch can have up to 50 numbers. This
            one has 62."), the airtime network or type is not on sale ("We don't sell Glo GIFTING
            airtime right now."), the data sku is not a data plan, or the Idempotency-Key is over
            100 characters.
        - 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), for example "You just bought this for 0803 111
            2220. Remove the line or try again in 40 seconds." 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: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - *a1
        - *a2
        - status: 403
          code: WALLET_LOCKED
          when: Your live wallet is on hold.
        - status: 404
          code: PRODUCT_NOT_FOUND
          when: The data sku is unknown or switched off.
        - status: 404
          code: PRICING_RULE_NOT_FOUND
          when: The product has no price for your account type yet.
        - status: 404
          code: WALLET_NOT_FOUND
          when: Your live wallet does not exist.
        - status: 409
          code: IDEMPOTENCY_IN_FLIGHT
          when: The first request with this key is still running after 8 seconds.
        - 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 for the whole batch.
        - status: 422
          code: DAILY_LIMIT_EXCEEDED
          when: "Customer accounts only: the batch exceeds your daily limit."
        - status: 503
          code: PRODUCT_UNAVAILABLE
          when: The product is temporarily unavailable.
        - *a3
  /vtu/data/purchase:
    post:
      operationId: purchase-data
      x-idempotent: true
      parameters:
        - $ref: "#/components/parameters/IdempotencyKey"
      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.`), a naira field such as `amount` was sent instead of
            `amount_kobo`, or the Idempotency-Key is over 100 characters. Airtime only: the network
            and type are not on sale. Purchases by sku only: the sku belongs to another service
            ("DATA_MTN_SME_1GB" is not a TV package. Choose one from the TV packages list.), or an
            amount was sent for a fixed-price plan. The message says which.
            `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.'
          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"
        "403":
          description: 'Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way. `WALLET_LOCKED`: Your live wallet is on hold ("Your wallet is on
            hold, so it cannot be used right now. Your money is safe. Contact support to sort it
            out.").'
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `PRODUCT_NOT_FOUND`: Purchases by sku only: the sku is unknown or switched
            off. `PRICING_RULE_NOT_FOUND`: The product has no price for your account type yet.
            `WALLET_NOT_FOUND`: Your live wallet does not exist."
          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 (the amount is not compared). `retry_after_seconds` says how long to wait.
            `ORDER_ALREADY_PLACED`: This Idempotency-Key already placed an order (for example 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 after 8 seconds.
            `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. `details`
            says why: `{field: sku, message: SERVICE_DISABLED}` or `GROUP_DISABLED`.
            `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was
            charged. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance. `retry_after_seconds` and
            the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors: *a4
  /vtu/data/bulk:
    post:
      operationId: bulk-data
      x-idempotent: true
      parameters:
        - $ref: "#/components/parameters/IdempotencyKey"
      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, more than 50 numbers
            (\"A batch can have up to 50 numbers. This one has 62.\"), the airtime network or type
            is not on sale (\"We don't sell Glo GIFTING airtime right now.\"), the data sku is not a
            data plan, or the Idempotency-Key is over 100 characters. `BULK_LINES_INVALID`: One or
            more lines cannot be bought. `details` lists each one as `{field: \"recipients[3]\",
            message}` (`phone_numbers[3]` for data), for example \"You just bought this for 0803 111
            2220. Remove the line or try again in 40 seconds.\" 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"
        "401":
          description: "Unauthorized. `UNAUTHORIZED`: The key is missing, 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.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way. `WALLET_LOCKED`: Your live wallet is on hold."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `PRODUCT_NOT_FOUND`: The data sku is unknown or switched off.
            `PRICING_RULE_NOT_FOUND`: The product has no price for your account type yet.
            `WALLET_NOT_FOUND`: Your live wallet does not exist."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "409":
          description: "Conflict. `IDEMPOTENCY_IN_FLIGHT`: The first request with this key is still running
            after 8 seconds. `IDEMPOTENCY_PAYLOAD_MISMATCH`: This key was used with a different
            body."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: "Unprocessable. `INSUFFICIENT_BALANCE`: Not enough available balance for the whole
            batch. `DAILY_LIMIT_EXCEEDED`: Customer accounts only: the batch exceeds your daily
            limit."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `PRODUCT_UNAVAILABLE`: The product is temporarily unavailable.
            `SERVICE_MAINTENANCE`: Pay Sef is under maintenance. `retry_after_seconds` and the
            `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors: *a5
  /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)); Pay Sef
        finds the TV provider from it. A well-formed request always returns `200`; check `is_valid`.
        No Idempotency-Key is needed.


        A verified smartcard also carries, when the network reports them, `current_bouquet`,
        `due_date` (usually `YYYY-MM-DD`) and `renewal_amount_kobo` (what renewing the current
        bouquet costs); each is `null` when unknown. `can_renew` is `true` only when the smartcard
        verified and `renewal_amount_kobo` is known. Offer "renew" on this flag: a `renew` purchase
        without a known renewal price answers `400`.


        The 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
                      current_bouquet: DStv Compact
                      due_date: 2026-12-01
                      renewal_amount_kobo: 1570000
                      can_renew: true
                    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
                      current_bouquet: null
                      due_date: null
                      renewal_amount_kobo: null
                      can_renew: false
                      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"
        "401":
          description: "Unauthorized. `UNAUTHORIZED`: The key is missing, 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.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: "Server error. `CONFIGURATION_ERROR`: Pay Sef cannot check these details right now (no
            provider is set up for it). Try again later or contact support."
          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"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          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: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - *a1
        - *a2
        - &a6
          status: 500
          code: CONFIGURATION_ERROR
          when: Pay Sef cannot check these details right now (no provider is set up for it). Try again later
            or contact support.
        - status: 502
          code: EXTERNAL_PROVIDER_ERROR
          when: The provider could not be reached.
        - *a3
  /vtu/cable/purchase:
    post:
      operationId: purchase-cable
      x-idempotent: true
      parameters:
        - $ref: "#/components/parameters/IdempotencyKey"
      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.


        `subscription_type` is optional. `change` buys the bouquet in `sku`; `renew` renews the
        decoder's current bouquet at that plan's price, so send it only when [Validate a
        smartcard](#validate-smartcard) returned `can_renew: true`. When the network's renewal price
        differs from the plan's, `renew` answers `400 VALIDATION_ERROR` naming both amounts and
        nothing is held. Left out, the bouquet in `sku` is bought.
      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.`), a naira field such as `amount` was sent instead of
            `amount_kobo`, or the Idempotency-Key is over 100 characters. Airtime only: the network
            and type are not on sale. Purchases by sku only: the sku belongs to another service
            ("DATA_MTN_SME_1GB" is not a TV package. Choose one from the TV packages list.), or an
            amount was sent for a fixed-price plan. The message says which.
            `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.'
          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"
        "403":
          description: 'Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way. `WALLET_LOCKED`: Your live wallet is on hold ("Your wallet is on
            hold, so it cannot be used right now. Your money is safe. Contact support to sort it
            out.").'
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `PRODUCT_NOT_FOUND`: Purchases by sku only: the sku is unknown or switched
            off. `PRICING_RULE_NOT_FOUND`: The product has no price for your account type yet.
            `WALLET_NOT_FOUND`: Your live wallet does not exist."
          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 (the amount is not compared). `retry_after_seconds` says how long to wait.
            `ORDER_ALREADY_PLACED`: This Idempotency-Key already placed an order (for example 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 after 8 seconds.
            `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. `details`
            says why: `{field: sku, message: SERVICE_DISABLED}` or `GROUP_DISABLED`.
            `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was
            charged. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance. `retry_after_seconds` and
            the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors: *a4
  /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)); Pay Sef finds the distribution company from
        it. Postpaid meters, and meters whose type the distribution company does not report, return
        `is_valid: false`; only prepaid electricity is supported. A well-formed request always
        returns `200`; check `is_valid`.


        The old `biller` field is refused with `400`: "Use sku instead of biller (the sku of the
        electricity plan you will buy)."
      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"
        "401":
          description: "Unauthorized. `UNAUTHORIZED`: The key is missing, 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.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: "Server error. `CONFIGURATION_ERROR`: Pay Sef cannot check these details right now (no
            provider is set up for it). Try again later or contact support."
          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"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          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: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - *a1
        - *a2
        - *a6
        - status: 502
          code: EXTERNAL_PROVIDER_ERROR
          when: The provider could not be reached.
        - *a3
  /vtu/electricity/purchase:
    post:
      operationId: purchase-electricity
      x-idempotent: true
      parameters:
        - $ref: "#/components/parameters/IdempotencyKey"
      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: the token itself, with no label in front, the
        same whichever network delivered it. Format it for display however suits your customers."
      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: Purchase for 45012345670
                  face_value_kobo: 100000
                  amount_debited_kobo: 99000
                  status: SUCCESS_SETTLED
                  customer_status: delivered
                  money_location: spent
                  is_test: false
                  token: "12345678901234567890"
                  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.`), a naira field such as `amount` was sent instead of
            `amount_kobo`, or the Idempotency-Key is over 100 characters. Airtime only: the network
            and type are not on sale. Purchases by sku only: the sku belongs to another service
            ("DATA_MTN_SME_1GB" is not a TV package. Choose one from the TV packages list.), or an
            amount was sent for a fixed-price plan. The message says which.
            `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.'
          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"
        "403":
          description: 'Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way. `WALLET_LOCKED`: Your live wallet is on hold ("Your wallet is on
            hold, so it cannot be used right now. Your money is safe. Contact support to sort it
            out.").'
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `PRODUCT_NOT_FOUND`: Purchases by sku only: the sku is unknown or switched
            off. `PRICING_RULE_NOT_FOUND`: The product has no price for your account type yet.
            `WALLET_NOT_FOUND`: Your live wallet does not exist."
          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 (the amount is not compared). `retry_after_seconds` says how long to wait.
            `ORDER_ALREADY_PLACED`: This Idempotency-Key already placed an order (for example 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 after 8 seconds.
            `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. `details`
            says why: `{field: sku, message: SERVICE_DISABLED}` or `GROUP_DISABLED`.
            `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was
            charged. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance. `retry_after_seconds` and
            the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors: *a4
  /vtu/exam/validate:
    post:
      operationId: validate-exam-profile
      tags:
        - Exam PINs
      summary: Validate a JAMB profile ID
      description: Checks a candidate's JAMB profile ID with the exam body and returns the candidate's
        name, so your customer can confirm it before paying. Only plans whose PIN is tied to a
        candidate profile (JAMB UTME and Direct Entry) can be validated. Send the `sku` of the plan
        you are about to buy (the same value you send to [Buy an exam PIN](#purchase-exam-pin)); the
        exam body checks the profile against that exam type. Spaces in `profile_id` are removed
        before it is checked. A well-formed request always returns `200`; check `is_valid`. No
        Idempotency-Key is needed.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExamProfileValidate"
            example:
              sku: EXAM_JAMB_UTME_PIN
              profile_id: "1234567890"
      responses:
        "200":
          description: Profile ID verified.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status_code:
                    type: integer
                  message:
                    type: string
                  data:
                    $ref: "#/components/schemas/ExamProfileResult"
                  meta:
                    $ref: "#/components/schemas/Meta"
              examples:
                default:
                  summary: Profile ID verified.
                  value:
                    success: true
                    status_code: 200
                    message: Profile ID verified.
                    data:
                      is_valid: true
                      customer_name: OKONKWO CHIDINMA ADA
                    meta:
                      request_id: 01JAAXH6Z9R3M2K8Q4T7V5W1YB
                      timestamp: 2026-10-17T12:00:00.123456Z
                not-valid:
                  summary: Profile ID could not be verified.
                  value:
                    success: true
                    status_code: 200
                    message: Profile ID could not be verified.
                    data:
                      is_valid: false
                      customer_name: null
                      error_message: We couldn't verify profile ID •••• 7890. Check it on your JAMB profile and try again.
                    meta:
                      request_id: 01JAAXH6Z9R3M2K8Q4T7V5W1YB
                      timestamp: 2026-10-17T12:00:00.123456Z
        "400":
          description: 'Bad request. `VALIDATION_ERROR`: sku or profile_id is missing, profile_id is not 6 to
            20 letters or digits, the sku is not an exam PIN plan ("… is not one of our exam PIN
            plans. Use a sku from the exam PIN catalogue."), or the plan does not use a profile ID
            ("This exam PIN does not use a profile ID. Buy it with phone_number only.").'
          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"
        "403":
          description: "Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: "Server error. `CONFIGURATION_ERROR`: Pay Sef cannot check these details right now (no
            provider is set up for it). Try again later or contact support."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "502":
          description: "Bad gateway. `EXTERNAL_PROVIDER_ERROR`: The exam body could not be reached."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors:
        - status: 400
          code: VALIDATION_ERROR
          when: sku or profile_id is missing, profile_id is not 6 to 20 letters or digits, the sku is not an
            exam PIN plan ("… is not one of our exam PIN plans. Use a sku from the exam PIN
            catalogue."), or the plan does not use a profile ID ("This exam PIN does not use a
            profile ID. Buy it with phone_number only.").
        - status: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - *a1
        - *a2
        - *a6
        - status: 502
          code: EXTERNAL_PROVIDER_ERROR
          when: The exam body could not be reached.
        - *a3
  /vtu/exam/purchase:
    post:
      operationId: purchase-exam-pin
      x-idempotent: true
      parameters:
        - $ref: "#/components/parameters/IdempotencyKey"
      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.


        The 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: Purchase for 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.`), a naira field such as `amount` was sent instead of
            `amount_kobo`, or the Idempotency-Key is over 100 characters. Airtime only: the network
            and type are not on sale. Purchases by sku only: the sku belongs to another service
            ("DATA_MTN_SME_1GB" is not a TV package. Choose one from the TV packages list.), or an
            amount was sent for a fixed-price plan. The message says which.
            `IDEMPOTENCY_KEY_REQUIRED`: No Idempotency-Key header.'
          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"
        "403":
          description: 'Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way. `WALLET_LOCKED`: Your live wallet is on hold ("Your wallet is on
            hold, so it cannot be used right now. Your money is safe. Contact support to sort it
            out.").'
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `PRODUCT_NOT_FOUND`: Purchases by sku only: the sku is unknown or switched
            off. `PRICING_RULE_NOT_FOUND`: The product has no price for your account type yet.
            `WALLET_NOT_FOUND`: Your live wallet does not exist."
          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 (the amount is not compared). `retry_after_seconds` says how long to wait.
            `ORDER_ALREADY_PLACED`: This Idempotency-Key already placed an order (for example 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 after 8 seconds.
            `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. `details`
            says why: `{field: sku, message: SERVICE_DISABLED}` or `GROUP_DISABLED`.
            `NO_PROVIDERS_AVAILABLE`: No provider can fulfil the order right now. Nothing was
            charged. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance. `retry_after_seconds` and
            the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors: *a4
  /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: cursor
          in: query
          description: The `next_cursor` from the previous page's `meta.pagination`. Leave it out for the
            first page; stop when `has_more` is false. There is no `offset`.
          schema:
            type: string
            format: uuid
        - 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/MetaCursor"
              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: Purchase for 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
                    next_cursor: null
                    prev_cursor: null
        "400":
          description: "Bad request. `INVALID_CURSOR`: The cursor is not an order id. Another account's order
            id returns an empty page. `VALIDATION_ERROR`: Unknown status value (the message lists
            the valid ones), or an `offset` other than 0."
          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"
        "403":
          description: "Forbidden. `IP_NOT_WHITELISTED`: The request came from outside your IP allowlist.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      x-errors:
        - status: 400
          code: INVALID_CURSOR
          when: The cursor is not an order id. Another account's order id returns an empty page.
        - status: 400
          code: VALIDATION_ERROR
          when: Unknown status value (the message lists the valid ones), or an `offset` other than 0.
        - status: 401
          code: UNAUTHORIZED
          when: The key is missing, invalid or revoked.
        - *a1
        - *a2
        - *a3
  /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. It finds the order whichever of your keys (test or live) created it; check `is_test`.
      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: Purchase for 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
        "401":
          description: "Unauthorized. `UNAUTHORIZED`: The key is missing, 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.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: 'Not found. `NOT_FOUND`: No order on your account matches ("Order not found.").'
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          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: NOT_FOUND
          when: No order on your account matches ("Order not found.").
        - *a1
        - *a2
        - *a3
  /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. Like Get an order, it
        finds test and live orders with either key."
      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: Purchase for 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
        "401":
          description: "Unauthorized. `UNAUTHORIZED`: The key is missing, 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.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: 'Not found. `NOT_FOUND`: No order matches ("No order found matching the provided
            reference."). If your purchase timed out, it was not created.'
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          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: NOT_FOUND
          when: No order matches ("No order found matching the provided reference."). If your purchase timed
            out, it was not created.
        - *a1
        - *a2
        - *a3
  /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. `items` is left out when the batch
        has no orders.
      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: Purchase for 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
        "401":
          description: "Unauthorized. `UNAUTHORIZED`: The key is missing, 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.
            `ACCOUNT_SUSPENDED`: The account is suspended. `ACCOUNT_FROZEN` and `ACCOUNT_CLOSED`
            work the same way."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "Not found. `NOT_FOUND`: No batch with that id on your account."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: "Unavailable. `SERVICE_MAINTENANCE`: Pay Sef is under maintenance.
            `retry_after_seconds` and the `Retry-After` header say when to try again."
          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: NOT_FOUND
          when: No batch with that id on your account.
        - *a1
        - *a2
        - *a3
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: pays_test_<48 hex> | pays_live_<48 hex>
      description: Your API key from Developer settings in the Pay Sef app.
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: A unique value you generate for this order (for example a UUID), up to 100 characters,
        reused unchanged if you retry. Keys are per account, not per endpoint or key mode. See
        https://paysef.com/docs/idempotency.
      schema:
        type: string
        maxLength: 100
      example: 6f9c1d2e-8a4b-4c3d-9e1f-2a3b4c5d6e7f
  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: Purchase for 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: Purchase for 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 did not go through. Your money is back in your wallet.
            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: Purchase for 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
          description: UTC, ISO 8601 ending in `Z`.
    MetaCursor:
      type: object
      properties:
        request_id:
          type: string
        timestamp:
          type: string
          format: date-time
          description: UTC, ISO 8601 ending in `Z`.
        pagination:
          type: object
          description: A cursor page. Every list endpoint uses this shape.
          required:
            - limit
            - has_more
            - next_cursor
            - prev_cursor
          properties:
            limit:
              type: integer
              description: The page size actually used.
            has_more:
              type: boolean
              description: True when there are more entries after this page.
            next_cursor:
              type:
                - string
                - "null"
              description: Pass as `cursor` to get the next (older) page; `null` on the last page.
            prev_cursor:
              type:
                - string
                - "null"
              description: Where the endpoint pages backwards, pass as `cursor` with `direction=prev` for the
                newer page; otherwise `null`.
    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 to show people. Do not parse it or branch on 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: On `DUPLICATE_PURCHASE`, `SERVICE_MAINTENANCE`, and `RATE_LIMIT_EXCEEDED` when the wait
            is known (the longest to wait before the limit resets). A `429` or `503` that carries it
            also sends it as the `Retry-After` header.
        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
            - ESIM
          description: "`ESIM` is reserved for a service that is not on sale yet."
        is_active:
          type: boolean
          description: Always `true`; only active services are listed.
        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. For data: `SME`, `GIFTING`, `CORPORATE`, `AWOOF`,
            `DATA_SHARE` or `DIRECT`. Absent when not applicable."
        validity_period:
          type:
            - string
            - "null"
          description: For example `30 days`.
        data_size:
          type: string
          description: Data bundles with a type 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).
              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 KYC tier and daily spend limit (`kyc_tier`, `daily_limit_kobo`,
            `daily_spent_today_kobo`, `daily_remaining_kobo`, `resets_at`, `next_tier`,
            `next_tier_daily_limit_kobo`). It is returned for every account, but API Partner
            accounts are not held to the limit."
        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`. Kept for
            integrations that already read it; show `label`.
        label:
          type: string
          description: "Sentence-case name to show: `Purchase`, `Wallet top-up`, `Refund`, `Cashback`,
            `Referral reward`, `Adjustment`, …"
        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: "Delivery details on the entry, when there are any: any of `token`, `delivery_token`,
            `units`, `meter_number`, `pin`, `serial_number`."
        order_id:
          type: string
          format: uuid
          description: Purchases only. The order this entry came from.
        order_ref:
          type: string
          description: Purchases only.
        customer_status:
          $ref: "#/components/schemas/CustomerStatus"
        deposit_reference:
          type: string
          description: Wallet top-ups only. The reference support asks for, e.g. `DEP-20261017-7C1A9E3B5D2F`.
        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
        label:
          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_id:
          type: string
          format: uuid
          description: Purchases only.
        order_ref:
          type: string
          description: Purchases only.
        customer_status:
          $ref: "#/components/schemas/CustomerStatus"
        order_status:
          type: string
          enum:
            - Successful
            - Failed
            - Refunded
            - Under review
            - Processing
          deprecated: true
          description: Purchases only. A display label; branch on `customer_status` instead.
        deposit_reference:
          type: string
          description: Wallet top-ups only.
        deposit:
          $ref: "#/components/schemas/TransactionDeposit"
        narration:
          type: string
        batch_reference:
          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: Delivery details, as on List transactions.
        created_at:
          type: string
          format: date-time
    TransactionDeposit:
      type: object
      description: Wallet top-ups only. The bank transfer behind the entry.
      properties:
        deposit_reference:
          type:
            - string
            - "null"
          description: The reference support asks for.
        paid_at:
          type:
            - string
            - "null"
          format: date-time
          description: When the payer's bank made the transfer (UTC).
        gross_amount_kobo:
          type: integer
          description: What was sent. `gross = fee + net`.
        fee_kobo:
          type: integer
        net_amount_kobo:
          type: integer
          description: What reached the wallet; equals the entry's `amount_kobo`.
        gateway_reference:
          type: string
        session_id:
          type:
            - string
            - "null"
        sender:
          type:
            - object
            - "null"
          description: "`null` when the bank did not say who paid."
          properties:
            name:
              type:
                - string
                - "null"
              description: Shortened, e.g. `Ibrahim A.`
            bank_name:
              type:
                - string
                - "null"
            account_last4:
              type:
                - string
                - "null"
    CustomerStatus:
      type: string
      enum:
        - processing
        - delivered
        - failed
      description: The three states to branch on, the same on orders, transactions and webhooks whichever
        network delivered the order.
    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: Pay Sef 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: A short label for the order, today `Purchase for 08031234560`. Show it as is; do not
            parse it.
        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. `FAILED_UNRESERVED` means the order failed and the hold was released;
            `FAILED_REFUNDED` means Pay Sef refunded it after a review."
        is_test:
          type: boolean
        token:
          type: string
          description: Electricity token (the token itself, with no label, e.g. `12345678901234567890`), 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: "Plain language you can show your customer. On a failed order: `This order did not go
            through. Your money is back in your wallet.` On `ADMIN_MANUAL_REVIEW`: `We are checking
            this order with the network. Your money is on hold, not spent.` Absent otherwise."
        metadata:
          type: object
          description: "Delivery details only: any of `token`, `delivery_token`, `units`, `meter_number`,
            `pin`, `serial_number`. Can be `{}`. 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). Left out when the batch has no orders.
          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, as a string of up to 100 characters. 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: A public HTTPS URL, up to 500 characters, 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`.
        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`. A line can also be a plain phone number string.
          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"
        current_bouquet:
          type:
            - string
            - "null"
          description: The bouquet on the decoder now
          when the network reports it.: null
        due_date:
          type:
            - string
            - "null"
          description: When the current bouquet ends, as the network sends it (usually `YYYY-MM-DD`).
        renewal_amount_kobo:
          type:
            - integer
            - "null"
          description: What renewing the current bouquet costs, in kobo, when the network reports it.
        can_renew:
          type: boolean
          description: True only when the smartcard verified and `renewal_amount_kobo` is known. Offer renew
            on this flag.
        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
        subscription_type:
          type: string
          enum:
            - renew
            - change
          description: "Optional. `renew`: the current bouquet at the plan's price. `change`: the bouquet in
            `sku`. Left out: the bouquet in `sku`."
        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"
    ExamProfileValidate:
      type: object
      required:
        - sku
        - profile_id
      properties:
        sku:
          type: string
          description: The `sku` of the JAMB plan you will buy, from the EXAM_PIN catalogue. The exam type is
            taken from it.
        profile_id:
          type: string
          description: "The candidate's JAMB profile ID: 6 to 20 letters or digits. Spaces are removed."
    ExamProfileResult:
      type: object
      properties:
        is_valid:
          type: boolean
        customer_name:
          type:
            - string
            - "null"
          description: The candidate's name, when the profile is verified.
        error_message:
          type: string
          description: Only when `is_valid` is false.
    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"
