EMI Calculator API

You can use this API to display the EMI plans along with all offers on the checkout page. This API may also be used to display the EMI plans on Product Page or any other screen the merchant may deem fit. You can use it for the following:

  • Fetch EMI plans: You can use this API to fetch EMI Amounts, rate of interest, total amount to be paid across eligible banks.
  • Fetch EMI plans for a particular bank
  • Fetch EMI plan for a particular bank & tenure
  • Fetch EMI plans with best offers applicable
  • Fetch EMI plans with one offer applied
  • Fetch EMI plans with SKU based offers

Environment

Header parameters

ParameterExample
acceptapplication/json
content-typeapplication/json
x-credential-usernameOADt8R

Request parameters

ParameterDescription
amount
mandatory
This parameter must include the principal amount that needs to be converted into EMI.
additional_charges
optional
This parameter must include the convenience fee if the merchant wants to collect.
offer_key
optional
This parameter must contain the offer key for the transaction-level offer.
autoApplyOffer
optional
This parameter must be set to true if the merchant wants to apply best offer when no transaction offer keys specified.
skus
optional
This parameter must include the SKU data.
skus.skuAmount
mandatory
This parameter must contain the amount per SKU.
skus.quantity
mandatory
This parameter must contain the SKU quantity.
skus.skuName
mandatory
This parameter must contain the name of SKU.
skus.offerKeys
optional
This parameter must contain the offer key for SKU.
skus.autoApplyOfferThis parameter must be set to true if the merchant wants to apply best offer when no SKU offer keys specified..
bankCodes
optional
This parameter must contain the bank codes for filtering.
emiCodes
optional
This parameter must contain the EMI bankcodes for filtering.
disableOverrideNceConfig
optional
This parameter must be set to true PayU will not consider NCE through merchant parameters for the merchant.

Sample request

curl --location --request POST 'https://apitest.payu.in/calculateEmi/v2' \
--header 'x-credential-username: smsplus' \
--header 'Content-Type: application/json' \
--data-raw '{
    "txnAmount": 10000,
    "additionalCharges": 0,
    "offerKeys": null,
    "autoApplyOffer": true,
    "bankCodes":null,
    "emiCodes":null,
    "disableOverrideNceConfig": true,
    "skus": [
        {
            "skuId": "Product1",
            "skuAmount": 8000,
            "quantity": 1,
            "offerKeys": null,
            "autoApplyOffer": false
        },
        {
            "skuId": "Product2",
            "skuAmount": 1000,
            "quantity": 2,
            "offerKeys": null,
            "autoApplyOffer": false
        }
    ]
}'

Response parameters

FieldDescriptionExample
messageResponse message indicating success or failure of the API call.Success
statusStatus code indicating the result of the API call (1 for success, 0 for failure).1
resultThe result is in JSON format with an array of EMI options. For example, EMI6, EMI12, EMI18, etc. For more information, refer to EMI JSON fields description .10000.0
nceDiscount.totalIn NCE (No-Cost EMI), total non-cash equivalent discount amount.1266.78
nceDiscount.instantIn NCE (No-Cost EMI), instant non-cash equivalent discount applied.1266.78
nceDiscount.cashbackIn NCE (No-Cost EMI), cashback from non-cash equivalent discount.0.0
skuSKU details in a JSON format. For more information, refer to sku JSON fields descriptionProduct1
totalPayableAmountTotal amount payable after discounts and EMI.10000.0
nceDiscountAmountTotal non-cash equivalent discount amount applied.1266.78
revisedPrincipalRevised principal loan amount.10000.0
subventionAmountSubvention amount considered for the transaction.10000.0
gstSubventionIndicates if GST is included in subvention.true
nceViaConfigIndicates if NCE discount is via configuration.true
bankCodeBank code of the bank providing EMI. For more information, refer to EMI Codes.YESB
emi_valueEMI value calculated.555.55
emi_interest_paidTotal interest paid over the EMI tenure.1266.78

EMI JSON fields description

FieldDescriptionExample
transactionAmountThe total transaction amount for which the EMI is calculated.10000.0
payBackAmountThe amount to be paid back over the EMI tenure, including interest.0.0
emiAmountThe EMI amount to be paid in each installment.555.56
additionalCostAny additional costs apart from the EMI amount."0.0"
emiMdrNoteMerchant discount rate note related to EMI.0.0
emiBankInterestInterest rate charged by the bank for the EMI.15.0
bankRateBank's rate for the EMI calculation.0.0
bankChargeAdditional bank charges associated with the EMI.0.0
amountAmount per EMI installment including any charges.555.56
cardTypeType of card used for the transaction.credit card
tenureDuration of the EMI plan.18 months
loanAmountPrincipal loan amount for EMI.10000.0
offerKeysKeys associated with any offers applied.null
offerDiscount.totalTotal discount amount provided as part of the offer.0.0
offerDiscount.instantInstant discount amount applied.0.0
offerDiscount.cashbackCashback amount provided as part of the offer.0.0

sku JSON fields description

FieldDescriptionExample
skuIdSKU identifier for the product.Product1
amountPerSkuAmount per SKU for the product.8000.0
amountTotal amount for the SKUs provided.8000.0
quantityQuantity of the SKU.1
offerKeysKeys associated with any offers on SKU.null
emiAmountEMI amount specific to SKU.444.44
emiBankInterestEMI bank interest for SKU.15.0
emiValueEMI value calculated for SKU.444.44
emiInterestPaidInterest paid for EMI on SKU.1013.42
offerDiscount.totalTotal offer discount on SKU.0.0
offerDiscount.instantInstant offer discount on SKU.0.0
offerDiscount.cashbackCashback offer on SKU.0.0
nceDiscount.totalTotal non-cash equivalent discount on SKU.1013.42
nceDiscount.instantInstant non-cash equivalent discount on SKU.1013.42
nceDiscount.cashbackCashback from non-cash equivalent discount on SKU.0.0
totalPayableAmountTotal amount payable for the SKU.7999.92
nceDiscountAmountNCE discount amount applied on SKU.1013.42
subventionAmountSubvention amount for SKU.8000.0
revisedPrincipalRevised principal amount for SKU.8000.0
additionalChargeAdditional charge applicable to SKU.0.0

Sample response

{
    "message": "Success",
    "status": 1,
    "result": {
        "YES": {
            "EMIY18": {
                "transactionAmount": 10000.0,
                "payBackAmount": 0.0,
                "emiAmount": 555.56,
                "additionalCost": "0.0",
                "emiMdrNote": 0.0,
                "emiBankInterest": 15.0,
                "bankRate": 0.0,
                "bankCharge": 0.0,
                "amount": 555.56,
                "cardType": "credit card",
                "tenure": "18 months",
                "loanAmount": 10000.0,
                "offerKeys": null,
                "offerDiscount": {
                    "total": 0.0,
                    "instant": 0.0,
                    "cashback": 0.0
                },
                "nceDiscount": {
                    "total": 1266.78,
                    "instant": 1266.78,
                    "cashback": 0.0
                },
                "sku": [
                    {
                        "skuId": "Product1",
                        "amountPerSku": 8000.0,
                        "amount": 8000.0,
                        "quantity": 1,
                        "offerKeys": null,
                        "emiAmount": 444.44,
                        "emiBankInterest": 15.0,
                        "emiValue": 444.44,
                        "emiInterestPaid": 1013.42,
                        "offerDiscount": {
                            "total": 0.0,
                            "instant": 0.0,
                            "cashback": 0.0
                        },
                        "nceDiscount": {
                            "total": 1013.42,
                            "instant": 1013.42,
                            "cashback": 0.0
                        },
                        "totalPayableAmount": 7999.92,
                        "nceDiscountAmount": 1013.42,
                        "subventionAmount": 8000.0,
                        "revisedPrincipal": 8000.0,
                        "additionalCharge": 0.0
                    },
                    {
                        "skuId": "Product2",
                        "amountPerSku": 1000.0,
                        "amount": 2000.0,
                        "quantity": 2,
                        "offerKeys": null,
                        "emiAmount": 111.11,
                        "emiBankInterest": 15.0,
                        "emiValue": 111.11,
                        "emiInterestPaid": 253.36,
                        "offerDiscount": {
                            "total": 0.0,
                            "instant": 0.0,
                            "cashback": 0.0
                        },
                        "nceDiscount": {
                            "total": 1266.78,
                            "instant": 1266.78,
                            "cashback": 0.0
                        },
                        "totalPayableAmount": 1999.98,
                        "nceDiscountAmount": 253.36,
                        "subventionAmount": 2000.0,
                        "revisedPrincipal": 2000.0,
                        "additionalCharge": 0.0
                    }
                ],
                "totalPayableAmount": 10000.0,
                "nceDiscountAmount": 1266.78,
                "revisedPrincipal": 10000.0,
                "subventionAmount": 10000.0,
                "gstSubvention": true,
                "nceViaConfig": true,
                "bankCode": "YESB",
                "emi_value": 555.55,
                "emi_interest_paid": 1266.78
            },