Skip to main content
POST
Generate OTP

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

The secret key associated with your client ID. Use this to authenticate your API requests. You can find this in your Merchant Dashboard.

Headers

x-api-version
string
default:2025-11-01
required

API version to be used. Format is in YYYY-MM-DD.

Example:

"2025-11-01"

Body

application/json

Request parameters to generate an OTP for the user.

otp_verification_id
string
required

Unique identifier that you create to identify the OTP verification request in your system. Only alphanumeric characters, periods (.), hyphens (-), and underscores (_) are allowed.

Required string length: 1 - 50
Example:

"Test123"

user_id
string
required

Unique identifier for the user, as provided by you during PPI user creation. Only alphanumeric characters, periods (.), hyphens (-), and underscores (_) are allowed.

Required string length: 1 - 50
Example:

"USER827364"

notification_modes
enum<string>[]
required

Array of notification modes for OTP delivery. Supported modes are SMS and WHATSAPP.

Required array length: 1 - 2 elements
Available options:
SMS,
WHATSAPP
Example:

Response

Success response for generating an OTP.

otp_verification_id
string

Unique identifier for the OTP verification request, as provided by you during the request.

Example:

"Test123"

cf_otp_verification_id
string

Unique identifier for the OTP verification request, generated by Cashfree.

Example:

"8901234567890123456"

status
enum<string>

Status of the OTP generation process.

Available options:
OTP_GENERATED,
FAILED
Example:

"OTP_GENERATED"

user_id
string

Unique identifier for the user, as provided by you during PPI user creation.

Example:

"USER827364"

notification_modes
enum<string>[]

Array of notification modes used for OTP delivery.

Available options:
SMS,
WHATSAPP
Example: