Integration Steps
Learn how to integrate Plural debit card EMI APIs in your application, enabling your customers to make payments using EMI.
Follow the below steps to integrate with Plural EMI APIs to enable your customers to make payments using EMI.
Note:
Handle Payment: After generating the URL, Use this Link to navigate your customer's to their mobile apps. You can do this by rendering the URL returned by Plural as a button or a link for the customer to use.
1. EMI Calculator
Use this API to calculate the monthly instalments and breakdown.
Use the below Endpoints to calculate the monthly Instalment.
POST: https://uat.pinepg.in/api/v3/emi/calculator
POST: https://pinepg.in/api/v3/emi/calculator
Shown below are the sample request and sample response for a EMI Calculator API.
{
"merchant_data": {
"merchant_id": 3473,
"merchant_access_code": "57e39383-b053-4db9-a708-26d8971886e7"
},
"payment_data": {
"amount_in_paisa": 1000
},
"product_details": [
{
"product_code": "SMG975FCWG",
"product_amount": 500
},
{
"product_code": "40",
"product_amount": 500
}
]
}
{
"issuer": [
{
"list_emi_tenure": [
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 1682,
"program_type": 112,
"is_scheme_valid": true
}
],
"product_code": "SMG975FCWG",
"product_amount": 500,
"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": 500,
"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": "SMG975FCWG",
"product_amount": 500,
"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": 500,
"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
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 1682,
"program_type": 112,
"is_scheme_valid": true
}
],
"product_code": "SM-G975FCWG",
"product_amount": 500,
"subvention_cashback_discount": 30756,
"product_discount": 0,
"subvention_cashback_discount_percentage": 56000,
"product_discount_percentage": 0,
"subvention_type": 1
},
{
"schemes": [],
"product_code": "40",
"product_amount": 500,
"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": "9",
"tenure_in_month": "9",
"monthly_installment": 125841,
"bank_interest_rate": 140000,
"interest_pay_to_bank": 63325,
"total_offerred_discount_cashback_amount": 30756,
"loan_amount": 1069244,
"auth_amount": 1069244
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 1682,
"program_type": 112,
"is_scheme_valid": true
}
],
"product_code": "SMG975FCWG",
"product_amount": 500,
"subvention_cashback_discount": 39532,
"product_discount": 0,
"subvention_cashback_discount_percentage": 56000,
"product_discount_percentage": 0,
"subvention_type": 1
},
{
"schemes": [],
"product_code": "40",
"product_amount": 500,
"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": "12",
"tenure_in_month": "12",
"monthly_installment": 95215,
"bank_interest_rate": 140000,
"interest_pay_to_bank": 82112,
"total_offerred_discount_cashback_amount": 39532,
"loan_amount": 1060468,
"auth_amount": 1060468
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 1682,
"program_type": 112,
"is_scheme_valid": true
}
],
"product_code": "SMG975FCWG",
"product_amount": 500,
"subvention_cashback_discount": 60209,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 1
},
{
"schemes": [],
"product_code": "40",
"product_amount": 500,
"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": "18",
"tenure_in_month": "18",
"monthly_installment": 64867,
"bank_interest_rate": 150000,
"interest_pay_to_bank": 127815,
"total_offerred_discount_cashback_amount": 60209,
"loan_amount": 1039791,
"auth_amount": 1039791
}
],
"issuer_name": "HDFC",
"is_debit_emi_issuer": false
}
],
"response_code": 1,
"response_message": "SUCCESS"
}
{
"product_details": [
{
"product_code": "SMG988BZAP",
"product_amount": 1000
}
],
"payment_data": {
"amount_in_paisa": 1000
},
"merchant_data": {
"merchant_access_code": "dsfff33-5e6e-411a-99fe-dsdsjsfff",
"merchant_id": "10838"
}
}
{
"issuer": [
{
"list_emi_tenure": [
{
"offer_scheme": {
"product_details": [
{
"schemes": [],
"product_code": "SMG988BZAP",
"product_amount": 1000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 150000,
"bank_interest_rate": 747888
}
],
"emi_scheme": {
"scheme_id": 21878,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "12",
"tenure_in_month": "12",
"monthly_installment": 812324,
"bank_interest_rate": 150000,
"interest_pay_to_bank": 747888,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 9000000,
"auth_amount": 9000000
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [],
"product_code": "SMG988BZAP",
"product_amount": 1000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 150000,
"bank_interest_rate": 1473096
}
],
"emi_scheme": {
"scheme_id": 21878,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "24",
"tenure_in_month": "24",
"monthly_installment": 436379,
"bank_interest_rate": 150000,
"interest_pay_to_bank": 1473096,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 9000000,
"auth_amount": 9000000
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [],
"product_code": "SMG988BZAP",
"product_amount": 1000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 150000,
"bank_interest_rate": 571806
}
],
"emi_scheme": {
"scheme_id": 21878,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "9",
"tenure_in_month": "9",
"monthly_installment": 1063534,
"bank_interest_rate": 150000,
"interest_pay_to_bank": 571806,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 9000000,
"auth_amount": 9000000
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [],
"product_code": "SMG988BZAP",
"product_amount": 1000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 150000,
"bank_interest_rate": 397824
}
],
"emi_scheme": {
"scheme_id": 21878,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "6",
"tenure_in_month": "6",
"monthly_installment": 1566304,
"bank_interest_rate": 150000,
"interest_pay_to_bank": 397824,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 9000000,
"auth_amount": 9000000
},
{
"offer_scheme": {
"product_details": [
{
"schemes": [],
"product_code": "SMG988BZAP",
"product_amount": 1000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 150000,
"bank_interest_rate": 1106334
}
],
"emi_scheme": {
"scheme_id": 21878,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "18",
"tenure_in_month": "18",
"monthly_installment": 561463,
"bank_interest_rate": 150000,
"interest_pay_to_bank": 1106334,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 9000000,
"auth_amount": 9000000
}
],
"issuer_name": "HDFC",
"is_debit_emi_issuer": false
}
],
"response_code": 1,
"response_message": "SUCCESS"
}
Refer to our EMI Calculator API Documentation for more information.
2. Scheme Validation
Use this API to check the validity of the offer selected on a Card.
Use the below Endpoints to validate the offer applicable on the card.
POST: https://uat.pinepg.in/api/v3/scheme/validation
POST: https://pinepg.in/api/v3/scheme/validation
Shown below are the sample request and sample response for a Scheme Validation API.
{
"merchant_data": {
"merchant_id": 3413,
"merchant_access_code": "1c295f88-4477-4cd3-b5ace76148545a3e"
},
"payment_data": {
"amount_in_paisa": 1000000
},
"card_data": {
"card_number": "40120 0103778404"
},
"emi_data": {
"offer_scheme": {
"product_details": [
{
"schemes": [],
"product_code": "40",
"product_amount": 1000000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 47180
}
],
"emi_scheme": {
"scheme_id": 3449,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "6",
"tenure_in_month": "6",
"monthly_installment": 174530,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 47180,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 1000000,
"auth_amount": 1000000
}
}
{
"response_code": 1,
"response_message": "SUCCESS"
}
Refer to our Scheme Validation API Documentation for more information.
3. Accept Payment API
Use this API to generate a token against a payment. Before initiating the API as a prerequisite you must encode the JSON to a Base64 and generate an HashMap to authenticate the API.
3.1. Prerequisite
3.1.1. Enter Payment Details
Use the below JSON to enter the payment Details. You are required to enter the merchant_data
and payment_data
child object.
{
"merchant_data": {
"merchant_id": 12345678,
"merchant_access_code": "4a8c422e-928d-4f84-bfe8-27a09af66647",
"unique_merchant_txn_id": "XYZ123",
"merchant_return_url": "https://www.pinelabs.com"
},
"payment_data": {
"amount_in_paisa": 800
},
"txn_data": {
"navigation_mode": "7",
"payment_mode": "10",
"transaction_type": "1",
"time_stamp": 157588000000
},
"product_details": {
"product_code": "7803",
"product_amount": "1000"
}
}
{
"merchant_data": {
"merchant_id": 12345678,
"merchant_access_code": "4a8c422e-928d-4f84-bfe8-27a09af66647",
"unique_merchant_txn_id": "XYZ123",
"merchant_return_url": "https://www.pinelabs.com"
},
"payment_data": {
"amount_in_paisa": 2000
},
"txn_data": {
"navigation_mode": "7",
"payment_mode": "10",
"transaction_type": "1",
"time_stamp": 157588000000
},
"product_details": [
{
"product_code": "7803",
"product_amount": "1000"
},
{
"product_code": "7806",
"product_amount": "1000"
}
]
}
JSON Parameters
Click Here
The table below lists the various JSON parameters.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
merchant_data | object | M | An object that contains the merchant details. Learn more about our merchant_data child object. |
payment_data | object | M | An object that contains the payment details. Learn more about our payment_data child object. |
txn_data | object | M | An object that contains the transaction details. Learn more about our txn_data child object. |
customer_data | object | O | An object that contains the customer details. Learn more about our customer_data child object. |
udf_data | object | O | An object that contains the user defined details. Learn more about our merchant_data child object. |
product_details | array of object | O | An object that contains the array of product details. Learn more about our merchant_data child object. |
Merchant Data [Child Object]
The table below lists the various parameters in the merchant_data
child object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
merchant_id | integer | M | Unique identifier of the merchant in the Plural database. Example: 123456 |
merchant_access_code | string | M | Unique merchant access code provided by Plural. Example: 4a8c422e-928d-4f84-bfe8-27a09af66647 |
unique_merchant_txn_id | string | M | Unique identifier of the specific transaction. Example: xyz123 |
merchant_return_url | string | M | Merchant return URL. Example: https://www.pinelabs.com Note: Your customer's are redirected to this page after a successful payment. |
Note:
- Contact our support team to know your
merchant_id
andmerchant_access_code
. Additionally you are required to whitelist yourmerchant_return_url
and get enabled with payment modes as required.
Payment Data [Child Object]
The table below lists the various parameters in the payment_data
child object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
amount_in_paisa | integer | M | The transaction amount in paisa. Example: 800 |
Txn Data [Child Object]
The table below lists the various parameters in the transaction_data
child object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
navigation_mode | integer | M | Checkout navigation mode. Example: 7 Accepted values:
Note: Currently TPV is available through Seamless checkout only. |
payment_mode | string | M | The payment mode you prefer to accept payment. Accepted values:
|
transaction_type | integer | M | The type of transaction. Example: 1 Accepted values:
|
time_stamp | integer | O | Unix timestamp. Example: 157588000000 |
Customer Data [Child Object]
The table below lists the various parameters in the customer_data
child object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
email_id | string | O | Customer's email address. Example: [email protected] |
first_name | string | O | Customer's first name. Example: Kevin |
last_name | string | O | Customer's last name. Example: Bob |
customer_id | string | O | Unique identifier of the customer. Example: 123456 |
mobile_no | string | O | Customer's mobile number. Example: 9876543210 |
billing_data | object | O | An object that contains the billing details. Learn more about our merchant_data child object. |
shipping_data | object | O | An object that contains the shipping details. Learn more about our merchant_data child object. |
Billing Data [Child Object]
The table below lists the various parameters in the billing_data
child object. This is part of the customer_data
object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
address1 | string | O | Customer's billing address1. Example: No 10 Church street Bangalore |
address2 | string | O | Customer's billing address2. Example: No 10 Brigade road Bangalore |
address3 | string | O | Customer's billing address3. Example: No 10 M G road Bangalore |
pincode | string | O | PIncode of the billing address. Example: 560001 |
city | string | O | City of the billing address. Example: Bangalore |
state | string | O | State of the billing address. Example: Karanataka |
country | string | O | Country of the billing address. Example: India |
Shipping Data [Child Object]
The table below lists the various parameters in the shipping_data
child object. This is part of the customer_data
object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
address1 | string | O | Customer's shipping address1. Example: No 10 Church street Bangalore |
address2 | string | O | Customer's shipping address2. Example: No 10 Brigade road Bangalore |
address3 | string | O | Customer's shipping address3. Example: No 10 M G road Bangalore |
pincode | string | O | PIncode of the shipping address. Example: 560001 |
city | string | O | City of the shipping address. Example: Bangalore |
state | string | O | State of the shipping address. Example: Karanataka |
country | string | O | Country of the shipping address. Example: India |
Udf Data [Child Object]
The table below lists the various parameters in the udf_data
child object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
udf_field_1 | string | O | User defined value1. Example: DD |
udf_field_2 | string | O | User defined value2 Example: XOF |
udf_field_3 | string | O | User defined value3. Example: XOA |
udf_field_4 | string | O | User defined value4. Example: ASDF |
Product Details [Child Object]
The table below lists the various parameters in the product_details
child object.
Parameter | Type | Requirement Type | Description |
---|---|---|---|
product_code | string | M | The product code. Example: 7803 |
product_amount | string | M | The product amount. Example: 10000 |
Note:
- The sum of all the products
product_amount
must be equal to the total cart valuepayment_data.amount_in_paisa
.
3.1.2. Encode JSON
Convert the updated JSON to a Base64 Encode. Use the below sample code to handle the conversion of the JSON to a Base64 Encode.
import java.util.Base64;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
public class SignatureGenerator {
private static Map < String, Object > clean(Map < String, Object > arr) {
return arr.entrySet().stream()
.filter(entry -> entry.getValue() != null && !entry.getValue().toString().isEmpty())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
}
public static void main(String[] args) {
Map < String, Object > requestBody = new LinkedHashMap < > ();
Map < String, Object > merchant_data = new LinkedHashMap < > ();
merchant_data.put("merchant_id", "merchant_id");
merchant_data.put("merchant_access_code", "merchant_access_code");
merchant_data.put("unique_merchant_txn_id", "XYZ123");
merchant_data.put("merchant_return_url", "whitelisted_merchant_return_url");
requestBody.put("merchant_data", merchant_data);
Map < String, Object > paymentDataObject = new LinkedHashMap < > ();
paymentDataObject.put("amount_in_paisa", 100);
requestBody.put("payment_data", paymentDataObject);
Map < String, Object > txnObject = new LinkedHashMap < > ();
txnObject.put("navigation_mode", "2");
txnObject.put("payment_mode", "1,3,4,19,10,11,14");
txnObject.put("transaction_type", "1");
requestBody.put("txn_data", txnObject);
Map < String, Object > requestBodyCleaned = clean(requestBody);
Map < String, Object > mapStatus = new HashMap < > ();
mapStatus.put("result", requestBodyCleaned);
Gson gson = new GsonBuilder().disableHtmlEscaping().create();
String jsonString2 = gson.toJson(requestBodyCleaned);
jsonString2 = jsonString2.replace("\\/", "/");
// Encoding JSON string to base64
String base64Encoded = Base64.getEncoder().encodeToString(jsonString2.getBytes());
System.out.println(base64Encoded);
}
}
3.1.3. HashMap:
Generate HashMap using the Base64 Encode and the secret key. Use the below sample code to handle the generation of HashMap using SHA256.
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;
public class SignatureGenerator {
public static String jsonHash(String request, String secret) throws NoSuchAlgorithmException, InvalidKeyException, IllegalStateException, UnsupportedEncodingException {
SecretKeySpec secretKeySpec = new SecretKeySpec(DatatypeConverter.parseHexBinary(secret), "HmacSHA256");
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(secretKeySpec);
byte[] hmacBytes = mac.doFinal(request.getBytes("UTF-8"));
String ss = String.format("%02x", new BigInteger(1, hmacBytes));
return bytesToHex(hmacBytes).toUpperCase();
}
private static String bytesToHex(byte[] bytes) {
StringBuilder result = new StringBuilder();
for (byte b : bytes) {
result.append(String.format("%02X", b));
}
return result.toString();
}
public static void main(String[] args) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException {
String responseBody = "<Base64EncodedPayload>";
String signingSecret = "<Secret>";
String requestSignature = SignatureGenerator.jsonHash(responseBody,signingSecret);
System.out.println(requestSignature);
}
}
After successfully converting the JSON to a Base64 encode and generated a HashMap secret use the below Endpoints to accept payment.
POST: https://uat.pinepg.in/api/v2/accept/payment
POST: https://pinepg.in/api/v2/accept/payment
Shown below are the sample request and sample response for a Accept Payment API.
{
"request": "ewogICJtZXJjaGFudF9kYXRhIjogewogICAgIm1lcmNoYW50X2lkIjogMjIyMDgyLAogICAgIm1lcmNoYW50X2FjY2Vzc19jb2RlIjogImNmZDA1YzBjLTM5ZjEtNDIzMi1iZDZmLTZkM2E4NjA4ZTFiZSIsCiAgICAidW5pcXVlX21lcmNoYW50X3R4bl9pZCI6ICJ0ZXN0aW5nZWRnZXNlYW1sZXNzMTEyMzQ1NDMyIiwKICAgICJtZXJjaGFudF9yZXR1cm5fdXJsIjogImh0dHBzOi8vc3RhZ2Utd2ViYXBwLnBheXRtLmluL3Blb24ucGhwIgogIH0sCiAgInBheW1lbnRfZGF0YSI6IHsKICAgICJhbW91bnRfaW5fcGFpc2EiOiA4MDAKICB9LAogICJ0eG5fZGF0YSI6IHsKICAgICJuYXZpZ2F0aW9uX21vZGUiOiAiNyIsCiAgICAicGF5bWVudF9tb2RlIjogIjEwIiwKICAgICJ0cmFuc2FjdGlvbl90eXBlIjogIjEiLAogICAgInRpbWVfc3RhbXAiOiAxNTc1ODgwMDAwMDAKICB9Cn0="
}
{
"token": "S087B99vA68R0L9gb8JI%2bqjds%2bOZaArBKLb3s7eQ%2fg7k%3d",
"response_code": 1,
"response_message": "SUCCESS"
}
Refer to our Accept Payment API Documentation for more information.
4. Process Payment
To Generate a Payment Link use our Process Payment API.
Use the below endpoints to Process Payment.
POST: https://uat.pinepg.in/api/v2/process/payment
POST: https://pinepg.in/api/v2/process/payment
Query Parameter
Token
: You need to pass the token generated in the Accept Payment API as the query parameter.
Shown below is a sample request and sample response for a Process Payment API.
{
"card_data": {
"card_number": "401200103778404"
},
"additional_data": {
"mobile_no": "9553441115"
},
"emi_data": {
"offer_scheme": {
"product_details": [
{
"schemes": [],
"product_code": "40",
"product_amount": 1000000,
"subvention_cashback_discount": 0,
"product_discount": 0,
"subvention_cashback_discount_percentage": 0,
"product_discount_percentage": 0,
"subvention_type": 3,
"bank_interest_rate_percentage": 160000,
"bank_interest_rate": 47180
}
],
"emi_scheme": {
"scheme_id": 3449,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "6",
"tenure_in_month": "6",
"monthly_installment": 174530,
"bank_interest_rate": 160000,
"interest_pay_to_bank": 47180,
"total_offerred_discount_cashback_amount": 0,
"loan_amount": 1000000,
"auth_amount": 1000000
}
}
{
"api_url": "https://environment/api/v2/validate/otp?token=ARmxNsSVcACtsLan00dljumLJJX5ST8eal3nLZD8iHM%3d",
"response_code": 1,
"response_message": "SUCCESS"
}
Refer to our Process Payment API Documentation for more information.
5. Validate OTP
Use this API to authenticate the payment.
Use the below endpoints to Validate OTP.
POST: http://hostname:port/pinepg/v2/process/payment?token=848RFsu%2bRnNcSsaZdzEgkeosvCc2o5lK TV4uKJF%2fcjE%3d
Shown below is a sample request and sample response for a Validate OTP API.
{
"otp": "123456"
}
{
"api_url": "https://environment/api/v2/order/confirmation?token=LMlBhf7p8dFcu3K0%2fvntrY1URugF3sPS0bjPL71RDYE%3d",
"validate_otp_response": {
"customer_name": "Kamal Chowla",
"interest_rate": 160000,
"merchant_name": "PINELAB",
"total_amount_in_paise": 1000000,
"emi_amount_in_paise": 174530,
"address": "INSURANCE REGULATORY ANDDEVELOPMENT AUTXXXXXXXXXXXXXXXDELHI110001",
"tenure_in_months": "6",
"last6digitaccountnumber": "077958"
},
"response_code": 1,
"response_message": "SUCCESS"
}
6. Order Confirmation
Use this API to confirm an order.
Use the below endpoints to confirm an order.
POST: https://environment/api/v2/order/confirmation?token=LMlBhf7p8dFcu3K0%2fvntrY1URugF3sPS0bjPL71RDYE%3d
Shown below is a sample request and sample response for a Validate OTP API.
{
"api_url": "https://environment/api/v2/order/confirmation?token=LMlBhf7p8dFcu3K0%2fvntrY1URugF3sPS0bjPL71RDYE%3d",
"validate_otp_response": {
"customer_name": "Kamal Chowla",
"interest_rate": 160000,
"merchant_name": "PINELAB",
"total_amount_in_paise": 1000000,
"emi_amount_in_paise": 174530,
"address": "INSURANCE REGULATORY ANDDEVELOPMENT AUTXXXXXXXXXXXXXXXDELHI110001",
"tenure_in_months": "6",
"last6digitaccountnumber": "077958"
},
"response_code": 1,
"response_message": "SUCCESS"
}
Handle Payments
Use the generated link returned in our Generate Payment Link API to redirect your customers to the seamless checkout to accept payment.
To know the status of the payment you can use the below options.
- Inquiry API: Use this API to check transaction statuses.
- Webhook Notification: We send Webhook notifications on the successful payment or any changes to the payments response object.
Updated about 2 months ago