Integration Flow

View as Markdown

Use this flow for electricity, airtime, data, TV, and transaction-status integrations.

1. Authenticate

Call the token endpoint and keep the returned bearer token available for server-side API calls.

2. Discover services

Call GET /services to retrieve available service categories such as electricity, airtime, data, and TV.

3. Discover providers

Call GET /providers to retrieve providers for the service you want to vend. Provider codes are required by the transaction endpoints.

4. Validate customer details

For products that require validation, call the relevant verification or initiation endpoint before vending. Electricity and TV flows usually need customer or package validation before payment.

5. Vend the transaction

Submit the vend request with the provider code, customer identifier, amount, and transaction reference required by the product flow.

6. Confirm final status

Use GET /requery to confirm final state, especially for pending or asynchronous responses.

ConcernRecommendation
ReferencesGenerate a unique client-side reference for each transaction attempt.
Pending responsesTreat pending states as unresolved until requery returns a final result.
RetriesRetry status checks, not duplicate vend requests, unless your backend has confirmed the original request failed before processing.
ReconciliationPersist Pay4Power references, correlation IDs, request payloads, and final statuses.