Purchase Electricity

This endpoint allows you to get free cakes.

POST https://payments.baxipay.com.ng/api/baxipay/services/electricity/request

Parameters

Header

Baxi-date string Date in RFC format

Authorization string See the authentication page

Body

phone string This is the 11-digit phone number of the payer.

amount string This is the amount you are willing to purchase or pay for.

account_number string This is the meter or account number.

service_type string This is the service type of the bill you are trying to pay for.

agentRefernce string Unique Id generated by the integrator to identify this particular
transaction.

agentId number Unique identification of the integrator.

Responses

  • 200 The transaction response for a postpaid is similar to other responses
    described in this documentation.

                                                              For prepaid. Three (3) extra fields are added to describe the:
    
                                                              tokenCode: This is the token which will be used to recharge the meter. 
                                                              (Mandatory)
                                                              amountOfPower: This is the equivalent amount of power purchased in 
                                                              kwh. (optional)
                                                              tokenAmount: This is the amount paid (optional)                            
    
// PREPAID
{
  "status": "success",
  "message": "Successful",
  "code": 200,
  "data": {
    "transactionStatus": "success",
    "transactionReference": 6,
    "statusCode": "0",
    "transactionMessage": "Payment Successful",
    "tokenCode": "03600873271267716521",
    "tokenAmount": 2000,
    "amountOfPower": "2000 kWh"
  }
}


// POSTPAID
{
  "status": "success",
  "message": "Successful",
  "code": 200,
  "data": {
    "transactionStatus": "success",
    "transactionReference": 7,
    "statusCode": "0",
    "transactionMessage": "Payment Successful"
  }
}