> ## Documentation Index
> Fetch the complete documentation index at: https://developer.nomba.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vend Airtime

> How to vend Airtime using this API

<CardGroup cols={2}>
  <Card title="Vend airtime via the parent account" icon="link-simple" href="/nomba-api-reference/airtime-and-data-vending/make-airtime-purchases-via-parent-account" />
</CardGroup>

# `POST /v1/bill/topup`

<CodeGroup>
  ```bash Request theme={null}
    curl --location 'https://api.nomba.com/v1/bill/topup' \
    --header 'accountId: <accountId>' \
    --header 'Authorization: Bearer <token>' \
    --data '{
        "amount": 50,
        "phoneNumber": "08012345678",
        "network": "MTN",
        "merchantTxRef": "test1116",
        "senderName": "Testing"
    }'
  ```

  ```json Response theme={null}
  {
      "code": "202",
      "description": "Processing...",
      "data": {
          "amount": "50",
          "meta": {
            "merchantTxRef": "test1116",
            "rrn": "240626232937"
          },
          "timeCreated": "2024-06-26T22:29:37.649Z",
          "type": "topup",
          "status": "Processing..."
      }
  }
  ```
</CodeGroup>

#### Request body

<ParamField body="amount" type="integer" required>
  Amount
</ParamField>

<ParamField body="phoneNumber" type="string" required>
  Phone number of the user who is to receive the value
</ParamField>

<ParamField body="network" type="string" required>
  Network (e.g. MTN, AIRTEL, GLO, 9MOBILE, etc)
</ParamField>

<ParamField body="merchantTxRef" type="string" required>
  Merchant Transaction Reference (a unique reference to identify this
  transaction on your system)
</ParamField>

#### Response body

<ResponseField name="code" type="string" required>
  Response code
</ResponseField>

<ResponseField name="description" type="string" required>
  Response description
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="object" defaultOpen="true">
    <ResponseField name="amount" type="string" required>
      Amount
    </ResponseField>

    <ResponseField name="meta" type="object">
      <Expandable title="object" defaultOpen="false">
        <ResponseField name="merchantTxRef" type="string">
          Merchant Transaction Reference
        </ResponseField>

        <ResponseField name="rrn" type="string">
          Retrieval Reference Number (RRN)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="timeCreated" type="string" required>
      Date and Time of the transaction
    </ResponseField>

    <ResponseField name="type" type="string" required>
      The type of this transaction. This is most probably topup in this case
    </ResponseField>
  </Expandable>
</ResponseField>
