---
page_title: API Txns call for EMI
product: emi
page_source: https://juspay.io/in/docs/emi/docs/standard-emi-suite/api-txns-call-for-emi
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Femi%2Fdocs%2Fstandard-emi-suite%2Fapi-txns-call-for-emi
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/emi/llms.txt
---

## API Version: default


# Credit / Debit Card transaction for EMI

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

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

## Request Type: 
POST

## Headers:

#### Content-Type:
application/x-www-form-urlencoded
- Tags: String, Mandatory
## Sample Code Snippets:
### Sample Request:

#### Standard EMI Code Snippet:

```standard emi
// A regular card transaction
curl -X POST https://api.juspay.in/txns \
-d "order_id=:order_id" \
-d "merchant_id=:merchant_id" \
-d "payment_method_type=CARD" \
-d "payment_method=VISA" \
-d "card_number=4242424242424242" \
-d "card_exp_month=10" \
-d "card_exp_year=20" \
-d "name_on_card=Name" \
-d "card_security_code=111" \
-d "save_to_locker=true" \
-d "tokenize=true" \
-d "redirect_after_payment=true" \
-d "format=json"\
-d "is_emi=true" \
-d "emi_bank=HDFC" \
-d "emi_tenure=3" \
-d "emi_type=STANDARD_EMI"

// A Stored card transaction
curl -X POST https://api.juspay.in/txns \
-d "order_id=:order_id" \
-d "merchant_id=:merchant_id" \
-d "payment_method_type=CARD" \
-d "card_token=:card_token" \
-d "card_security_code=111" \ #optional field for CVV less supported transactions
-d "redirect_after_payment=true" \
-d "format=json"\
-d "is_emi=true" \
-d "emi_bank=HDFC" \
-d "emi_tenure=3" \
-d "emi_type=STANDARD_EMI"

```

#### Cardless EMI Code Snippet:

```cardless emi
curl -X POST https://api.juspay.in/txns \
-d "order_id=:order_id" \
-d "merchant_id=:merchant_id" \
-d "payment_method_type=CONSUMER_FINANCE" \
-d "payment_method=CONSUMER_FINANCE" \
-d "redirect_after_payment=true" \
-d "format=json"\
-d "is_emi=true" \
-d "emi_bank=HDFC_CLEMI" \
-d "emi_tenure=3" \
-d "emi_type=STANDARD_EMI"
```

### Sample Response:

#### Response:
```json
{
  "order_id": ":order_id",
  "txn_id": ":txn_id",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "method": "GET",
      "url": "https://api.juspay.in/pay/start/guest/8646a7a0xxx74fxxxx95fec00340a507"
    }
  }
}
```

## Body Parameters:
### For Card EMI::

#### order_id:
- Description: order_id pertaining to the order for which the payment is started.
- Tags: string, Mandatory

#### merchant_id:
- Description: ID of the merchant_account that you hold with us.
- Tags: string, Mandatory

#### payment_method_type:
- Description: Must be `CARD`
- Tags: string, Mandatory

#### payment_method:
- Description: Values can be of one of `VISA/MASTERCARD/MAESTRO/AMEX/RUPAY`
- Tags: string

#### card_token:
- Description: A valid card token obtained using /card/list API. If you send this parameter, then card_number, name_on_card, card_exp_year, card_exp_month fields are not required. If the token is generated using the /card/tokenize API, card_number, name_on_card, card_exp_year, card_exp_month and card_security_code fields are not required.NOTE: expiry of card_token is 15 mins from the time generation.
- Tags: string, Mandatory

#### card_number:
- Description: A valid credit/debit card number
- Tags: string, Mandatory

#### name_on_card:
- Description: Card holder name. Should contain alphabetical characters only.
- Tags: string

#### card_exp_year:
- Description: Represent the expiry year of the card as YY (two digits only)
- Tags: string, Mandatory

#### card_exp_month:
- Description: Represent the expiry month of the card as MM (two digits only)
- Tags: string, Mandatory

#### card_security_code:
- Description: CVV of the card. Usually three digits. Optional for all VISA saved cards, PLUXEE | SODEXO saved cards, and saved cards of select issuing banks of MASTERCARD
- Tags: string, Mandatory

#### save_to_locker:
- Description: This is a boolean variable and accepts true/false. If set to true, then the card will be saved in locker when the transaction is successful. Else, the card will not be saved.
- Tags: boolean, Optional

#### redirect_after_payment:
- Description: This is a boolean variable and accepts true/false. We recommend that you set this to true and use the redirection flow. If set to true, then the user is redirected to the return_url configured for the order. If set to false, then the user will be stopped at the response page from the gateway. Your client should be able to read the page/title to infer that the user has completed the transaction.
- Tags: boolean, Mandatory

#### format:
- Description: it is set to json, then the response will be HTTP 200 with a JSON formatted text. Otherwise, the response is HTTP 302 with the Location attribute having the destination URL.
- Tags: string, Mandatory

#### is_emi:
- Description: Default is false. Set it to true if the user wishes to perform an EMI transaction on the given card.
- Tags: boolean, Mandatory

#### emi_bank:
- Description: Represents the bank that issued the card. Value must be one of the entries mentioned under EMI Bank in the support matrix below.Bank code can be referred [here](https://docs.juspay.in/emi/docs/emi/emi-bank-details).
- Tags: string, Mandatory

#### emi_tenure:
- Description: The tenure of the EMI in number of months.
- Tags: integer, Mandatory

#### auth_type:
- Description: THREE_DS/OTP/VISA_CHECKOUT
- Tags: string

#### emi_type:
- Description: The type of EMI ie STANDARD_EMI
- Tags: string, Mandatory

#### supported_gateway_id:
- Description: Array of gateway IDs should be passed, only for EMI transactions. If an EMI plan is supported by a specific set of gateways, then the same list should be passed in this field so that transaction will get routed to the proper gateway. Read ‘gateway_id‘ from ‘supported_gateways‘ in EMI Plans v2 response
- Tags: Array of Integers
### For Cardless EMI::

#### order_id:
- Description: order_id pertaining to the order for which the payment is started.
- Tags: string, Mandatory

#### merchant_id:
- Description: ID of the merchant_account that you hold with us.
- Tags: string, Mandatory

#### payment_method_type:
- Description: Must be `CONSUMER_FINANCE`.
- Tags: string, Mandatory

#### payment_method:
- Description: Value must be `CONSUMER_FINANCE`
- Tags: string

#### redirect_after_payment:
- Description: This is a boolean variable and accepts true/false. We recommend that you set this to true and use the redirection flow. If set to true, then the user is redirected to the return_url configured for the order. If set to false, then the user will be stopped at the response page from the gateway. Your client should be able to read the page/title to infer that the user has completed the transaction.
- Tags: boolean, Mandatory

#### format:
- Description: it is set to json, then the response will be HTTP 200 with a JSON formatted text. Otherwise, the response is HTTP 302 with the Location attribute having the destination URL.
- Tags: string, Mandatory

#### is_emi:
- Description: Default is false. Set it to true if the user wishes to perform an EMI transaction on the given card.
- Tags: boolean, Mandatory

#### emi_bank:
- Description: Represents the bank that issued the cardless EMI. Value must be one of the entries mentioned under EMI Bank in the support matrix below.Bank code can be referred [here](https://docs.juspay.in/emi/docs/emi/emi-bank-details).
- Tags: string, Mandatory

#### emi_tenure:
- Description: The tenure of the EMI in number of months.
- Tags: integer, Mandatory

#### emi_type:
- Description: The type of EMI ie STANDARD_EMI
- Tags: string, Mandatory

#### supported_gateway_id:
- Description: Array of gateway IDs should be passed, only for EMI transactions. If an EMI plan is supported by a specific set of gateways, then the same list should be passed in this field so that transaction will get routed to the proper gateway. Read ‘gateway_id‘ from ‘supported_gateways‘ in EMI Plans v2 response
- Tags: Array of Integers, Mandatory
## API Responses:
### 200:

#### order_id:
- Description: :order_id
- Tags: string

#### txn_id:
- Description: :txn_id
- Tags: string

#### status:
- Description: PENDING_VBV
- Tags: string

#### payment:
- Value:
  - **Authentication.method**:
    - Tags: string
  - **Authentication.url**:
    - Tags: String
- Tags: object
### 400:

#### status:
- Description: error
- Tags: string

#### error_message:
- Description: Order timed out
- Tags: string

#### error_code:
- Description: invalid_request
- Tags: string
