Skip to main content
POST
Submit or Resend OTP

Headers

x-api-version
string
default:2022-09-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>

Idempotency works by saving the resulting status code and body of the first request made for any given idempotency key, regardless of whether it succeeded or failed. Subsequent requests with the same key return the same result, including 500 errors.

Currently supported on all POST calls that uses x-client-id & x-client-secret. To use enable, pass x-idempotency-key in the request header. The value of this header must be unique to each operation you are trying to do. One example can be to use the same order_id that you pass while creating orders

Path Parameters

cf_payment_id
string
required

The Cashfree payment or transaction ID.

Body

application/json

Request body to submit/resend headless OTP. To use this API make sure you have headless OTP enabled for your account

OTP to be submitted for headless/native OTP

otp
string
required

OTP to be submitted

action
enum<string>
required

The action for this workflow. Could be either SUBMIT_OTP or RESEND_OTP

Available options:
SUBMIT_OTP,
RESEND_OTP

Response

OK

This is the response shared when merchant inovkes the OTP submit or resend API

cf_payment_id
number<int64>

The payment id for which this request was sent

action
enum<string>

The action that was invoked for this request.

Available options:
SUBMIT_OTP,
RESEND_OTP
authenticate_status
enum<string>

Status of the is action. Will be either failed or successful. If the action is successful, you should still call the authorization status to verify the final payment status.

Available options:
FAILED,
SUCCESS
payment_message
string

Human readable message which describes the status in more detail