Retrieve betting records

You can retrieve a paginated list of betting record by parsing in the page and per_page in the request body as shown below.

Example Request

var axios = require('axios');

var config = {
  method: 'get',
  url: 'http://localhost:4000/bet_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": "Bet records returned",
  "data": {
    "bet_records": [
      {
        "id": 5,
        "merchant_email": "ciroma@gmail.com",
        "reference": "202208241337JAFEDAF",
        "status": "successful",
        "refunded": 0,
        "customer_id": "15096891",
        "amount": 500,
        "amount_charged": 500,
        "currency": "NGN",
        "provider": "1",
        "merchant_reference": "123456785",
        "type": "Bet9ja",
        "trx_id": "16613410491207224533742404009",
        "name": "CHUKWUKA CIROMA",
        "created_at": "2022-08-24T11:37:27.000Z"
      },
      {
        "id": 4,
        "merchant_email": "chibuokemibezim@gmail.com",
        "reference": "202208231834DACEGEI",
        "status": "successful",
        "refunded": 0,
        "customer_id": "15096891",
        "amount": 500,
        "amount_charged": 500,
        "currency": "NGN",
        "provider": "1",
        "merchant_reference": "123456",
        "type": "Bet9ja",
        "trx_id": "16612724818883478711609980917",
        "name": "CHIBUOKEM IBEZIM",
        "created_at": "2022-08-23T16:34:40.000Z"
      },
      {
        "id": 3,
        "merchant_email": "chibuokemibezim@gmail.com",
        "reference": "202208231824HJGJAAG",
        "status": "successful",
        "refunded": 0,
        "customer_id": "15096891",
        "amount": 100,
        "amount_charged": 100,
        "currency": "NGN",
        "provider": "1",
        "merchant_reference": "123456",
        "type": "Bet9ja",
        "trx_id": "16612718581574853336873378533",
        "name": "CHIBUOKEM IBEZIM",
        "created_at": "2022-08-23T16:24:17.000Z"
      },
      {
        "id": 2,
        "merchant_email": "chibuokemibezim@gmail.com",
        "reference": "202208231822AJGGHEA",
        "status": "pending",
        "refunded": 0,
        "customer_id": "15096891",
        "amount": 100,
        "amount_charged": 100,
        "currency": "NGN",
        "provider": "1",
        "merchant_reference": "123456",
        "type": "Bet9ja",
        "trx_id": null,
        "name": "CHIBUOKEM IBEZIM",
        "created_at": "2022-08-23T16:22:33.000Z"
      },
      {
        "id": 1,
        "merchant_email": "chibuokemibezim@gmail.com",
        "reference": "202208231816FHGBIED",
        "status": "pending",
        "refunded": 0,
        "customer_id": "15096891",
        "amount": 200,
        "amount_charged": 200,
        "currency": "NGN",
        "provider": "1",
        "merchant_reference": "123456",
        "type": "Bet9ja",
        "trx_id": null,
        "name": "CHIBUOKEM IBEZIM",
        "created_at": "2022-08-23T16:16:44.000Z"
      }
    ],
    "pagination": {
      "perPage": 10,
      "currentPage": 1,
      "nextPage": null,
      "prevPage": null,
      "totalPages": 1,
      "total": 5
    }
  }
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!