Buy Airtime

Buy airtime for calling and other mobile services

POST {{ BASE_URL }}/v1/corporate/airtime

Body Parameters

Property
Data Type
Description
Example
Required

amount

number

The airtime amount you want to buy

2000

Yes

phoneNumber

string

The recipient 11-digit phone number.

"08137031202"

Yes

phoneCode

string

The recipient phone number country call code.

"+234"

Yes

network

string

The network label from using the List Networks endpoint.

"mtn"

Yes

pin

string

Your 4-digit transaction PIN

"0000"

Yes

reference

string

Your preferred transaction reference

"txref_0937638BCC"

No

import Axios from 'axios';

// set the api url
const API_URL = `${BASE_URL}/v1/corporate/airtime`;

// define request data
const data = {
    amount: 1000,
    phoneNumber: "08137031202",
    phoneCode: "+234"
    network: "mtn",
    pin: "0000",
    reference: "txref_09376384BCC"
}

// make request using axios
Axios({
    method: "POST",
    url: `${API_URL}`,
    headers: {
        lg: 'en',
        ch: 'web'
        Authorization: `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
    },
    data: data
}).then((resp) => {
    console.log(resp)
}).catch((err) => {
    console.log(err)
})

Last updated