Verify OTP

This API is used to verify one-time password (OTP) generated through any applicable channels, such as, 'Generate OTP API'. The Credit+ Issuing system receives, validates and processes the request. The request is successful only if it is received within two minutes of OTP generation and all validations are passed. If it is successful, the valid OTP will be marked as verified in the Credit+ Issuing system. If the request fails, the system returns the corresponding error code.

NOTE:

  1. The API, if sent with cardNumberAlias (CNA), will internally fetch the corresponding associated device for further processing only if DEVICE _STATUS_CODE = NORMAL (0) OR (DEVICE_STATUS_CODE = UPGRADE (9) AND UPGRADE_STATUS = 1).
  2. Either deviceNumber or cardNumberAlias parameter’s value must be provided to process the request. However, if both are received in request then the system will not validate if the cardNumberAliasislinked to that particular device. System processesthe request based on the device number itself.

HTTP Status and Response Status Matrix

  • HTTP Code: This is the response status code issued by a server in response to a client's request made to the server.
  • Error Code: This is the error code returned by Credit+ Issuing application in the ‘code’ field of the response message indicating if the request was processed successfully or failed.
  • Reason: This is the description of the error code returned by Credit+ Issuing application.
HTTP CodeError CodeReason
400997Device Number and Card Number Alias fields are empty. Please provide value for at least one field.
400997Product Type field is invalid.
400997Program Code field should only contain [A-Z 0-9] and underscore and must start and end with alphanumeric character.
400997Program Code field value must have max length 6.
400997Device Plan Code field should only contain [A-Z 0-9] and underscore and must start and end with alphanumeric character.
400997Device Plan Code field value must have max length 10.
400997Only alphanumeric characters and special characters [_!'()*+,-.] are allowed.
400997Card Number Alias field value must have max length 24.
400997Card number is of invalid format.
400997Request type field is empty.
400997OTP field is empty.
400997Channel field is empty.
401990Channel not authenticated for this service
401991OTP request not supported for this service
400997Device does not exist
404998Device number not registered in the system
500992OTP not generated or expired
500993Invalid encrypted otp
500999Incorrect OTP
201000SUCCESS
500CNA001Bank Does Not Exists
500CNA002Card Number Alias Functionality is not applicable for this Institution
500CNA003Record does not exist for the given details
500CNA005Multiple device numbers are linked for given details
500CNA006Error while fetching device details
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length ≤ 24
^[0-9]+$

Card number. Numeric, not null, mandatory if cardNumberAlias is not present.

string
length ≤ 24
^[a-zA-Z0-9!'()*+,-._]+$

Alias assigned against each device. This attribute should be present if the CNA functionality is turned on for the institution. Mandatory if deviceNumber is not present. Alphanumeric, maximum length: 24, allowed special characters: ! ' ( ) * + , - . _.

string
enum

Product type of the device. Valid values: P (Pre-paid), C (Credit), D (Debit). String, must be P or C or D. This field is required only when the value for cardNumberAlias is present and multiple devices are linked with the same cardNumberAlias.

Allowed:
string
length ≤ 10
^[a-zA-Z0-9]+$

Device Plan Code attached with the device. Alphanumeric, maximum length: 10. This field is required only when the value for cardNumberAlias is present and multiple devices are linked with the same cardNumberAlias.

string
length ≤ 6
^[a-zA-Z0-9]+$

Program attached to the device. Alphanumeric, maximum length: 6. This field is required only when the value for cardNumberAlias is present and multiple devices are linked with the same cardNumberAlias.

string
required

Request type for which OTP verification is being invoked. Valid values are as configured in Institution Parameter Setup > System Codes against TYPE_ID = GENERATE_OTP. String.

string
enum

Accessing channel.

Allowed:
string
required

It is a clear OTP value. It is encrypted using AES algorithm, which needs to be verified.

Headers
string
^[a-zA-Z0-9-]{1,50}$

API Consumer must share a Correlation-ID in the HTTP header for API requests. The Correlation-ID must be unique for each request. It is recommended to generate universally unique identifier (UUID) of length 32 or 36 that is compliant with RFC 4122. The maximum supported length is 50 alphanumeric characters. For example, ac97d177-9345-4934-8343-0f91a7a02836. If the Correlation-ID is not received in the incoming request, the system generates the UUID dynamically and assigns it to the request.

string

API Consumer can share Source in the HTTP header for API requests. For the list of Source values, see the Pre-conditions for HTTP Header of REST API topic in the Pre-requisite for Rest API section.

Response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json