EMI Calculator API
This API is used for calculating EMI options available for single or multiple products added to a shopping cart. This document provides guidance on how to integrate the EMI Calculator for both single and multiple product solutions seamlessly. It details how to fetch offers for products using the EMI Calculator API.
API Details
- API Name: EMI Calculator v2
- UAT URL:
https://uat.pinepg.in/api/v2/emi/calculator
- Production URL:
https://pinepg.in/api/v2/emi/calculator
- HTTP Method: POST
- Content Type: application/json
Sample Requests and Responses
Multiple Cart Request
{
"merchant_data": {
"merchant_id": 3473,
"merchant_access_code": "57e39383-b053-4db9-a708-26d8971886e7"
},
"payment_data": {
"amount_in_paisa": 1100000
},
"product_details": [
{
"product_code": "SM-G975FCWG",
"product_amount": 550000
},
{
"product_code": "40",
"product_amount": 550000
}
]
}
Body Parameters
Parameter Name | Type | Description | Mandatory(M)/Optional |
---|---|---|---|
merchant_data | object | Contains information about the merchant. | M |
payment_data | object | Contains details about the payment. | M |
product_details | Array of objects | Contains information about the products in the cart. | M |
merchant_data
Parameter Name | Type | Description | Mandatory(M)/Optional |
---|---|---|---|
merchant_id | int | Merchant ID provided by Pine Labs. | M |
merchant_access_code | string | Merchant access code provided by Pine Labs. | M |
payment_data
Parameter Name | Type | Description | Mandatory(M)/Optional |
---|---|---|---|
amount_in_paisa | long | Total sum of product amounts present in cart. | M |
product_details
Parameter Name | Type | Description | Mandatory(M)/Optional |
---|---|---|---|
product_code | string | Product code at the merchant's end. | M |
product_amount | long | Product amount in paise. | M |
Response Parameters
Parameter Name | Type | Description |
---|---|---|
issuer | Array of objects | Contains details about the issuing bank's EMI options. |
response_code | int | Indicates the result of API processing. 1 denotes success. |
response_message | string | Message corresponding to the response code. |
Issuer Details
Parameter Name | Type | Description |
---|---|---|
list_emi_tenure | Array of objects | Information about the tenures available for each issuer. |
issuer_name | String | Name of the bank. |
is_debit_emi_issuer | Bool | Indicates whether the issuer offers debit EMI. |
list_emi_tenure
Parameter Name | Type | Description |
---|---|---|
offer_scheme | Object | Contains information about applicable offers for each product. |
tenure_id | Int | Tenure ID at Pine Labs' end. |
tenure_in_month | String | Tenure description at Pine Labs' end. |
monthly_installment | Long | EMI amount in paise. |
bank_interest_rate | Long | Interest rate for which bank EMI is calculated, multiplied by 10000. |
interest_pay_to_bank | Long | Interest amount paid to the bank in paise. |
total_offered_discount_cashback_amount | Long | Total discount applicable on cart in paise. |
loan_amount | Long | Amount in paise on which the loan will be booked. |
auth_amount | Long | Bank authorization amount in paise. |
Sample Requests and Responses
Multiple Cart Response
{
"issuer": [
{
"list_emi_tenure": [
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 1682,
"program_type": 112,
"is_scheme_valid": true
}
],
"product_code": "SM-G975FCWG",
"product_amount": 550000,
"subvention_cashback_discount": 11705,
"product_discount": 0,
"subvention_cashback_discount_percentage": 21500,
"product_discount_percentage": 0,
"subvention_type": 1
},
{
"schemes": [],
"product_code": "40",
"product_amount": 550000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0
}
],
"emi_scheme": {
"scheme_id": 1683,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "3",
"tenure_in_month": "3",
"monthly_installment": 370652,
"bank_interest_rate": 130000,
"interest_pay_to_bank": 23661,
"total_offerred_discount_cashback_amount": 11705,
"loan_amount": 1088295,
"auth_amount": 1088295
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 1682,
"program_type": 112,
"is_scheme_valid": true
}
],
"product_code": "SM-G975FCWG",
"product_amount": 550000,
"subvention_cashback_discount": 20266,
"product_discount": 0,
"subvention_cashback_discount_percentage": 37000,
"product_discount_percentage": 0,
"subvention_type": 1
},
{
"schemes": [],
"product_code": "40",
"product_amount": 550000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0
}
],
"emi_scheme": {
"scheme_id": 1683,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "6",
"tenure_in_month": "6",
"monthly_installment": 186840,
"bank_interest_rate": 130000,
"interest_pay_to_bank": 41306,
"total_offerred_discount_cashback_amount": 20266,
"loan_amount": 1079734,
"auth_amount": 1079734
}
],
"issuer_name": "HDFC",
"is_debit_emi_issuer": false
}
],
"response_code": 1,
"response_message": "SUCCESS"
}
{
"issuer": [
{
"list_emi_tenure": [
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 374161,
"program_type": 106,
"is_scheme_valid": true
}
],
"product_code": "TestProduct2",
"product_amount": 6000000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 141300,
"bank_interest_rate": 599736
}
],
"emi_scheme": null
},
"tenure_id": "24",
"tenure_in_month": "24",
"monthly_installment": 187489,
"bank_interest_rate": 141300,
"interest_pay_to_bank": 599736,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 6000000,
"auth_amount": 6000000
}
],
"issuer_name": "ICICI",
"is_debit_emi_issuer": false
}
],
"response_code": 1,
"response_message": "SUCCESS"
}
Subvention Types
- NO COST EMI: Subvention discount/cashback equal to interest paid by customer.
- LOW COST EMI: Subvention discount/cashback less than interest paid by customer.
- STANDARD EMI: No subvention discount/cashback given to customer.
EMI Model
- Single Cart Model: Supports pre cashback, post cashback, and instant discount subvention.
- Multi Cart Model: Supports instant discount subvention only.
Formula for Total Product Amount
TotalSumOfProducts = ProductDetails.Sum(x => x.ProductAmountInPaisa)