Charge a Card (OTP Auth)
Request Parameters
Body (JSON):
- cardNumber:
(string, required)
. The card number of the user. - expiryYear:
(string, required)
. Expiry year of the card . - expiryMonth:
(string, required)
. Expiry month of the card. - cvv:
(string, required)
. The card’s CVV security code. - amount:
(int, required)
. The transaction amount. (in kobo/cents format e.g "1000" is 10 NGN/USD) - currency:
(string, required)
. The currency of the transaction (e.g.,USD
,NGN
). - reference:
(string, required)
. A unique reference for the transaction. - callbackUrl:
(string, required)
. Callback URL for notifications. - webhookURL:
(string, required)
Custom webhook URL for notifications. The webhookUrl must start withhttp
orhttps
to ensure it is a valid URL. cardPin
(int
): The card's PIN for additional authentication.
Headers:
Content-Type: application/json
Responses
- 200 OK:
- Body: JSON object containing the card transaction response.
status
(int
): HTTP status code.message
(string
): Transaction response message.data
(object
): The transaction response data.status
(object
): The authorization status.authorizationType
(string
): Indicates the type of authentication required.otpMessage
(string
): A message instructing the customer to enter the OTP sent to their phone.otpMessageSupport
(string
): Additional instructions for customers who did not receive the OTP.reference
(string
): A unique reference for the transaction, used to track the payment process.
- Body: JSON object containing the card transaction response.
- 400 Bad Request: Returned when request parameters are invalid.
Endpoint:
POST /transaction/charge
Request Body:
{
"cardNumber": "5060990580000217499",
"expiryYear": 50,
"expiryMonth": 5,
"cvv": "123",
"amount": 10000,// The amount is formatted in kobo (e.g., 10000 represents 100.00 in the base currency).
"email": "[email protected]",
"currency": "NGN",
"reference": "{{Randomstring}}",
"callbackUrl": "https://merchant.com/callback",
"webhookURL": "httpss://merchantwebhookurl.com" //If passed, and if webhook notification is enabled for merchant
"cardPin": 1111
}
Response (Success):
{
"status": 200,
"message": "Request successfully processed",
"data": {
"status": 200,
"authorizationType": "OTP",
"otpMessage": "Kindly enter the OTP sent to 234803***8900",
"otpMessageSupport": "Didn't get the OTP? Dial *322*0# on your phone (MTN, Etisalat, Airtel) Glo, use *805*0#.",
"reference": "fK3AcK_Y7Hg1B_r9mfM7"
},
"errors": []
}
Error Responses:
Status Code | Message | Description |
---|---|---|
400 | Invalid Request | Missing or invalid parameters. |
403 | Unauthorized | Invalid API key or signature. |
500 | Server Error | Unexpected server failure. |
Updated 2 months ago
What’s Next