Purchase electricity
Build a electricity purchase flow from product discovery through transaction verification.
- Validate the customer
Validate the meter and confirm the customer details.
- Save, then submit
Save a unique reference before sending the purchase.
- Verify the outcome
Confirm the result; keep processing orders pending.
Before you begin
Keep your secret key on your server and choose the right environment. Your application needs an order record, a confirmed recipient and a saved reference for each intended purchase.
Step 1: Load the available products
Call the electricity
product endpoint. Build your selection interface from the returned billers and products. Retain the
exact product_code, current pricing and any product constraints. A provider name such as KEDCO is
not a product code.
Step 2: Confirm the recipient
Call customer
validation using the selected product and meter number and meter type. Show the returned customer name
so the user can confirm it. Retain verify_token and send it unchanged with the purchase for that
same customer.
Step 3: Save the order and reference
Generate an alphanumeric reference of 10–255 characters and save it with the intended recipient, product and expected debit amount. Prevent repeated button clicks while the request is pending. Keep the same reference for reconciliation.
Step 4: Send the purchase request
Submit this JSON structure to the electricity purchase endpoint. Replace every example product code and recipient before use. The reference page includes complete examples for cURL, Node.js, PHP, Ruby and Python.
{
"meter_number": "0123456789",
"meter_type": "prepaid",
"product_code": "CURRENT_ELECTRICITY_PRODUCT_CODE",
"amount": 2000,
"reference": "SMB202609160003",
"phone": "0123456789",
"email": "[email protected]",
"verify_token": "TOKEN_FROM_VALIDATION"
}
Amounts are in naira, not kobo. Do not include the currency symbol.
Step 5: Check and verify the result
Read data.status. Keep processing orders pending. Use transaction verification
with the saved reference to reconcile the result, including after timeouts. Show a completed receipt only
after a successful transaction is confirmed.
Step 6: Handle later updates
Use webhooks to receive updates and verify the reference before changing the order. Make the update safe to repeat. Keep a recovery process for unresolved orders and retain trace IDs for support.
Customer names, phone numbers, meter and smart-card numbers in these examples are fictional placeholders. Replace them with valid customer details for real requests.
Questions? Let’s work through them.
Having an issue or need help with your integration? Join the Strongmb Slack community to ask questions and get assistance from our team and other developers.
Keep API keys and customer details private when sharing examples.
Experiencing a service issue? Check Strongmb’s service status for incident updates.
Did this page help you?
Up to 100 characters. Please leave out personal details, account information and API keys.