Overview
The OPay payment channel lets you collect money from customers who have an OPay wallet. You initialize a transaction on your server, redirect the customer to the OPay payment page, and receive a webhook when payment settles. This channel is powered by Interswitch’s OPay collection integration and follows an asynchronous flow — theinitialize response gives you a redirect URL, not a payment confirmation.
How it works
- Your server calls
POST /api/v1/payments/opay/initializewith the amount and a transaction reference. - Hyparrow returns a
redirectUrl. - You redirect the customer’s browser to that URL.
- The customer completes payment in the OPay interface.
- Hyparrow fires a webhook to your registered URL when the payment settles.
- You can also poll
POST /api/v1/payments/opay/statusat any time to check the outcome.
A
responseCode of "09" in the initialize response is normal — it means the transaction is pending and the customer needs to complete payment at the redirect URL. Only "00" means the transaction completed without a redirect.Step-by-step guide
Initialize the payment
Create an OPay transaction and get the redirect URL for the customer.ResponseRedirect the customer to
redirectUrl. Save transactionReference for status checks and webhook matching.amount is in kobo as an integer. ₦5,000 = 500000.Receive the webhook
When the customer completes payment, Hyparrow POSTs an event to your webhook URL.Match
reference against your transactionReference and fulfill the order.Endpoints reference
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/payments/opay/initialize | Initialize an OPay payment |
POST | /api/v1/payments/opay/status | Check OPay payment status |
Initialize request body
Amount in kobo as an integer (e.g.
500000 for ₦5,000). Either amount or paymentId must be provided.Interswitch payment ID, if you are referencing an existing Interswitch payment object instead of specifying a raw amount.
Your unique reference for this transaction. If omitted, Hyparrow generates one automatically. Store this value to match against webhooks and status checks.
Interswitch payable code if applicable. Leave blank for standard OPay collections.
Currency code. Defaults to
"NGN".Status request body
The
transactionReference returned from the initialize call.Status response fields
The reference that was checked.
Interswitch response code.
"00" = paid, "09" = pending, other values = failed.true when responseCode is "00" and payment is confirmed.