/api/v1 and are authenticated with
your API key credentials:
Base URL is
https://api.hyparrow.cloud/api/v1 in production. To build and
test without moving real money, point at the
Sandbox — https://sandbox.hyparrow.cloud/api/v1 — using a
pk_test_ key. See Card test values below.Card payments
Charging a card is a stateful flow. You start a purchase; depending on the card, it may complete immediately or require the cardholder to confirm a one-time password (OTP). You then submit the OTP to finish the charge.responseCode on each response:
Charge a card end-to-end
1
Initiate the purchase
Call If the card clears without an OTP, you instead get
POST /card-payments/purchase with the customer, amount and card
details. Generate a unique transactionRef per attempt.expiryDate is YYMM (so 2504 is April 2025).A card that needs an OTP returns responseCode: "T0" and the identifiers you
need for the next step (paymentId, transactionId):Response — OTP required
responseCode: "00" and
the payment is already complete — skip straight to checking status.2
Authenticate the OTP
Collect the OTP from the cardholder and submit it with
A If the cardholder didn’t receive the OTP, request a new one with
POST /card-payments/authenticate-otp, echoing the paymentId and
transactionId from the previous response.cURL
responseCode of 00 means the charge succeeded:Response — success
POST /card-payments/resend-otp:Resend OTP
3
Confirm the status
Verify the outcome any time with To list all card transactions for the authenticated client, use
GET /card-payments/status, passing the
transactionRef and amount (in naira) as query parameters.cURL
Response
GET /card-payments/transactions.Card edge cases
OTP required
OTP required
The first
purchase response carries responseCode: "T0" (or S0). The
charge is not yet complete — you must collect the OTP and call
authenticate-otp. Until then the transaction is processing.Declined card
Declined card
Any
responseCode other than 00, T0 or S0 is a decline. The response
surfaces the network’s message, and an errors array yields
422 Unprocessable Entity. Show the cardholder the reason and ask them to
try another card.Pending / unknown
Pending / unknown
If you lose the response or aren’t sure of the outcome, poll
GET /card-payments/status. It returns the authoritative state from the card
network and updates the stored transaction. Treat anything that isn’t 00 as
not-yet-paid.OPay
OPay is a redirect flow: you initialize the payment, send the customer to the returned URL to pay, then confirm the result.1
Initialize the payment
POST /payments/opay/initialize with the amount (in kobo, as an integer).
A transactionReference is generated for you if you omit it.cURL
Response
responseCode 09 is the normal “redirect required” result. Send the
customer to redirectUrl to complete payment.2
Confirm the result
After the customer returns, verify the payment with
POST /payments/opay/status, passing the reference.cURL
Response
paid: true (responseCode: "00") means the payment settled. Until then,
keep the order pending.USSD
USSD lets a customer pay by dialling a short code on their phone. You fetch the list of supported banks, then generate a dial code for the chosen bank.1
List supported banks
GET /payments/ussd/issuers returns the banks that support USSD payments,
each with the bankCode you’ll pass when generating the code.cURL
Response
2
Generate the dial code
POST /payments/ussd/generate with the amount (in naira, as a string) and
the chosen bankCode. A merchantTransactionReference is generated if you
omit it.cURL
Response
ussdCode and ask them to dial it to
complete the payment.Testing in the sandbox
In the Sandbox every provider is simulated, so you can run all three flows end-to-end without real money. Use apk_test_ key against
https://sandbox.hyparrow.cloud/api/v1.
Card test values
- Success card:
5060990580000217499(always approved) - Decline card:
0000000000000000000(always declined) - OTP:
123456succeeds; any other OTP is rejected - Magic amounts (any other card): an amount ending in
.01forcesfailed,.99forcespending, anything else settles as success

