Fetch Offers API

The fetch_offers API fetches all active (with the Live status on Dashboard) offers for this Merchant ID.

📘

Note:

If the amount are received in the request, the discount calculation for each offer is also sent as part of the response. If the amount is not received, the response does not contain the discount calculation fields.

Endpoints

Request Headers

The request header contains the following fields:

FieldDescriptionExample
Date
mandatory
The date and time should be in the GMT time conversion(not the IST). For example, current time in India is 18:00:00 IST, the time in the date header should be 12:30:00 GMT.Thu, 17 Feb 2022 08:17:59 GMT
Digest
mandatory
Base 64 encode of (sha256 hash of the JSON data (post to server).vpGay5D/dmfoDupALPplYGucJAln9gS29g5Orn+8TC0=
Authorization
mandatory
This field is in the following format:
hmac username="smsplus", algorithm="hmac-sha256", headers="date digest", signature="CkGfgbho69uTMMOGU0mHWf+1CUAlIp3AjvsON9n9/E4="
Where the above format includes the following:
- username: The merchant key of the merchant.
- algorithm: This must have the value as hmac-sha256 that is used for this API
- headers: This must have the value as date digest
- signature: This must contain the hmacsha256 of (signing_string, merchant_secret), where:
- signing_string: This is in the "Date"+"\n"+"Digest" format. Here, the Date and Digest is the same values in the fields listed in this table For example, "Thu, 17 Feb 2022 08:17:59 GMT""\n"+“vpGay5D/dmfoDupALPplYGucJAln9gS29g5Orn+8TC0=“
- merchant_secret: The merchant Salt of the merchant. For more information on getting the merchant Salt, refer to Generate Merchant Key and Salt on PayU Dashboard
 hmac username="smsplus", algorithm="hmac-sha256", headers="date digest", signature="zGmP5Zeqm1pxNa+d68DWfQFXhxoqf3st353SkYvX8HI="
platformId
mandatory
This field contains the platform ID and include the value as 1.1

The following sample Java code contains the logic used to encrypt as described in the above table:

import com.google.gson.Gson;
import com.google.gson.JsonObject;
import org.apache.commons.codec.binary.Base64;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class HmacAuth {

    public static String getSha256(String input) {
        try {
            MessageDigest md = MessageDigest.getInstance("SHA-256");
            byte[] digest = md.digest(input.getBytes());
            return Base64.encodeBase64String(digest);
        } catch (NoSuchAlgorithmException ignored) {}
        return null;
    }

    public static JsonObject getRequestBody(){
        JsonObject requestJson = new JsonObject();
        requestJson.addProperty("firstname","John");
        requestJson.addProperty("lastname","Doe");
        return requestJson;
    }

    public static void main(String[] args) throws NoSuchAlgorithmException, InvalidKeyException {
        String key = "smsplus";
        String secret = "admin";
        Gson gson = new Gson();
        String date = DateTimeFormat.forPattern("EEE, dd MMM yyyy HH:mm:ss 'GMT'").withZoneUTC().print(new DateTime());
        System.out.println(date);
        JsonObject requestJson = getRequestBody();
        String digest = getSha256(gson.toJson(requestJson));
        System.out.println(digest);
        String signingString = new StringBuilder()
            .append("date: " + date)
            .append("\ndigest: " + digest).toString();
        Mac sha256_HMAC = Mac.getInstance("HmacSHA256");
        SecretKeySpec secret_key = new SecretKeySpec(secret.getBytes(), "HmacSHA256");
        sha256_HMAC.init(secret_key);
        String signature = Base64.encodeBase64String(sha256_HMAC.doFinal(signingString.getBytes()));
        String authorization = new StringBuilder()
            .append("hmac username=\"")
            .append(key)
            .append("\", algorithm=\"hmac-sha256\", headers=\"date digest\", signature=\"")
            .append(signature)
            .append("\"").toString();
        System.out.println(authorization);
    }
}

Request Parameters

ParameterDescriptionExample
Amount
optional
floatThe offer transaction amount
offerKeys
optional
String ArrayThis field contains list of keys to filter the offer in an array format.SummerSpecialOffer2021@q1Bh0jsogwqP
paymentId
optional
LongUnique reference ID for a transaction which is generated by merchant and sent in the request110
userToken
optional
String LongThis parameter is used to uniquely identify a user for a client/merchant.
skusDetail
optional
String ArrayThe skusDetail is in an array format and contains the SKU offer details. For more information, refer to

📘

Note:

All the parameters are optional, but the header is mandatory.

skusDetail Parameter Description

In addition to the request parameters listed in the Fetch Offers API section, the skusDetail parameter is posted with the following fields are posted in an array:

FieldDescription
skuAmount
optional
String The price of one/ single unit of SKU is specified in this field.
skuId
mandatory
String The product identifier to select offer is specified in this field.
quantity

optional
String The quantity for the product is specified in this field.
offerKeys
optional
StringThe offer keys to filter at SKU-level is specified in this field.
curl --location --request POST 'https://sandbox.payu.in/offers/transactions' \
--header 'Date: {{date}}' \
--header 'Digest: {{digest}}' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": "35000",
    "offerKeys": ["PxaUY1qiIOOT"],
    "paymentId": 64161192,
    "userToken": "vzKCT7:00015502"
    }'

Response Parameters

The response involves the following parameters and the result parameter contains the offer results:

ParameterDescriptionExample
codeThis parameter returns the HTTP status code based on .200
messageString This parameter is the result message which contains information about the resultOffer Validated Successfull
statusThis parameter returns the status of web service call. The status can be any of the following:
- 0 - If web service call failed.
- 1 - If web service call succeeded
1
resultJSON Object This parameter gives the information about the result of the API response in a JSON format. For more information, refer to the result Parameter JSON Details subsection.Refer to the result Field JSON Details subsection.

result Parameter JSON Details

The result parameter contains the result in a JSON format and the fields in the JSON are described in the following table. The offers field in this JSON contains the offer details as described in the following table:

FieldDescriptionExample
clientIdInteger This field contains reference of the merchant.5861
midIntegerThis field contains the unique identifier provided by PayU to each merchant.1
amountFloat This field contains the Offer transaction amount15000
offersJSON Object This field contains the list of offer with details in a JSON format. For more information, refer to the offers Field JSON Details subsection.Refer to the offers Field JSON Details subsection.

The sample value for the result parameter in a JSON format is similar to the following:

 "result": {
        "clientId": 5861,
        "mid": 1,
        "amount": 15000,
        "offers": [
            {
                "offerKey": "SummerSpecialOffer2021@q1Bh0jsogwqP",
                "type": "MERCHANT",
                "title": "festive_500",
                "description": "festive discount",
                "tnc": "abc",
                "tncLink": "abcd",
                "minTxnAmount": 10.00,
                "maxTxnAmount": 25000.00,
                "offerType": "INSTANT",
                "validFrom": "2021-07-01 17:02:11",
                "validTo": "2022-08-05 15:53:16",
                "discountDetail": {
                    "discountType": "PERCENTAGE",
                    "discountPercentage": 10.00,
                    "discount": 100.00,
                    "discountedAmount": 14900,
                    "maxDiscount": 100.00
                },
                "isNoCostEmi": false,
                "creditCard": [
                    {
                        "networks": [
                            {
                                "code": "MAST",
                                "title": "Master Network"
                            },
                            {
                                "code": "VISA",
                                "title": "VIsa Network"
                            }
                        ],
                        "banks": [
                            {
                                "code": "ICICI",
                                "title": "ICICI debit card"
                            },
                            {
                                "code": "HDFC",
                                "title": "HDFC debit card"
                            }
                        ],
                        "title": null,
                        "paymentCode": null
                    }
                ],
                "debitCard": [
                    {
                        "networks": [
                            {
                                "code": "MAST",
                                "title": "Master Network"
                            }
                        ],
                        "banks": [
                            {
                                "code": "HDFC",
                                "title": "HDFC debit card"
                            }
                        ],
                        "title": null,
                        "paymentCode": null
                    }
                ],
                "netBanking": [
                    {
                        "title": "axis bank",
                        "paymentCode": "AXIB1"
                    },
                    {
                        "title": "Bank of India",
                        "paymentCode": "BOIB"
                    },
                    {
                        "title": "Canara Bank",
                        "paymentCode": "CABB"
                    }
                ],
                "wallet": [
                    {
                        "title": "freecharge",
                        "paymentCode": "FREC"
                    }
                ],
                "upi": [
                    {
                        "title": "upi",
                        "paymentCode": "UPI"
                    }
                ],
                "emi": {
                    "debitCard": {
                        "banks": [
                            {
                                "bankCode": "CITI",
                                "tenureOption": [
                                    {
                                        "title": "CITI Bank 3EMI",
                                        "paymentCode": "EMI03",
                                        "discountDetail": null
                                    },
                                    {
                                        "title": "CITI Bank 6 EMI",
                                        "paymentCode": "EMI06",
                                        "discountDetail": null
                                    }
                                ]
                            },
                            {
                                "bankCode": "AXIS",
                                "tenureOption": [
                                    {
                                        "title": "AXIS Bank 3 EMI",
                                        "paymentCode": "EMI3",
                                        "discountDetail": null
                                    }
                                ]
                            }
                        ]
                    },
                    "creditCard": {
                        "banks": [
                            {
                                "bankCode": "CITI",
                                "tenureOption": [
                                    {
                                        "title": "CITI Bank  9 EMI",
                                        "paymentCode": "EMI09",
                                        "discountDetail": null
                                    }
                                ]
                            },
                            {
                                "bankCode": "AXIS",
                                "tenureOption": [
                                    {
                                        "title": "AXIS Bank 12 EMI",
                                        "paymentCode": "EMI12",
                                        "discountDetail": null
                                    }
                                ]
                            }
                        ]
                    }
 }
            },
            {
                "offerKey": "SummerSpecialOffer2021@oi7gMfLOobVZ",
                "type": "MERCHANT",
                "title": "Summer Special Offer 2021",
                "description": "20% Instant discount",
                "tnc": "Discount will be applied instantly after applying coupon code",
                "tncLink": "www.icicibank/offer/t&c",
                "minTxnAmount": 500.00,
                "maxTxnAmount": 100000.00,
                "offerType": "CASHBACK",
                "validFrom": "2020-12-31 15:53:16",
                "validTo": "2022-02-28 15:53:16",
                "discountDetail": null,
                "isNoCostEmi": true,
                "creditCard": null,
                "debitCard": null,
                "netBanking": null,
                "wallet": null,
                "upi": null,
                "emi": {
                    "debitCard": {
                        "banks": [
                            {
                                "bankCode": "CITI",
                                "tenureOption": [
                                    {
                                        "title": "CITI Bank 6 EMI",
                                        "paymentCode": "EMI06",
                                        "discountDetail": {
                                            "discountPercentage": 16.0,
                                            "discount": 835.12,
                                            "discountedAmount": 15000
                                        }
                                    },
                                    {
                                        "title": "CITI Bank 3EMI",
                                        "paymentCode": "EMI03",
                                        "discountDetail": {
                                            "discountPercentage": 15.0,
                                            "discount": 444.33,
                                            "discountedAmount": 15000
                                        }
                                    }
                                ]
                            }
                        ]
                    },
                    "creditCard": {
                        "banks": [
                            {
                                "bankCode": "AXIS",
                                "tenureOption": [
                                    {
                                        "title": "AXIS Bank 12 EMI",
                                        "paymentCode": "EMI12",
                                        "discountDetail": {
                                            "discountPercentage": 14.5,
                                            "discount": 1420.79,
                                            "discountedAmount": 15000
                                        }
                                    }
                                ]
                            }
                        ]
                    }
                }
            }
        ]
    }

offers Field JSON Details

The offers field in the result JSON contains the offer details and details for each payment mode in a JSON format as described in the following table:

FieldDescriptionExample
offerKeyString This field contains the unique identifier for a particular offer.SummerSpecialOffer2021@q1Bh0jsogwqP
typeString This field contains the offer owner.MERCHANT
titleString This field contains the title of the offer that will be displayed for customers.festive_500
descriptionString This field contains the description of offer for the merchant's reference.festive discount
tncString This field contains the Terms & Conditions for applying promo that will be displayed to customers while accessing the link provided in the tncLink field.abc
tncLinkString This field contains URL to fetch details on Terms & Conditions and details specified in the tnc is displayed.abcd
minTxnAmountFloat The field contains the minimum transaction amount offer will be applicable.10.00
maxTxnAmountFloat The field contains the maximum transaction amount offer will be applicable25000.00
offerTypeString The field contains any of the following type of offer:
- INSTANT

- CASHBACK
INSTANT
validFromString The field contains the offer start time.2021-07-01 17:02:11
validToString The field contains the offer end time.2022-08-05 15:53:16
discountDetailJSON Object This field contains the discount detail of the offer in a JSON format. This field contain the following fields in a JSON format:
- discountType: This field contains any of the following discount type that was defined:
- ABSOLUTE

- PERCENTAGE
- discountPercentage: This field contains the define the discount percentage.
- discount: This field contains the total discount available on the transaction once applied the specific offer.
- discountedAmount: This field contains the final Net amount of the transaction after applying the specific offer.
- maxDiscount: The field contains the max discount available on an offer.
 
isNoCostEmiBooleanThis field contains any of the following values to specify whether th_e offer is no cost EMI offer or normal offer.true
creditCardJSON Object The field contains the offer configuration details for credit card with the fields in a JSON format:
- networks: The list of card networks for which the offer is supported similar to the example.
- banks: The list of banks with codes supported are listed similar to the example.
- title: This parameter contains the payment title that is used to identify the particular payment option.
- paymentCode: the payment code that is used to identify the particular payment option.
- discountDetail: The discount detail an array format as in the example.
networks:
{
"code": "MAST",
"title": "Master Network"
},
{
"code": "VISA",
"title": "VIsa Network"
}
banks:
{
"code": "ICICI",
"title": "ICICI credit card"
},
{
"code": "HDFC",
"title": "HDFC credit card"
}
debitCardJSON ObjectThe field contains the offer configuration details for debit card in a JSON format with the following fields:
- networks: The list of card networks for which the offer is supported similar to the example.
- banks: The list of banks with codes supported are listed similar to the example.
- title: This parameter contains the payment title that is used to identify the particular payment option.
- paymentCode: the payment code that is used to identify the particular payment option.
networks:
{
"code": "MAST",
"title": "Master Network"
},
{
"code": "VISA",
"title": "Visa Network"
}

banks:
{
"code": "ICICI",
"title": "ICICI debit card"
},
{
"code": "HDFC",
"title": "HDFC debit card"
}
netBankingJSON Object The field contains the offer configuration details for NetBanking in JSON format similar to the example.{
"title": "axis bank",
"paymentCode": "AXIB1"
},
{
"title": "Bank of India",
"paymentCode": "BOIB"
},
{
"title": "Canara Bank",
"paymentCode": "CABB"
}
} 
walletJSON ObjectThe field contains the offer configuration details for Wallet in a JSON format similar to the example.{
"title": "freecharge",
"paymentCode": "FREC"
} 
upiJSON ObjectThe field contains the offer configuration details for UPI in JSON format similar to the example. {
"title": "upi",
"paymentCode": "UPI"
}
emiJSON Object The field contains the offer configuration details for EMI in a JSON format with the following fields:
- debitCard: Contains the list of banks and tenure option similar to the example.
- creditCard: Contains the list of banks and tenure option similar to the example.
DebitCard:
{
"banks": [
{
"bankCode": "CITI",
"tenureOption": [
{
"title": "CITI Bank 3EMI",
"paymentCode": "EMI03",
"discountDetail": null
},
{
"title": "CITI Bank 6 EMI",
"paymentCode": "EMI06",
"discountDetail": null
}
]
},
{
"bankCode": "AXIS",
"tenureOption": [
{
"title": "AXIS Bank 3 EMI",
"paymentCode": "EMI3",
"discountDetail": null
}
]
}
]
}

creditCard:
{
"banks": [
{
"bankCode": "CITI",
"tenureOption": [
{
"title": "CITI Bank 9 EMI",
"paymentCode": "EMI09",
"discountDetail": null
}
]
},
{
"bankCode": "AXIS",
"tenureOption": [
{
"title": "AXIS Bank 12 EMI",
"paymentCode": "EMI12",
"discountDetail": null
}
]
}
]
}
}

The sample value for offers field in a JSON is similar to the following:

"offers": [
            {
                "offerKey": "SummerSpecialOffer2021@q1Bh0jsogwqP",
                "type": "MERCHANT",
                "title": "festive_500",
                "description": "festive discount",
                "tnc": "abc",
                "tncLink": "abcd",
                "minTxnAmount": 10.00,
                "maxTxnAmount": 25000.00,
                "offerType": "INSTANT",
                "validFrom": "2021-07-01 17:02:11",
                "validTo": "2022-08-05 15:53:16",
                "discountDetail": {
                    "discountType": "PERCENTAGE",
                    "discountPercentage": 10.00,
                    "discount": 100.00,
                    "discountedAmount": 14900,
                    "maxDiscount": 100.00
                },
                "isNoCostEmi": false,
                "creditCard": [
                    {
                        "networks": [
                            {
                                "code": "MAST",
                                "title": "Master Network"
                            },
                            {
                                "code": "VISA",
                                "title": "VIsa Network"
                            }
                        ],
                        "banks": [
                            {
                                "code": "ICICI",
                                "title": "ICICI debit card"
                            },
                            {
                                "code": "HDFC",
                                "title": "HDFC debit card"
                            }
                        ],
                        "title": null,
                        "paymentCode": null
                    }
                ],
                "debitCard": [
                    {
                        "networks": [
                            {
                                "code": "MAST",
                                "title": "Master Network"
                            }
                        ],
                        "banks": [
                            {
                                "code": "HDFC",
                                "title": "HDFC debit card"
                            }
                        ],
                        "title": null,
                        "paymentCode": null
                    }
                ],
                "netBanking": [
                    {
                        "title": "axis bank",
                        "paymentCode": "AXIB1"
                    },
                    {
                        "title": "Bank of India",
                        "paymentCode": "BOIB"
                    },
                    {
                        "title": "Canara Bank",
                        "paymentCode": "CABB"
                    }
                ],
                "wallet": [
                    {
                        "title": "freecharge",
                        "paymentCode": "FREC"
                    }
                ],
                "upi": [
                    {
                        "title": "upi",
                        "paymentCode": "UPI"
                    }
                ],
                "emi": {
                    "debitCard": {
                        "banks": [
                            {
                                "bankCode": "CITI",
                                "tenureOption": [
                                    {
                                        "title": "CITI Bank 3EMI",
                                        "paymentCode": "EMI03",
                                        "discountDetail": null
                                    },
                                    {
                                        "title": "CITI Bank 6 EMI",
                                        "paymentCode": "EMI06",
                                        "discountDetail": null
                                    }
                                ]
                            },
                            {
                                "bankCode": "AXIS",
                                "tenureOption": [
                                    {
                                        "title": "AXIS Bank 3 EMI",
                                        "paymentCode": "EMI3",
                                        "discountDetail": null
                                    }
                                ]
                            }
                        ]
                    },
                    "creditCard": {
                        "banks": [
                            {
                                "bankCode": "CITI",
                                "tenureOption": [
                                    {
                                        "title": "CITI Bank  9 EMI",
                                        "paymentCode": "EMI09",
                                        "discountDetail": null
                                    }
                                ]
                            },
                            {
                                "bankCode": "AXIS",
                                "tenureOption": [
                                    {
                                        "title": "AXIS Bank 12 EMI",
                                        "paymentCode": "EMI12",
                                        "discountDetail": null
                                    }
                                ]
                            }
                        ]
                    }
                }
            },
            {
                "offerKey": "SummerSpecialOffer2021@oi7gMfLOobVZ",
                "type": "MERCHANT",
                "title": "Summer Special Offer 2021",
                "description": "20% Instant discount",
                "tnc": "Discount will be applied instantly after applying coupon code",
                "tncLink": "www.icicibank/offer/t&c",
                "minTxnAmount": 500.00,
                "maxTxnAmount": 100000.00,
                "offerType": "CASHBACK",
                "validFrom": "2020-12-31 15:53:16",
                "validTo": "2022-02-28 15:53:16",
                "discountDetail": null,
                "isNoCostEmi": true,
                "creditCard": null,
                "debitCard": null,
                "netBanking": null,
                "wallet": null,
                "upi": null,
                "emi": {
                    "debitCard": {
                        "banks": [
                            {
                                "bankCode": "CITI",
                                "tenureOption": [
                                    {
                                        "title": "CITI Bank 6 EMI",
                                        "paymentCode": "EMI06",
                                        "discountDetail": {
                                            "discountPercentage": 16.0,
                                            "discount": 835.12,
                                            "discountedAmount": 15000
                                        }
                                    },
                                    {
                                        "title": "CITI Bank 3EMI",
                                        "paymentCode": "EMI03",
                                        "discountDetail": {
                                            "discountPercentage": 15.0,
                                            "discount": 444.33,
                                            "discountedAmount": 15000
                                        }
                                    }
                                ]
                            }
                        ]
                    },
                    "creditCard": {
                        "banks": [
                            {
                                "bankCode": "AXIS",
                                "tenureOption": [
                                    {
                                        "title": "AXIS Bank 12 EMI",
                                        "paymentCode": "EMI12",
                                        "discountDetail": {
                                            "discountPercentage": 14.5,
                                            "discount": 1420.79,
                                            "discountedAmount": 15000
                                        }
                                    }
                                ]
                            }
                        ]
                    }
                }
            }
        ]

Sample response

Successful scenario

  • Sample response without an SKU-based offer
{
    "code": "200",
    "message": "Offer Retrieved Successfully",
    "status": 1,
    "result": {
        "clientId": 10,
        "mid": 5017634,
        "amount": 35000,
        "offers": [
            {
                "offerKey": "PxaUY1qiIOOT",
                "type": "MERCHANT",
                "title": "Cashback on CC",
                "description": "Get 1% Instant Discount",
                "tnc": "Minimum Order value 100",
                "tncLink": null,
                "minTxnAmount": 30000.00,
                "maxTxnAmount": 1000000.00,
                "offerType": "INSTANT",
                "validFrom": "2022-09-14 00:00:00",
                "validTo": "2022-09-28 23:59:00",
                "discountDetail": {
                    "discountType": "ABSOLUTE",
                    "discountPercentage": null,
                    "discount": 3000.00,
                    "discountedAmount": 32000.00,
                    "maxDiscount": 3000.00
                },
                "isNoCostEmi": false,
                "isSubvented": false,
                "isSkuOffer": false,
                "creditCard": [
                    {
                        "networks": [
                            {
                                "code": "AMEX",
                                "title": "American Express"
                            },
                            {
                                "code": "AMEX",
                                "title": "American Express"
                            },
                            {
                                "code": "MAST",
                                "title": "Master Card Network"
                            },
                            {
                                "code": "RUPAYCC",
                                "title": "RUPAY CC Network"
                            },
                            {
                                "code": "DINR",
                                "title": "Diner Network"
                            },
                            {
                                "code": "VISA",
                                "title": "Visa Network"
                            }
                        ],
                        "banks": [
                            {
                                "code": "INDB",
                                "title": "Indian Bank"
                            },
                            {
                                "code": "KARUR",
                                "title": "Karur Vysya Bank"
                            },
                            {
                                "code": "SBI",
                                "title": "State Bank Of India"
                            },
                            {
                                "code": "OBC",
                                "title": "Oriental Bank Of Commerce"
                            },
                            {
                                "code": "CAPONE",
                                "title": "Capital One Bank Usa Nation"
                            },
                            {
                                "code": "BARC",
                                "title": "Barclays Bank Plc"
                            },
                            {
                                "code": "CANA",
                                "title": "Canara Bank"
                            },
                            {
                                "code": "BOA",
                                "title": "Bank Of America National Asso"
                            },
                            {
                                "code": "SYND",
                                "title": "Syndicate Bank"
                            },
                            {
                                "code": "UCO",
                                "title": "Uco Bank"
                            },
                            {
                                "code": "UNB",
                                "title": "United Bank of India"
                            },
                            {
                                "code": "STCB",
                                "title": "State Bank Of Mauritius Ltd"
                            },
                            {
                                "code": "LLOYDS",
                                "title": "Lloyds Bank Plc"
                            },
                            {
                                "code": "KOTAK",
                                "title": "Kotak Mahindra Bank Ltd"
                            },
                            {
                                "code": "SIB",
                                "title": "South Indian Bank Ltd"
                            },
                            {
                                "code": "DBL",
                                "title": "Dhanlaxmi Bank Ltd"
                            },
                            {
                                "code": "IDFC",
                                "title": "Idfc Bank Ltd"
                            },
                            {
                                "code": "BOB",
                                "title": "Bank Of Baroda"
                            },
                            {
                                "code": "CBI",
                                "title": "Central Bank Of India"
                            },
                            {
                                "code": "HDFC",
                                "title": "Hdfc Bank"
                            },
                            {
                                "code": "GPPJSB",
                                "title": "Gopinath Patil Parsik Janata Sahakari Bank Ltd"
                            },
                            {
                                "code": "IDBI",
                                "title": "Idbi Bank Ltd"
                            },
                            {
                                "code": "ANDHRA",
                                "title": "Andhra Bank"
                            },
                            {
                                "code": "IOB",
                                "title": "Indian Overseas Bank"
                            },
                            {
                                "code": "VIJY",
                                "title": "Vijaya Bank"
                            },
                            {
                                "code": "ICICI",
                                "title": "Icici Bank"
                            },
                            {
                                "code": "DBS",
                                "title": "Dbs Bank Ltd"
                            },
                            {
                                "code": "DEUT",
                                "title": "Deutsche Bank Ag"
                            },
                            {
                                "code": "SCB",
                                "title": "Standard Chartered Bank"
                            },
                            {
                                "code": "PUCB",
                                "title": "Pochampally Coop Urban Bank Ltd"
                            },
                            {
                                "code": "DENA",
                                "title": "Dena Bank"
                            },
                            {
                                "code": "BOM",
                                "title": "Bank Of Maharashtra"
                            },
                            {
                                "code": "AIRP",
                                "title": "Airtel Payments bank"
                            },
                            {
                                "code": "PYTM",
                                "title": "Paytm Payments Bank Ltd"
                            },
                            {
                                "code": "ALLBD",
                                "title": "Allahabad Bank"
                            },
                            {
                                "code": "AUBL",
                                "title": "Au Small Finance Bank"
                            },
                            {
                                "code": "TNB",
                                "title": "Tamilnad Mercantile Bank Ltd"
                            },
                            {
                                "code": "JKB",
                                "title": "Jammu Kashmir Bank Ltd"
                            },
                            {
                                "code": "UBI",
                                "title": "United Bank Of India"
                            },
                            {
                                "code": "DCB",
                                "title": "Dcb Bank Ltd"
                            },
                            {
                                "code": "CORP",
                                "title": "Corporation Bank"
                            },
                            {
                                "code": "FEDE",
                                "title": "Federal Bank"
                            },
                            {
                                "code": "RBL",
                                "title": "Rbl Bank Ltd"
                            },
                            {
                                "code": "PASB",
                                "title": "Punjab And Sind Bank"
                            },
                            {
                                "code": "CUB",
                                "title": "City Union Bank"
                            },
                            {
                                "code": "HSBC",
                                "title": "Hsbc Bank Australia Ltd"
                            },
                            {
                                "code": "CITI",
                                "title": "Citibank National Association"
                            },
                            {
                                "code": "TCSB",
                                "title": "Catholic Syrian Bank"
                            },
                            {
                                "code": "BOI",
                                "title": "Bank Of India"
                            },
                            {
                                "code": "RBS",
                                "title": "Royal Bank Of Scotland Plc"
                            },
                            {
                                "code": "INDUSIND",
                                "title": "Indusind Bank Ltd"
                            },
                            {
                                "code": "PNB",
                                "title": "Punjab National Bank"
                            },
                            {
                                "code": "HKS",
                                "title": "THE HONGKONG AND SHANGHAI BANKING CORPORATION LIMI"
                            },
                            {
                                "code": "AXIS",
                                "title": "Axis Bank"
                            },
                            {
                                "code": "YES",
                                "title": "Yes Bank Ltd"
                            }
                        ],
                        "title": null,
                        "paymentCode": null
                    }
                ],
                "debitCard": null,
                "netBanking": null,
                "wallet": null,
                "upi": null,
                "emi": null,
                "bnpl": null,
                "skuDetail": null,
                "isAcrossSkuQuantity": false,
                "offerCategory": null
            }
        ],
        "skusDetail": null
    }
}
  • Sample Response with an SKU-based offer
{
  "code": "200",
  "message": "Offer Retrieved Successfully",
  "status": 1,
  "result": {
    "clientId": 5861,
    "mid": 1,
    "amount": 1000,
    "offers": [
      {
        "offerKey": "AxisBankOffer2022@Qpzkc7zWouLm",
        "type": "MERCHANT",
        "title": "Axis bank  Offer 2022",
        "description": "10% Instant discount",
        "tnc": "Discount will be applied instantly after applying coupon code",
        "tncLink": "www.icicibank/offer/t&c",
        "minTxnAmount": 500,
        "maxTxnAmount": 2000,
        "offerType": "INSTANT",
        "validFrom": "2022-02-07 15:53:16",
        "validTo": "2022-12-13 15:53:16",
        "discountDetail": {
          "discountType": "ABSOLUTE",
          "discountPercentage": 20,
          "discount": 100,
          "discountedAmount": 900,
          "maxDiscount": 100
        },
        "isNoCostEmi": false,
        "isSubvented": true,
        "isSkuOffer": false,
        "creditCard": [
          {
            "networks": [
              {
                "code": "MAST",
                "title": "Master Card Network"
              },
              {
                "code": "VISA",
                "title": "Visa Network"
              }
            ],
            "banks": [
              {
                "code": "ICICI",
                "title": "Icici Bank"
              },
              {
                "code": "HDFC",
                "title": "Hdfc Bank"
              }
            ],
            "title": null,
            "paymentCode": null
          }
        ],
        "debitCard": [
          {
            "networks": [
              {
                "code": "VISA",
                "title": "Visa Network"
              },
              {
                "code": "MAST",
                "title": "Master Card Network"
              }
            ],
            "banks": [
              {
                "code": null,
                "title": null
              },
              {
                "code": "HDFC",
                "title": "Hdfc Bank"
              }
            ],
            "title": null,
            "paymentCode": null
          }
        ],
        "netBanking": [
          {
            "title": "Bank of India",
            "paymentCode": "BOIB"
          },
          {
            "title": "Canara Bank",
            "paymentCode": "CABB"
          },
          {
            "title": "AXIS Bank",
            "paymentCode": "AXIB"
          }
        ],
        "wallet": [
          {
            "title": "Freecharge PayLater | UPI | Wallet",
            "paymentCode": "FREC"
          },
          {
            "title": "Jio Money",
            "paymentCode": "JIOM"
          }
        ],
        "upi": [
          {
            "title": "upi",
            "paymentCode": "UPI"
          }
        ],
        "emi": {
          "debitCard": {
            "banks": [
              {
                "bankCode": "UTIB",
                "tenureOption": [
                  {
                    "title": "Axis Bank 3 Months",
                    "paymentCode": "AXISD03",
                    "discountDetail": null
                  },
                  {
                    "title": "Axis Bank 6 Months",
                    "paymentCode": "AXISD06",
                    "discountDetail": null
                  },
                  {
                    "title": "Axis Bank 18 Months",
                    "paymentCode": "AXISD18",
                    "discountDetail": null
                  },
                  {
                    "title": "Axis Bank 24 Months",
                    "paymentCode": "AXISD24",
                    "discountDetail": null
                  },
                  {
                    "title": "Axis Bank 12 Months",
                    "paymentCode": "AXISD12",
                    "discountDetail": null
                  },
                  {
                    "title": "Axis Bank 9 Months",
                    "paymentCode": "AXISD09",
                    "discountDetail": null
                  }
                ]
              }
            ]
          },
          "creditCard": {
            "banks": [
              {
                "bankCode": "CITI",
                "tenureOption": [
                  {
                    "title": "Citibank 3 Months",
                    "paymentCode": "EMI03",
                    "discountDetail": null
                  },
                  {
                    "title": "Citibank 6 Months",
                    "paymentCode": "EMI06",
                    "discountDetail": null
                  }
                ]
              },
              {
                "bankCode": "HDFC",
                "tenureOption": [
                  {
                    "title": "HDFC Bank 12 Months",
                    "paymentCode": "EMI12",
                    "discountDetail": null
                  }
                ]
              }
            ]
          }
        },
        "skuDetail": null,
        "isAcrossSkuQuantity": false
      },
      {
        "offerKey": "SummerSpecialOffer2021@oi7gMfLOobVZ",
        "type": "MERCHANT",
        "title": "Summer Special Offer 2021",
        "description": "20% Instant discount",
        "tnc": "Discount will be applied instantly after applying coupon code",
        "tncLink": "www.icicibank/offer/t&c",
        "minTxnAmount": 500,
        "maxTxnAmount": 100000,
        "offerType": "INSTANT",
        "validFrom": "2020-12-31 15:53:16",
        "validTo": "2022-12-28 15:53:16",
        "discountDetail": null,
        "isNoCostEmi": true,
        "isSubvented": false,
        "isSkuOffer": false,
        "creditCard": null,
        "debitCard": null,
        "netBanking": null,
        "wallet": null,
        "upi": null,
        "emi": {
          "debitCard": null,
          "creditCard": {
            "banks": [
              {
                "bankCode": "CITI",
                "tenureOption": [
                  {
                    "title": "Citibank 6 Months",
                    "paymentCode": "EMI06",
                    "discountDetail": {
                      "discountPercentage": 15,
                      "discount": 49.57,
                      "discountedAmount": 950.43
                    }
                  },
                  {
                    "title": "Citibank 3 Months",
                    "paymentCode": "EMI03",
                    "discountDetail": {
                      "discountPercentage": 16,
                      "discount": 30.64,
                      "discountedAmount": 969.36
                    }
                  },
                  {
                    "title": "Citibank 9 Months",
                    "paymentCode": "EMI09",
                    "discountDetail": {
                      "discountPercentage": 15,
                      "discount": 69.74,
                      "discountedAmount": 930.26
                    }
                  }
                ]
              },
              {
                "bankCode": "HDFC",
                "tenureOption": [
                  {
                    "title": "HDFC Bank 12 Months",
                    "paymentCode": "EMI12",
                    "discountDetail": {
                      "discountPercentage": 15,
                      "discount": 89.3,
                      "discountedAmount": 910.7
                    }
                  }
                ]
              }
            ]
          }
        },
        "skuDetail": null,
        "isAcrossSkuQuantity": false
      }
    ],
    "skusDetail": {
      "skus": [
        {
          "skuId": "123",
          "quantity": 3,
          "skuAmount": 600,
          "offers": [
            {
              "offerKey": "SummerSpecialOffer2021@q1Bh0jsogwqP",
              "type": "MERCHANT",
              "title": "festive_500",
              "description": "festive discount",
              "tnc": "abc",
              "tncLink": "abcd",
              "minTxnAmount": 198,
              "maxTxnAmount": 2000,
              "offerType": "INSTANT",
              "validFrom": "2022-02-28 12:56:11",
              "validTo": "2022-12-28 12:57:16",
              "discountDetail": {
                "discountType": "PERCENTAGE",
                "discountPercentage": 10,
                "discount": 180,
                "discountedAmount": 1620,
                "maxDiscount": 100
              },
              "isNoCostEmi": false,
              "isSubvented": true,
              "isSkuOffer": true,
              "creditCard": [
                {
                  "networks": [
                    {
                      "code": "MAST",
                      "title": "Master Card Network"
                    },
                    {
                      "code": "VISA",
                      "title": "Visa Network"
                    }
                  ],
                  "banks": [
                    {
                      "code": "HDFC",
                      "title": "Hdfc Bank"
                    },
                    {
                      "code": "ICICI",
                      "title": "Icici Bank"
                    }
                  ],
                  "title": null,
                  "paymentCode": null
                }
              ],
              "debitCard": [
                {
                  "networks": [
                    {
                      "code": "MAST",
                      "title": "Master Card Network"
                    },
                    {
                      "code": "VISA",
                      "title": "Visa Network"
                    }
                  ],
                  "banks": [
                    {
                      "code": "HDFC",
                      "title": "Hdfc Bank"
                    }
                  ],
                  "title": null,
                  "paymentCode": null
                }
              ],
              "netBanking": [
                {
                  "title": "AXIS Bank",
                  "paymentCode": "AXIB"
                },
                {
                  "title": "Canara Bank",
                  "paymentCode": "CABB"
                },
                {
                  "title": "Bank of India",
                  "paymentCode": "BOIB"
                }
              ],
              "wallet": [
                {
                  "title": "Freecharge PayLater | UPI | Wallet",
                  "paymentCode": "FREC"
                },
                {
                  "title": "Jio Money",
                  "paymentCode": "JIOM"
                }
              ],
              "upi": [
                {
                  "title": "upi",
                  "paymentCode": "UPI"
                }
              ],
              "emi": {
                "debitCard": null,
                "creditCard": {
                  "banks": [
                    {
                      "bankCode": "CITI",
                      "tenureOption": [
                        {
                          "title": "Citibank 9 Months",
                          "paymentCode": "EMI09",
                          "discountDetail": null
                        },
                        {
                          "title": "Citibank 6 Months",
                          "paymentCode": "EMI06",
                          "discountDetail": null
                        }
                      ]
                    },
                    {
                      "bankCode": "HDFC",
                      "tenureOption": [
                        {
                          "title": "HDFC Bank 12 Months",
                          "paymentCode": "EMI12",
                          "discountDetail": null
                        }
                      ]
                    }
                  ]
                }
              },
              "skuDetail": {
                "skuId": "123",
                "skuName": "Samsung S20",
                "minQuantity": 3,
                "maxQuantity": 10
              },
              "isAcrossSkuQuantity": false
            },
            {
              "offerKey": "SamsungBrandOffer2022@Qpzkc7zWouLm",
              "type": "BANK",
              "title": "Samsung Brand  Offer 2022",
              "description": "10% Instant discount",
              "tnc": "Discount will be applied instantly after applying coupon code",
              "tncLink": "www.icicibank/offer/t&c",
              "minTxnAmount": 500,
              "maxTxnAmount": 2000,
              "offerType": "INSTANT",
              "validFrom": "2022-02-07 15:53:16",
              "validTo": "2022-12-13 15:53:16",
              "discountDetail": {
                "discountType": "ABSOLUTE",
                "discountPercentage": 20,
                "discount": 100,
                "discountedAmount": 1700,
                "maxDiscount": 100
              },
              "isNoCostEmi": false,
              "isSubvented": true,
              "isSkuOffer": true,
              "creditCard": [
                {
                  "networks": [
                    {
                      "code": "MAST",
                      "title": "Master Card Network"
                    },
                    {
                      "code": "VISA",
                      "title": "Visa Network"
                    }
                  ],
                  "banks": [
                    {
                      "code": "ICICI",
                      "title": "Icici Bank"
                    },
                    {
                      "code": "HDFC",
                      "title": "Hdfc Bank"
                    }
                  ],
                  "title": null,
                  "paymentCode": null
                }
              ],
              "debitCard": [
                {
                  "networks": [
                    {
                      "code": "VISA",
                      "title": "Visa Network"
                    },
                    {
                      "code": "MAST",
                      "title": "Master Card Network"
                    }
                  ],
                  "banks": [
                    {
                      "code": "HDFC",
                      "title": "Hdfc Bank"
                    },
                    {
                      "code": "HDFC",
                      "title": "Hdfc Bank"
                    }
                  ],
                  "title": null,
                  "paymentCode": null
                }
              ],
              "netBanking": [
                {
                  "title": "Canara Bank",
                  "paymentCode": "CABB"
                },
                {
                  "title": "AXIS Bank",
                  "paymentCode": "AXIB"
                },
                {
                  "title": "Bank of India",
                  "paymentCode": "BOIB"
                }
              ],
              "wallet": [
                {
                  "title": "Jio Money",
                  "paymentCode": "JIOM"
                },
                {
                  "title": "Freecharge PayLater | UPI | Wallet",
                  "paymentCode": "FREC"
                }
              ],
              "upi": [
                {
                  "title": "upi",
                  "paymentCode": "UPI"
                }
              ],
              "emi": {
                "debitCard": {
                  "banks": [
                    {
                      "bankCode": "UTIB",
                      "tenureOption": [
                        {
                          "title": "Axis Bank 18 Months",
                          "paymentCode": "AXISD18",
                          "discountDetail": null
                        },
                        {
                          "title": "Axis Bank 9 Months",
                          "paymentCode": "AXISD09",
                          "discountDetail": null
                        },
                        {
                          "title": "Axis Bank 12 Months",
                          "paymentCode": "AXISD12",
                          "discountDetail": null
                        },
                        {
                          "title": "Axis Bank 24 Months",
                          "paymentCode": "AXISD24",
                          "discountDetail": null
                        },
                        {
                          "title": "Axis Bank 3 Months",
                          "paymentCode": "AXISD03",
                          "discountDetail": null
                        },
                        {
                          "title": "Axis Bank 6 Months",
                          "paymentCode": "AXISD06",
                          "discountDetail": null
                        }
                      ]
                    }
                  ]
                },
                "creditCard": {
                  "banks": [
                    {
                      "bankCode": "CITI",
                      "tenureOption": [
                        {
                          "title": "Citibank 3 Months",
                          "paymentCode": "EMI03",
                          "discountDetail": null
                        },
                        {
                          "title": "Citibank 6 Months",
                          "paymentCode": "EMI06",
                          "discountDetail": null
                        },
                        {
                          "title": "Citibank 3 Months",
                          "paymentCode": "EMI03",
                          "discountDetail": null
                        }
                      ]
                    },
                    {
                      "bankCode": "HDFC",
                      "tenureOption": [
                        {
                          "title": "HDFC Bank 12 Months",
                          "paymentCode": "EMI12",
                          "discountDetail": null
                        }
                      ]
                    }
                  ]
                }
              },
              "skuDetail": {
                "skuId": "123",
                "skuName": "Samsung S20",
                "minQuantity": 3,
                "maxQuantity": 100
              },
              "isAcrossSkuQuantity": true
            }
          ]
        }
      ]
    }
  }
}

Failure scenarios

  • Merchant ID does not exists

Merchant ID does not exists

{
    "code": "404",
    "message": "Merchant with merchant Id :1800122 does not exists",
    "status": 0,
    "exceptionId": "9cf201ab-2ad3-439e-a7a6-f707d2f76e48"
}
  • The platform for client mismatch or does not exists

The platform for client mismatch or does not exists

{
    "code": "404",
    "message": "client with clientId :4 , platformId :12 does not exists.",
    "status": 0,
    "exceptionId": "6985749b-9de4-4d39-9242-d19d35a82d0c"
}
  • Service unavailable
{
    "code": "500",
    "message": "Service Unavailable",
    "status": 0,
    "exceptionId": "65466805-5be1-4fa4-912d-d28cf620d687"
}