Skip to main content

Submit customer card OTP

Resend OTP

Step 4 of 5. You only need this step if the charge returned otpRequired: true. The customer’s bank has sent them an OTP, and the charge stays pending until you submit it. The bank sends the OTP to the phone number or email address linked to the card. Show the customer a field to enter it. If the customer isn’t using your app, for example during a scheduled charge, send them a link to that screen straight away.

POST /v1/checkout/checkout-card-otp

Submit the OTP within 15 minutes. After that, Nomba checks the charge with the bank and marks it as failed if it isn’t complete. To try again, start a new charge with a new orderReference.

Headers

This call doesn’t need an Authorization or accountId header.

Request body

string
required
The code the customer received from their bank
string
required
The orderReference you sent with the charge
string
required
The transactionId returned by the charge

Response body

string
required
Response code
string
required
Response description
object
required
Even when data.status is true, confirm the charge before you give value.

If the OTP is wrong

If the bank rejects the OTP, data.status is false and data.message says why, for example β€œIncorrect OTP. Please retry with the correct OTP that’s sent to your phone”. Let the customer try again. You can submit an OTP 3 times for each charge. After that, Nomba refuses further OTPs with the message TOO MANY OTP ATTEMPTS. Start a new charge with a new orderReference.

Resend the OTP

If the customer didn’t get the code, call POST /v1/checkout/resend-otp. Send the charge’s transactionId in the orderReference field. Resending doesn’t extend the 15-minute limit.

Next: Confirm the charge

Check the final status before you give the customer value.