---
page_title: EMI Transaction API
product: advance-emi
page_source: https://docs.juspay.io/advance-emi/docs/advance-emi-suite/emi-transaction-api
openapi: https://docs.juspay.io/api/swagger?document=https%3A%2F%2Fdocs.juspay.io%2Fadvance-emi%2Fdocs%2Fadvance-emi-suite%2Femi-transaction-api
llms_txt: https://docs.juspay.io/llms.txt
product_llms_txt: https://docs.juspay.io/advance-emi/llms.txt
---

## API Version: default


# EMI Transaction API



This is a server side call that takes parameters from the merchant server based on the payment method selected by your user. It creates an transaction on Juspay and forward the request to the underlying gateways to process the transaction and then navigate to bank page for OTP authentication.

Refer the below details to create /txns request for Card transactions with required EMI parameters.

> **Note**
> * `emi_type,emi_tenure,is_emi,emi_bank`and**** `offers`(OfferID) are the mandatory parameters
> * `emi_type`parameter value has to be value of **txn_emi_type** fetched from emi plans call (Standard, Low-cost and No-cost EMI)
> * `offers` parameter is mandatory parameter for Juspay Powered No cost / Low cost 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:

#### Card EMI Code Snippet:

```card emi
// For a new 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"\
-d "offers=[3a8fc1dc-2ace-4f15-8bae-16b376785692]"                                


//For 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"\
-d "offers=[3a8fc1dc-2ace-4f15-8bae-16b376785692]"

```

#### Cardless EMI Code Snippet:

```cardless emi
curl --location 'https://sandbox.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic xxxgrtbhTeB'\
--data-urlencode 'order_id=1758883049' \
--data-urlencode 'merchant_id=Merchant' \
--data-urlencode 'payment_method_type=CONSUMER_FINANCE' \
--data-urlencode 'payment_method=CONSUMER_FINANCE' \
--data-urlencode 'format=json' \
--data-urlencode 'is_emi=true' \
--data-urlencode 'emi_bank=LAZYPAY_CLEMI' \
--data-urlencode 'emi_tenure=3' \
--data-urlencode 'emi_type=STANDARD_EMI' \
--data-urlencode "offers=[3a8fc1dc-2ace-4f15-8bae-16b376785692]"
```

### Sample Response:

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

```

## Body Parameters:
### Section3:

#### 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: Values can be,

For Card EMIs - `CARD`For Cardless - `CONSUMER_FINANCE`
- Tags: string, Mandatory

#### payment_method:
- Description: Values can be of below,

For Cards - One of `VISA/MASTERCARD/MAESTRO/AMEX/RUPAY`For Cardless - `CONSUMER_FINANCE`
- 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`card_number` is mandatory for Card EMI and not required for Cardless.
- Tags: string, conditional

#### 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)`card_exp_year` is mandatory for Card EMI and not required for Cardless.
- Tags: string, conditional

#### card_exp_month:
- Description: Represent the expiry month of the card as MM (two digits only)`card_exp_month` is mandatory for Card EMI and not required for Cardless.
- Tags: string, conditional

#### 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`card_security_code` is mandatory for Card EMI and not required for Cardless.
- Tags: string, conditional

#### 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://juspay.io/in/docs/advance-emi/docs/advance-emi-suite/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: `emi_type`parameter value has to be `STANDARD_EMI` for all the three(Standard, Low-cost and No-cost EMI) type of EMI transactions
- 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

#### offers:
- Description: * Offer ID created on Juspay dashboard against the standard EMI on Juspay Offers dashboard. It can be passed in the array of Strings
* `offers` parameter is mandatory parameter and should be passed only for Low-cost and No-cost EMI offers created on Juspay
- Tags: String, 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
