---
page_title: Resend OTP
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/direct-otp/resend-otp
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fdirect-otp%2Fresend-otp
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# 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.

`challenge_id:`Challenge id generated against the transaction.`id:`Unique id generated for the transaction while generate OTP API call.## Endpoints:
- Sandbox: https://sandbox.juspay.in/v2/txns/{id}/authenticate/{challenge_id}/resend

- Production: https://api.juspay.in/v2/txns/{id}/authenticate/{challenge_id}/resend

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

Example:-MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Mandatory
## Headers:

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl -X POST https://api.juspay.in/v2/txns/txn_36dc6eada1d0463da91dc56c8262a8c3/authenticate/ch_xyz/resend \
-u your_api_key: \
-H 'x-routing-id: customer_1122'

```

### Sample Response:

#### Response:
```json
{
    "gateway": "CYBERSOURCE",
    "payment": {
        "authentication": {
            "method": "GET",
            "url": "https://smartgateway.hdfcuat.bank.in/v2/txns/:txn_uuid/authenticate",
            "params": {
                "card_issuer_bank_name": "Axis Bank",
                "id": "txn_uuid",
                "fallback_url": "https://smartgateway.hdfcuat.bank.in/v2/pay/start/testhdfc1/moz3C1sYSVgAxme31pL?cardIssuerBankName%3DAxis%20Bank%26cardType%3DCREDIT%26paymentMethod%3DVISA%26paymentMethodType%3DCARD",
                "challenge_id": "ch_xyz",
                "resend_otp_allowed": true,
                "auth_type": "OTP",
                "submit_otp_allowed": true,
                "card_isin": "44**06",
                "card_brand": "VISA"
            }
        }
    },
    "status": "PENDING_VBV",
    "id": "moz3C1sYSVgAxme31pL",
    "payment_info": {
        "card": {
            "extended_card_type": "CREDIT",
            "token_type": "ALT_ID",
            "tokens": [],
            "last_four_digits": "2986",
            "card_reference": "",
            "payment_account_reference": "V00100****0002347651786",
            "card_type": "CREDIT",
            "card_issuer": "Axis Bank",
            "expiry_month": "03",
            "card_fingerprint": "2j965k6pta***5ppvqnoeki",
            "saved_to_locker": false,
            "using_token": false,
            "using_saved_card": false,
            "name_on_card": "PRATHAMESH",
            "card_isin": "44***6",
            "expiry_year": "2027",
            "card_brand": "VISA",
            "card_issuer_country": "INDIA"
        },
        "payment_method": "VISA",
        "payment_method_type": "CARD"
    },
    "resp_message": "",
    "created": "2026-01-09T05:54:10Z",
    "resp_code": "",
    "order_id": "DOTP312312",
    "txn_id": "testhdfc1-DOTP1234-1"
}

```

## Path Parameters:

#### id:
Transaction Id
- Value: Example:- txn_36dc6eada1d0463da91dc56c8262a8c3
- Tags: String, Mandatory

#### challenge_id:
Challenge Id
- Value: Example:- ch_xyz
- Tags: String, Mandatory
## API Responses:
### 200:

#### order_id:
- Description: OrderID for which the payment is being started.
- Tags: String

#### txn_id:
- Description: Transaction ID for the payment attempt.
- Tags: String

#### status:
- Description: Status of the transaction. PENDING_VBV indicates that the transaction requires authentication to complete. Please do not validate this at your end.
- Tags: String

#### payment:
- Description: Contains the payment authentication details.
- Tags: String

#### authentication:
- Description: Contains the authentication details.
- Tags: String

#### method:
- Description: HTTP Method for authentication. Can be one of GET or POST
- Tags: String

#### url:
- Description: URL to which the user has to be taken to for completing the authentication
- Tags: String

#### params:
- Description: Present only when method is POST. Parameter map that has to be sent along with the URL for authentication.
- Tags: object

#### id:
- Description: Unique id generated for the transaction.
- Tags: String

#### challenge_id:
- Description: Authentication id generated against the transaction for a given order.
- Tags: String

#### auth_method:
- Description: Authentication method used. In this case it’s ‘OTP’
- Tags: String

#### card_isin:
- Description: Card first 6 digit.
- Tags: String

#### card_issuer_bank_name:
- Description: Issuer name of the card used for transaction.
- Tags: String

#### times_otp_sent:
- Description: Number of times otp sent.
- Tags: String

#### max_otp_send_limit:
- Description: Maximum limit for sending otp.
- Tags: String

#### current_attempt:
- Description: Current attempt for OTP validation.
- Tags: String

#### max_attempts:
- Description: Maximum number of time OTP validation can be done for a given transaction.
- Tags: String
### 400:

#### status:
- Description: Invalid Request
- Tags: String

#### error_code:
- Description: max_limit_exceeded
- Tags: String

#### error_message:
- Description: Max OTP send limit exceeded
- Tags: String


---

## See Also

- [Process OTP](https://juspay.io/in/docs/api-reference/docs/direct-otp/process-otp)
- [Glossary](https://juspay.io/in/docs/api-reference/docs/direct-otp/glossary)
