ZESA

ZESA services for seamless electricity management. Verify your ZESA account, get customer information, and purchase tokens effortlessly.

Check ZESA Account

Verify if an electricity user exists and retrieve customer information.

POST https://domain.xash.co.zw/api/v1/electricity/check-account

This endpoint checks if a ZESA account exists and retrieves customer information, including the full name and address associated with the provided electricity meter number. It utilizes the ESolutions class to interact with the ZESA system.

Headers

Name
Type
Description

String

Request Body

Name
Type
Description

currency*

String

The currency for the transaction. It must be either 'USD' or 'ZWL'.

meter_number*

String

he electricity meter number to check. It must be a numeric string.

{
  "success": true,
  "customer_name": "John Doe",
  "customer_address": "123 Main St",
  "meter_number": "1234567890"
}

Buy ZESA Tokens

This endpoint facilitates the purchase of ZESA tokens for a given electricity meter.

This endpoint facilitates the purchase of ZESA tokens for a given electricity meter.

POST https://domain.xash.co.zw/api/v1/electricity/buy-tokens

The buyTokens function accepts currency, meter number, and amount as parameters. It first verifies the account If the account is valid, it then proceeds to purchase tokens. If the purchase is successful, it returns the tokens, otherwise, it returns an error message.

Headers

Name
Type
Description

*

String

Request Body

Name
Type
Description

currency*

String

The currency for the transaction. It must be either 'USD' or 'ZWL'.

meter_number*

String

The electricity meter number to check. It must be a numeric string with a minimum length of 10.

amount*

Float

The amount of currency to buy tokens. It must be a numeric value greater than or equal to the minimum amount set in the system settings.

{
  "success": true,
  "message": "ZESA tokens purchased successfully.",
  "data": {
    "customer_name": "NDLOVU M",
    "customer_address": "MURAMBI",
    "meter_number": "14218811533",
    "meter_currency": "ZWL",
    "success": true,
    "reference": "6d2a312ee0ecf60b4a063c33c5388421a9de31dedc77602473cad88c3108567d",
    "kwh": "84.4",
    "energy": "ZWL11,603.78",
    "debt": "ZWL0.00",
    "rea": "ZWL696.22",
    "vat": "ZWL0.00",
    "tendered_currency": "ZWL",
    "tendered": "ZWL12,300.00",
    "total_amt": "ZWL12,300.00",
    "date": "21/01/24 16:51",
    "tokens": [
      {
        "token": "52722874238082006840",
        "units": "84.4",
        "formatted": "5272 2874 2380 8200 6840",
        "rate": "",
        "receipt": "00001240121185107378",
        "tax_rate": "0.00",
        "net_amount": "11603.78",
        "tax_amount": "0.00",
        "position": 1
      }
    ]
  }
}

Last updated