Skip to main content
POST
/
api
/
v1
/
electricity
/
buy
Buy electricity token
curl --request POST \
  --url https://api.dancity.app/api/v1/electricity/buy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "meterNumber": "45012345678",
  "billerCode": "EKEDC",
  "meterType": "prepaid",
  "amount": 2000,
  "customerName": "Jane Doe",
  "address": "12 Lekki Phase 1, Lagos",
  "customerRef": "ELEC-REF-001"
}
'
{
  "success": true,
  "message": "Electricity purchase processed",
  "data": {
    "transactionId": "TXN-20260506-004",
    "status": "SUCCESS",
    "token": "1234-5678-9012-3456"
  }
}

Authorizations

Authorization
string
header
required

Merchant API key from the Dancity dashboard.

Body

application/json
meterNumber
string
required
Example:

"45012345678"

billerCode
string
required

Biller code from GET /api/v1/products (e.g. EKEDC) or display name (e.g. Eko Electricity).

Example:

"EKEDC"

meterType
enum<string>
required
Available options:
prepaid,
postpaid
Example:

"prepaid"

amount
number
required
Required range: x >= 500
Example:

2000

customerName
string
required
Example:

"Jane Doe"

address
string
required
Example:

"12 Lekki Phase 1, Lagos"

customerRef
string
Example:

"ELEC-REF-001"

Response

OK