Resend OTP

This will be used to resend OTP request for a transaction. There will be max OTP send limit set for each provider configured.

Note:
See the Resend OTP page in the API Reference section for an official description of this API.

Request

The request for the Resend OTP API consists of two Path parameters: (id  and  challenge_id) as listed below:
FieldTypeDescription
Header
(-u)
your_api_key*StringAPI key can be obtained from https://merchant.juspay.in/settings/api-key. Provide your API key as the basic auth username value. You do not need to provide a password.
Path
param
id*StringUnique id generated for the transaction in a generate OTP API call.
Path
param
challenge_id*StringChallenge id generated against the transaction in generating OTP API call.

    * = Required

Example

curl -X POST https://api.juspay.in/v2/txns/txn_36dc6eada1d0463da91dc56c8262a8c3/authenticate/ch_xyz/resend -u your_api_key:

Response

The response for the Resend OTP API consists of the following parameters and objects:     (click to open table)
ParameterTypeDescription
order_idStringOrder ID for which the payment is being started. This unique Order ID was provided by you while creating order.
txn_idStringTransaction ID for the payment attempt.
txn_uuidStringUnique ID for the payment attempt to be used in /authenticate and /resend API calls.
statusStringStatus of the transaction. PENDING_VBV indicates that the transaction requires authentication to complete. Please do not validate this at your end.
  Status codes and meaning
10

21

24

23

26

27


22


28
NEW
Newly created order
CHARGED
Successful transaction
AUTHORIZED
In cases where 'auto_capture' is false
PENDING_VBV
Authentication is in progress
AUTHENTICATION_FAILED
User did not complete authentication
AUTHORIZATION_FAILED
User completed authentication, but
bank refused the transaction
JUSPAY_DECLINED
User input is not accepted by the
underlying PG
AUTHORIZING
Transaction status is pending from bank
payment.authenticationwwwi
    {method, url, params: {...}}
Object
String
Returned parameters needed for completing the authentication
   Payment Authentication Object Parameters:
ParameterTypeDescription
methodStringHTTP Method for authentication. Can be one of GET or POST (See redirection instructions in the "Handling the Redirection Method" section.)
urlStringURL to which the user has to be taken to for completing the authentication
params:wwwwwwwwwwi
   {param1, param2, ....}
Object
String
Present only when the method is POST. This a mapping via a list of key:value pairs that must be sent along with the URL for authentication. Do not hardcode the params in your client * Never assume that you will receive param “x” or param “y”. This is completely dynamic and will vary on a case by case basis.
  Params Object Parameters:
FieldTypeDescription
idStringUnique ID generated by Juspay for the transaction.
challenge_idStringAuthentication ID generated against the transaction for a given order.
auth_typeStringAuthentication method used. In this case, it’s ‘OTP’
card_isinStringCard first 6 digits.
card_issuer_bank_nameStringIssuer name of the card used for the transaction.
(Example: "HDFC Bank")
times_otp_sentStringNumber of times OTP sent
max_otp_send_limitStringMaximum limit for sending OTP
current_attemptStringCurrent attempt for OTP validation.
max_attemptsStringMaximum number of time OTP validation can be done for a given transaction.

Example

{
   "order_id" : ":order_id",
   "txn_id"   : ":txn_id",
   "status"   : "PENDING_VBV",
   "payment"  : {
    "authentication": {
    "method": "POST",
    "url": "https://api.juspay.in/v2/txns/:id/authenticate",
    "params": {
            "id"                    : "8646a7a029974fa99995fec00340a507",
            "challenge_id"          : "ch_xyz",
            "auth_method"           : "OTP",
            "card_isin"             : "424242",
            "card_issuer_bank_name" : "AXIS BANK LTD",
            "times_otp_sent"        : 2,
            "max_otp_send_limit"    : 4,
            "current_attempt"       : 1,
            "max_attempts"          : 4,
    }
    }
   }
}
{
  "status": "Invalid Request",
  "error_code": "max_limit_exceeded",
  "error_message": "Max OTP send limit exceeded."
}
{
  "status": "error",
  "error_code": "access_denied",
  "error_message": "Invalid Authentication"
}

Did this page help you?