Skip to main content
POST
Run in Postman: You can also try this API in our Postman Collection. Refer to the sample responses below:
Submit OTP Success and Transaction Successful – 200 OK
Submit OTP Success but Invalid OTP – 200 OK
Max OTP Submit Limit Exceeded – 400 Bad Request
Transaction Already Completed – 400 Bad Request
Invalid Request – 404 Not Found
Submit OTP Success but Transaction Failed – 502 Bad Gateway
Submit OTP Success but Transaction Pending – 502 Bad Gateway
Resend OTP Success – 200 OK

Error codes

The following table lists the error codes you may encounter when submitting an OTP:

Headers

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

API version to be used.

x-request-id
string

Request ID for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.

x-idempotency-key
string<UUID>

An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.

Path Parameters

cf_payment_id
string
required

The Cashfree payment or transaction ID.

Body

application/json

Request parameters to submit or resend OTP if you use Native OTP for authentication of card payments.

action
enum<string>
required

Action intended for this request - can be SUBMIT_OTP or RESEND_OTP.

Available options:
SUBMIT_OTP,
RESEND_OTP
otp
string

OTP collected from the customer. Mandatory only when action is SUBMIT_OTP.

Response

Success response for submitting or resend OTP if you use Native OTP for authentication of card payments.

cf_payment_id
string

Cashfree payment ID for which this request was sent.

action
enum<string>

The action that was requested.

Available options:
SUBMIT_OTP,
RESEND_OTP
authenticate_status
enum<string>

Status of this action - will be either success or failed. If the action is success, you should still call payment status API to verify the final payment status.

Available options:
FAILED,
SUCCESS
payment_message
string

Human readable message which describes the status in more detail.