Retrieve all airtime records

Raven atlas API allows you to retrieve paginated airtime records by making a GET request to the endpoint /airtime/records/ parsing the per_page and page as query params as shown in the example below

Example Requests

var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://integrations.getravenbank.com/v1/airtime/records?page=1&per_page=10',
  headers: { }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Example Response

{
  "status": "success",
  "message": "Airtime records returned",
  "data": {
    "airtime_records": [
      {
        "id": 19,
        "merchant_email": "test@gmail.com",
        "phone_number": "07038273323",
        "reference": "20220824164215kcntx8a3stwe0ffyzd2fe",
        "status": "successful",
        "refunded": 0,
        "network": "MTN",
        "request_id": "20220824164215kcntx8a3stwe0ffyzd2fe",
        "amount": 100,
        "amount_charged": 100,
        "currency": "NGN",
        "provider": "1",
        "merchant_reference": "2234567467",
        "created_at": "2022-08-24T15:42:15.000Z"
      },
      {
        "id": 18,
        "merchant_email": "test@gmail.com",
        "phone_number": "07038273323",
        "reference": "202208241639331oj4fs395my3nrcsgbeym8",
        "status": "successful",
        "refunded": 0,
        "network": "MTN",
        "request_id": "202208241639331oj4fs395my3nrcsgbeym8",
        "amount": 100,
        "amount_charged": 100,
        "currency": "NGN",
        "provider": "1",
        "merchant_reference": "22345676",
        "created_at": "2022-08-24T15:39:33.000Z"
      }
    ],
    "pagination": {
      "perPage": 10,
      "currentPage": 1,
      "nextPage": 2,
      "prevPage": null,
      "totalPages": 2,
      "total": 19
    }
  }
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!