VTU API
Get API keys
Electricity API

Payment

POST https://api.paybeta.ng/v2/electricity/purchase
Send your secret key in the P-API-KEY header. Keep it on your server, never in an app or browser.

Body (JSON)

  • service string Required
    Example: ikeja-electric
  • meterNumber string Required
    Example: 042***3016
  • meterType string Required
    Example: prepaid
  • amount integer Required
    Example: 2000
  • customerName string Required
    Example: MR JOHN DOE
  • customerAddress string Required
    Example: 1 JOHN DOE STR
  • reference string Required
    Example: {{$timestamp}}

Responses

  • 200Success
Request
curl --request POST \
  --url 'https://api.paybeta.ng/v2/electricity/purchase' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'P-API-KEY: YOUR_SECRET_KEY' \
  --data '{
    "service": "ikeja-electric",
    "meterNumber": "042***3016",
    "meterType": "prepaid",
    "amount": 2000,
    "customerName": "MR JOHN DOE",
    "customerAddress": "1 JOHN DOE STR",
    "reference": "{{$timestamp}}"
}'
Response
{
    "status": "successful",
    "message": "Transaction successful",
    "data": {
        "reference": "1715455653",
        "amount": 1000,
        "chargedAmount": 496.5,
        "commission": 3.5,
        "biller": "Ikeja Electricity - IKEDC",
        "customerId": "10428776010",
        "token": "3193-6233-0096-7827-3805",
        "unit": "44.6",
        "bonusToken": "",
        "transactionDate": "2024-05-11 20:27:33",
        "transactionId": "17154556531428310982"
    }
}