Overview
The card payments API lets you charge Visa, Mastercard, and Verve cards directly. Card data is encrypted server-side using Interswitch’s RSA public key before being forwarded — plaintext card details never leave the Hyparrow API unencrypted. The payment flow depends on the card type:- Response code
00— Payment approved immediately. No further action needed. - Response code
T0(Verve / Mastercard) — OTP required. Prompt your customer for the OTP sent to their phone and callauthenticate-otp. - Response code
S0(Visa 3DS) — 3D Secure authentication required.
Step-by-step guide
Initiate a card purchase
Submit the card details and transaction information. The API encrypts the card data with Interswitch’s RSA public key before forwarding the request.Response — OTP required (Verve/Mastercard)Response — approved immediately
amount is in naira (not kobo) for card purchases. Send "5000" for ₦5,000.Authenticate the OTP (Verve / Mastercard)
If the purchase returns Response
responseCode: "T0", prompt the customer for the OTP delivered to their registered phone number and submit it here.Endpoints reference
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/card-payments/purchase | Initiate a card charge |
POST | /api/v1/card-payments/authenticate-otp | Submit OTP for Verve/Mastercard |
POST | /api/v1/card-payments/resend-otp | Resend OTP to the customer |
GET | /api/v1/card-payments/status | Query transaction status |
GET | /api/v1/card-payments/transactions | List your card transactions |
Purchase request body
Your internal identifier for the customer initiating the payment.
Amount in naira as a string (e.g.
"5000" for ₦5,000).Currency code. Use
"NGN" for Nigerian Naira.A unique reference for this transaction. Use it to query status and reconcile payments.
The card number (Primary Account Number). Transmitted over HTTPS and RSA-encrypted by the API before forwarding.
The card PIN. RSA-encrypted by the API before forwarding. Never stored in plaintext.
Card expiry date in
YYMM format. For example, April 2026 = "2604".The 3-digit card security code printed on the back of the card.
OTP authentication request body
The
paymentId returned in the purchase response.The one-time password entered by the customer.
The
transactionId returned in the purchase response.Electronic Commerce Indicator flag. Leave empty unless directed by your integration support contact.
Response codes
| Code | Meaning |
|---|---|
00 | Approved — transaction complete |
T0 | OTP required (Verve / Mastercard) — call authenticate-otp |
S0 | 3D Secure required (Visa) |
| Other | Declined — check message for reason |
