Developer Guides
Electricity Bill Payment API Integration in Nigeria: Build Reliable Token Delivery
Build an electricity payment flow that handles meter validation, uncertain vending outcomes and prepaid token delivery. This developer guide explains the controls to implement before connecting supported billers through Paddle.
An electricity bill payment API integration in Nigeria needs to do more than accept a meter number and collect money. Your application must validate the intended account, manage uncertain vending outcomes and make the resulting token or payment receipt easy to retrieve. For fintechs and digital businesses, these controls separate a usable bill-payment feature from a support-heavy checkout.
Paddle offers bills & VAS capabilities alongside virtual accounts, ledgers and other financial infrastructure. Before implementing electricity payments, confirm the currently supported electricity providers, account types and response fields in the documentation or with Paddle. This guide describes an application architecture, not a promise that every biller exposes identical functionality.
Electricity bill payment API integration in Nigeria: the core flow
Treat electricity payment as a durable order, not a single HTTP request. The order connects the customer's intent, your funding records, the provider's vending outcome and any deliverable produced by the transaction.
A reliable flow has six stages:
- Select a supported electricity provider and prepaid or postpaid account type.
- Validate the meter or customer account using the supported lookup flow.
- Show the returned account details and payment breakdown for confirmation.
- Secure funding and submit one logical vending request.
- Resolve the provider outcome through supported status mechanisms.
- Display the token or receipt and reconcile the financial records.
For prepaid accounts, successful vending typically produces a token for the meter. Postpaid payments instead credit an account and produce payment confirmation. Model these as different fulfillment types rather than forcing both into a token-shaped response.
Validate the meter before committing funds
Use provider identifiers, not display labels
Build your provider selector from the supported catalogue or a controlled configuration based on documented identifiers. Store the provider ID separately from the customer-facing name.
Do not infer a provider solely from a customer's city or address. Ask the customer to choose, then validate the account through the applicable lookup mechanism.
Treat meter numbers as strings. Numeric conversion can remove leading zeros, while overly aggressive formatting rules can reject valid identifiers. Apply only documented validation constraints.
Make account confirmation explicit
Where lookup returns account-holder information, show enough detail for the customer to recognize the account without exposing unnecessary personal data. Include:
- Selected electricity provider.
- Meter or account number.
- Prepaid or postpaid account type.
- Returned customer details, where available.
- Requested amount and any applicable charges.
Bind confirmation to those exact values. If the user changes the meter, provider, account type or amount, require fresh confirmation and repeat lookup where necessary.
A successful lookup reduces mistakes; it does not prove the person paying owns the property or meter. Avoid treating it as identity verification.
Separate payment, vending and delivery states
One status field cannot safely represent the whole transaction. A customer can have sufficient funds while vending remains unresolved, or vending can succeed while token notification fails.
Use separate state dimensions in your own application:
- Funding: available, reserved, captured or released.
- Vending: not submitted, pending, succeeded, failed or unknown.
- Delivery: not applicable, awaiting artifact, available or notification failed.
These are illustrative internal states, not Paddle API enums. Map documented provider responses into your model explicitly.
Store an immutable order identifier, confirmed account details, amount, currency, provider reference and timestamps. Represent monetary values in the provider's documented units, using integer minor units internally where appropriate rather than floating-point arithmetic.
Reserve funds without calling the purchase complete
For a prefunded wallet, reserve the amount before vending so another request cannot spend it. On confirmed success, capture the reservation. On definitive failure, release it according to your accounting design.
If vending times out, preserve the reservation while investigating. Releasing funds immediately can let a customer spend money already committed to a successful but delayed purchase. Pending cases need monitoring and escalation, not indefinite silent holds.
Prevent duplicate vending after timeouts
Electricity purchases need a clear boundary between retrying communication and authorizing another purchase.
Generate a unique internal order ID when the customer confirms. Use a database uniqueness constraint to prevent multiple jobs from submitting the same order concurrently. If the provider supports idempotency keys or unique client references, use them exactly as documented.
A connection timeout is not a failed purchase. The provider may have accepted the request before your connection closed.
When the outcome is uncertain:
- Mark the vending state as unknown or pending.
- Preserve the original request and reference.
- Query status using the documented lookup mechanism.
- Process supported asynchronous updates safely.
- Escalate unresolved cases instead of creating a replacement purchase.
Only resubmit when documented semantics or an authoritative result establish that doing so cannot create a duplicate. Do not assume an arbitrary reference field provides idempotency.
If customers intentionally buy electricity twice, create two separately confirmed orders. Duplicate prevention should stop accidental repeats, not block legitimate repeat purchases.
Treat token retrieval as part of fulfillment
Save the artifact before sending notifications
For prepaid vending, persist the returned token and relevant receipt data before dispatching an email, SMS or push notification. Notification systems can fail independently of vending.
The durable order page should remain the source of truth. Customers should be able to reopen a successful purchase and retrieve its token without triggering another payment.
Limit token access to authorized users and support roles. Avoid placing complete tokens, meter details or customer information in general-purpose application logs.
Preserve provider instructions
Where supplied, retain the units purchased, token sequence and customer-facing instructions. Some responses may contain multiple artifacts or instructions that should not be reduced to a single text field.
Render them clearly and preserve their intended order. Do not calculate or promise electricity units from the purchase amount alone; applicable tariffs, deductions and provider rules can affect the result.
If vending is confirmed but the token is missing, label the order as awaiting fulfillment and investigate through supported retrieval or support channels. Do not automatically buy another token.
Distinguish delivery trouble from meter rejection
A failed SMS needs notification retry. A customer reporting that a token will not load needs a different support path.
Collect the original order reference, confirmed meter details and reported meter error. Check for a mismatch and consult provider guidance before promising a reversal or replacement. Successful vending does not establish that every downstream meter issue is refundable.
Reconcile money and fulfillment separately
Reconciliation should answer two questions: did the correct financial movement occur, and did the customer receive the expected purchase artifact?
Compare your orders and funding records with available provider transaction records. Flag captured funds without confirmed vending, successful vending without captured funding, duplicate provider references and successful prepaid orders missing tokens.
Track pending-order age as well as volume. A small number of long-running unknown outcomes can matter more operationally than a brief spike in normal processing delays.
Give support a permission-controlled view of the order timeline. Record operator actions and reasons, and require appropriate approval for manual financial adjustments. Never use a support dashboard button to bypass the same duplicate-purchase protections enforced by your API.
Pre-launch implementation checklist
Before exposing the feature to customers, verify that:
- Supported providers and account types are confirmed.
- Changing payment details invalidates earlier confirmation.
- Simultaneous requests cannot overspend available funds.
- Double-clicking checkout creates one logical purchase.
- Timeouts enter an investigation flow rather than automatic repurchase.
- Duplicate or out-of-order updates cannot corrupt terminal states.
- Successful purchases remain retrievable after notification failure.
- Postpaid receipts do not depend on prepaid token fields.
- Missing tokens and unresolved outcomes trigger alerts.
- Logs redact sensitive account and fulfillment data.
- Reconciliation detects financial and fulfillment exceptions.
Test these paths with supported test facilities and controlled failure simulations. Confirm production behavior before scaling transaction volume.
Build it with Paddle
Paddle brings bills & VAS, virtual accounts, ledgers and related infrastructure into a platform for African digital businesses. Start by confirming electricity-provider coverage, lookup requirements, vending semantics and available status or retrieval mechanisms. Then map those capabilities into the durable order model above.
Paddle is a banking-as-a-service platform by Pickpadi Global Ltd, not a bank. Banking services are provided by CBN-licensed partner banks.
Ready to build? create a free account and read the API docs to plan your integration around supported capabilities.
Keep reading
Open banking consent management for Nigerian fintechs: A Developer Guide
Build an open banking consent lifecycle that respects user choices and prevents stale permissions from powering new requests. This guide covers scope design, revocation, background jobs and audit evidence for Nigerian fintech teams.
Virtual Account Provisioning API for Nigerian Fintechs: Build a Safe Account Lifecycle
Build a reliable virtual account provisioning flow for Nigerian customers, from eligibility checks and duplicate prevention to account restrictions and closure.
Payment Webhook Security for Nigerian Fintechs: A Developer Guide
Build a secure webhook pipeline for Nigerian payment products, from authenticity checks to replay protection and recovery. Learn how to connect Paddle events to controlled business workflows without trusting every incoming request.
Paddle Build Studio
Want us to build it with you?
Build for Africa and the world. Our team can deliver your fintech, web or mobile product in 2–3 weeks — or integrate Paddle APIs and build it yourself.