Skip to main content

Scheme Validation v2

Scheme Validation Integration

Introduction

1. Overview

It checks the validity of selected offer on a card number for both issuer level and OEM level validation.

2. Implementation Details

UAT - https://uat.pinepg.in/api/v2/scheme/validation

PRODUCTION - https://pinepg.in/api/v2/scheme/validation

CURL:

{
"merchant_data": {
"merchant_id": 119815,
"merchant_access_code": "0b8453fc-d7a2-4770-91cf-e2e01e6f65dd"
},
"payment_data": {
"amount_in_paisa": 1000000
},
"card_data": {
"card_number": "4012001037141112"
},
"emi_data": {
"offer_scheme": {
"product_details": [
{
"schemes": [
{
"scheme_id": 50144,
"program_type": 112,
"is_scheme_valid": true
}
],
"product_code": "58327",
"product_amount": 1000000,
"subvention_cashback_discount": 20000,
"product_discount": 0,
"subvention_cashback_discount_percentage": 20000,
"product_discount_percentage": 0,
"subvention_type": 2,
"bank_interest_rate_percentage": 140000,
"bank_interest_rate": 13770
}
],
"emi_scheme": {
"scheme_id": 50143,
"program_type": 105,
"is_scheme_valid": true
}
},
"tenure_id": "3",
"tenure_in_month": "3",
"monthly_installment": 200590,
"bank_interest_rate": 140000,
"interest_pay_to_bank": 13770,
"total_offerred_discount_cashback_amount": 20000,
"loan_amount": 588000,
"auth_amount": 980000,
"deferred_amount": "392000",
"deferred_percentage": "400000"
}
}

Request:

Body Params:

Parameter NameTypeDescription
merchant_dataobjectIt contains information about merchant.
payment_dataobjectIt contains information about payment data.
card_dataObjectIt contains information about Card data.
emi_dataObjectIt contains information about emi data

merchant_data:

Parameter NameTypeDescriptionMandatory(M)/Optional
merchant_idintMerchant id provided by pine labs.M
merchant_access_codestringMerchant access code provided by pine labs.M

payment_data:

Parameter NameTypeDescriptionMandatory(M)/Optional
amount_in_paisalongTotal sum of products amount present in cart.M

card_data:

Parameter NameTypeDescription
card_numberStringCard number
card_expiry_yearStringCard expiry year having format YYYY
card_expiry_monthStringCard expiry month having format MM
card_holder_nameStringCard holder name

tokenize_card_data:

Parameter NameTypeDescription
tokenStringCard token received from token requestor
expiration_monthStringCard expiry month having format MM
expiration_yearStringCard expiry year having format YYYY
last4DigitStringLast 4 Digit of Card

emi_data:

Parameter NameTypeDescription
offer_schemeObjectIt contains information about offer applicable on each product.
tenure_idIntTenure Id specified at pine labs end.
tenure_in_monthStringTenure name specified at pine labs end.
monthly_installmentLongEmi amount in paise.
bank_interest_rateLongInterest rate for which bank emi is calculated. Its value is percentage multiplied by 10000.
interest_pay_to_bankLongInterest pay to bank in paise.
total_offerred_discount_cashback_amountLongTotal sum of discount applicable on cart. It is in paise.
loan_amountLongAmount in paise on which loan will be booked.
auth_amountLongBank authorization amount in paise.

offer_scheme:

Parameter NameTypeDescription
product_detailsArray of objectsIt contains information about product.
emi_schemeObjectIt contains information about bank EMI scheme.

product_details:

Parameter NameTypeDescription
product_codeStringProduct code.
product_amountLongProduct amount in paise.
subvention_cashback_discountLongSubvention discount cashback amount in paise. Only applicable when subvention is present.
product_discountLongProduct discount amount in paise. Only applicable if product discount is present.
subvention_cashback_discount_percentageLongSubvention discount cashback percentage. Its value is percentage multiplied by 10000.
product_discount_percentageLongProduct discount cashback percentage. Its value is percentage multiplied by 10000.
subvention_typeIntIt tells offer type. 1-No cost EMI 2-Low cost EMI 3-Standard EMI.
additional_cashbackStringAdditional cashback text.
bank_interest_rateLongAmount in paise.
bank_interest_rate_percentageLongPercentage multiplied by 10000.
schemesArray of objectsIt contains list of program applicable on product.

emi_scheme:

Parameter NameTypeDescription
scheme_idLongIt tells scheme id applicable on product.
program_typeIntIt tells scheme of which type. 105-Bank EMI 106-Brand EMI 108-Product Discount 112-Subvention discount.
is_scheme_validBoolIs scheme is valid.

schemes:

Parameter NameTypeDescription
scheme_idLongIt tells scheme id applicable on product.
program_typeIntIt tells scheme of which type. 105-Bank EMI 106-Brand EMI 108-Product Discount 112-Subvention discount.
is_scheme_validBoolIs scheme is valid.

Sample Request for All Credit cards:

{
"merchant_data": {
"merchant_id": 3473,
"merchant_access_code": "57e39383-b053-4db9-a708-26d8971886e7"
},
"payment_data": {
"amount_in_paisa": 1100000
},
"card_data": {
"card_number": "4012001037141112"
},
"emi_data": {
"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
}
}

Response:

params:

Parameter NameTypeDescription
response_codeintIt notifies the result of api processing. Value 1 denotes success.
response_messagestringIt denotes the message corresponding to above code

Sample Response:

Success response

{
"response_code": 1,
"response_message": "SUCCESS"
}

Failure response

{
"response_code": -289,
"response_message": "SCHEME VALIDATION FAILED"
}