---
page_title: Token and Tavv Txn API
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/decoupled-tokenziation-txn-integration/token-and-tavv-txn-api
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fdecoupled-tokenziation-txn-integration%2Ftoken-and-tavv-txn-api
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# **Token and Tavv Txn API** 



Once the user proceeds with the payment using a tokenized card, a token transaction is initiated where the actual card number is replaced with a secure digital token to ensure safer payment processing.Once the user proceeds with a tokenized payment that includes additional authentication verification, a TAVV transaction is initiated to securely validate and authorize the payment request.

> **Note**
> 
> ## Token and Tavv Transaction Request Details
> 
> 
> 
> The fields such as raw card token, TAVV, card expiry month, card expiry year, token last four digits, PAR, and other token-related details are fetched from the **[/v4/get/card](https://juspay.io/in/docs/api-reference/docs/tokenization-apis/fetch-token-and-cryptogram-api#Fetch-Token-and-Cryptogram%25E2%2580%258B)**  or get token from respective TR  response.
> 
> 
> ### Example Token Fields
> 
> 
> 
> * `tavv`
> * `token.card_last_four`
> * `token.par`
> * `token.type`
> * `token.requestor_id`
> * `token.provider_reference_id`
> * `token.provider_category`
> * `token.provider`
> 
> 
> ### Important Note
> 
> 
> 
> 1. The raw token received from the `/v4/get/card` API or the token received from the respective Token Requestor (TR) response API is passed as the `card_number` field in the `/txns` API request.
> 2. When using form-encoded requests, special characters such as `/`, `+`, and `=` in the `tavv` field must be properly URL-encoded by the merchant before sending the request.
> 
> 
> ### Optional Fields for VISA / AMEX / MASTERCARD / RUPAY
> 
> 
> 
> The below token-related fields are non-mandatory and can be sent as empty values if not applicable:
> 
> * `token.requestor_id`
> * `token.provider_reference_id`
> * `token.provider_category`
> * `token.provider`
> 
> 
> ### Mandatory Fields for DINERS
> 
> 
> 
> For DINERS card transactions, all the below token-related fields are mandatory and must be provided in the request:
> 
> * `token.requestor_id`
> * `token.provider_reference_id`
> * `token.provider_category`
> * `token.provider`

## Endpoints:
- Sandbox: https://sandbox.juspay.in/txns

- Production: https://api.juspay.in/txns

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
- Value: Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Required
## Headers:

#### Content-Type:
- Value: application/x-www-form-urlencoded
- Tags: String
## Sample Code Snippets:
### Token/Tavv Txn Curl:

#### Request Code Snippet:

```request
curl --location 'https://sandbox.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic OTcsjhqbdjbjjknkqjnd' \
--data-urlencode 'order_id=test1753863036' \
--data-urlencode 'merchant_id=azhar_test' \
--data-urlencode 'payment_method_type=CARD' \
--data-urlencode 'payment_method=VISA' \
--data-urlencode 'card_number=4110151111111111' \
--data-urlencode 'card_exp_month=11' \
--data-urlencode 'card_exp_year=2030' \
--data-urlencode 'name_on_card=Krishnamoorthy' \
--data-urlencode 'card_security_code=123' \
--data-urlencode 'redirect_after_payment=true' \
--data-urlencode 'format=json' \
--data-urlencode 'tavv=/xxxxxxxxxxxxxxxxxx=' \
--data-urlencode 'token.card_last_four=1234' \
--data-urlencode 'token.par=550e8400-e29b-41d4-a716-446655440000' \
--data-urlencode 'token.type=TOKEN' \
--data-urlencode 'token.requestor_id=' \
--data-urlencode 'token.provider_reference_id=' \
--data-urlencode 'token.provider_category=' \
--data-urlencode 'token.provider='
```

### Sample Response:

#### Response:
```plaintext
{
    "payment": {
        "authentication": {
            "method": "GET",
            "url": "https://sandbox.juspay.in/v2/txns/test_test/mozqfFZaT4B8coUyvVN?cardIssuerBankName%3DHDFC%20Bank%26cardType%3DDEBIT%26paymentMethod%3DVISA%26paymentMethodType%3DCARD"
        }
    },
    "status": "PENDING_VBV",
    "txn_uuid": "mozqfFZaT4B8coUyvVN",
    "offer_details": {
        "offers": []
    },
    "order_id": "test_1780992614",
    "txn_id": "AT-test_1780992614-1"
}
```

## Body Parameters:
### Basic Parameters:

#### order_id:
- Description: Merchant should pass the order_id
- Value: test1753863036
- Tags: String, Required

#### merchant_id:
- Description: Merchant should pass the merchant_id
- Value: azhar_test
- Tags: String, Required

#### payment_method_type:
- Description: Should be passed as “`CARD`”
- Value: CARD
- Tags: String, Required

#### payment_method:
- Description: The merchant should pass the correct network name, for example: `"VISA"`, `"MASTERCARD"`, or `"AMEX"`.
- Value: VISA
- Tags: String, Required

#### card_number:
- Description: The token is fetched from the `/v4/get/card` API or the respective TR response.
- Value: 4610151777870044
- Tags: String, Required

#### card_exp_month:
- Description: The expiry month of the token fetched from the `/v4/get/card` API or the respective TR response.
- Value: 9
- Tags: String, Required

#### card_exp_year:
- Description: The expiry year of the token fetched from the `/v4/get/card` API or the respective TR response.
- Value: 2030
- Tags: String, Required

#### name_on_card:
- Value: Krishnamoorthy
- Tags: Tag

#### card_security_code:
- Description: Card cvv should be passed
- Value: 801
- Tags: String, Tag

#### redirect_after_payment:
- Description: Should be passed as true(boolean)
- Value: true
- Tags: Boolean, Required

#### format:
- Description: Should be passed as json
- Value: json
- Tags: String, Required

#### tavv:
- Description: Cryptogram for the transaction (3DS secure data). For **DINERS**  card transactions, this field should be passed as empty, as DINERS does not provide a cryptogram.
- Value: /wAAAAAAPAxNNo4AmbSegtMAAAA
- Tags: String, Required

#### token:
- Description: Token details
- Value:
  - **Requestor_id**:
    - Description: Token requestor id assigned by WIBMO for the merchant.`[Mandatory for DINERS]`
    - Value: TESTJUSPAYTEST001
    - Tags: String
  - **Provider_reference_id**:
    - Description: DINERS token reference id given by WIBMO.`[Mandatory for DINERS]`
    - Value: e5133cfe-****-****-****-1a6737827aa8
    - Tags: String
  - **Provider_category**:
    - Description: ENUM needed incase of DINERS token repeat transaction. **Value = ISSUER.** `[Mandatory for DINERS]`
    - Value: ISSUER
    - Tags: String
  - **Provider**:
    - Description: ENUM needed incase of DINERS token repeat transaction. **Value = ISSUER.** `[Mandatory for DINERS]`
    - Value: ISSUER
    - Tags: String
  - **Type**:
    - Description: Type of token (e.g., TOKEN,ALT_ID).**Values =TOKEN.** `[Mandatory for ALL]`
    - Value: TOKEN
    - Tags: String, Required
  - **Card_last_four**:
    - Description: Last four digits of the card associated with the token.`[Mandatory for ALL]`
    - Value: 1234
    - Tags: String, Required
  - **Par**:
    - Description: Payment Account Reference of token.
    - Value: 2A2E24A8******************************66FF209
    - Tags: String
- Tags: object, Mandatory
## API Responses:
### 200:

#### payment:
- Value:
  - **Authentication**:
    - Value:
      - **Method**:
        - Value: GET
        - Tags: String
      - **Url**:
        - Value: https://sandbox.juspay.in/v2/pay/start/mandate_juspay/moz6yP7sK7zwCwawoKA?cardIssuerBankName%3DSBI%26cardType%3DDEBIT%26paymentMethod%3DVISA%26paymentMethodType%3DCARD
        - Tags: String
    - Tags: Object
- Tags: Object

#### status:
- Value: PENDING_VBV
- Tags: String

#### txn_uuid:
- Value: moz6yP7sK7zwCwawoKA
- Tags: String

#### offer_details:
- Value:
  - **Offers**:
    - Tags: Array
- Tags: Object

#### order_id:
- Value: test_1779704765
- Tags: String

#### txn_id:
- Value: M-test_1779704765-1
- Tags: String


---

## See Also

- [Delete Token API](https://juspay.io/in/docs/api-reference/docs/tokenization-apis/delete-token-api)
- [ALT_ID And Tavv](https://juspay.io/in/docs/api-reference/docs/decoupled-tokenziation-txn-integration/alt-id-and-tavv)
