Skip to main content
The Transaction API allows you to accept payments from customers using various payment channels. This guide covers common transaction scenarios and best practices.

Overview

Transactions represent payment attempts from your customers. The typical flow involves:
  1. Initializing a transaction to get a payment URL
  2. Redirecting customers to complete payment
  3. Verifying the transaction after payment
  4. Handling the response

Initialize a Transaction

Create a payment session and get an authorization URL for your customer.
1

Import and initialize the SDK

2

Initialize the transaction

3

Redirect the customer

Initialize Parameters

string
required
Customer’s email address
string
required
Amount to charge in kobo (multiply by 100 for naira)
string
default:"NGN"
Currency code: NGN, USD, GHS, ZAR, KES, or XOF
string
Unique transaction reference (auto-generated if not provided)
string
URL to redirect customer after payment
array
Payment channels to enable: card, bank, ussd, qr, mobile_money, bank_transfer, eft, apple_pay
object
Custom data to store with the transaction
string
Split payment configuration code

Verify a Transaction

After payment, verify the transaction status using the reference.
Always verify transactions on your server before fulfilling orders. Never rely solely on frontend confirmations or webhooks without verification.

List Transactions

Retrieve a paginated list of transactions on your integration.

List Parameters

number
default:"50"
Number of transactions per page (max: 100)
number
default:"1"
Page number to retrieve
string
Filter by status: success, failed, abandoned
string
Filter by customer ID
string
Start date (ISO 8601 format)
string
End date (ISO 8601 format)

Get Single Transaction

Fetch details of a specific transaction by ID.

Charge Authorization

Charge a customer using a previously authorized payment method.
Only use this for authorized recurring charges. Ensure you have the customer’s permission.
You can get the authorization_code from successful transactions where authorization.reusable is true.

Transaction Timeline

View the event history of a transaction.

Transaction Totals

Get total volume of transactions on your integration.

Export Transactions

Export transactions to a CSV file.

Partial Debit

Retrieve part of a payment from a customer.
This feature is typically used for split payments where the full amount isn’t needed upfront.

Error Handling

Handle transaction errors gracefully:

Best Practices

  1. Always verify transactions on your server after payment
  2. Store transaction references in your database for reconciliation
  3. Use unique references for each transaction to prevent duplicates
  4. Handle webhooks for real-time payment notifications
  5. Log all transactions for audit trails and debugging
  6. Test with test keys before going live
  7. Implement proper error handling at every step

Common Scenarios

One-time Payment

Recurring Charges