Integrate Offers with Standard Checkout
Display general, order-specific or forced Offers on Standard Checkout.
After creating
from the Dashboard, you have to integrate them on Razorpay Standard Checkout so that your customers can avail them while making payments.Integrate Offers with Orders API
If you use our JS, SDK files or other Ecommerce plugins, you should integrate offers with the Orders API.
You need not integrate offers with Orders API if you use any of the following Razorpay products or plugins to accept payments:
- Plugins: Magento, Shopify or WooCommerce.
- Products: Payment Links, Payment Buttons, Payment Pages and Invoices.
This is because Razorpay automatically creates orders for these products or plugins when customers initiate payment at the Checkout.
Handy Tips
As per the RBI guidelines, the original card number is replaced with a surrogate value called a token. However, we will continue to support BIN-based offers post tokenisation. Note that BIN-based offers will not work on saved American Express (AMEX) cards.
Only those offers that pass the following validations are be displayed at the Checkout:
There are three ways in which you can display offers at Razorpay Checkout:
This is the easiest way to display offers at the Checkout. While creating the offer from the Dashboard, enable the Show Offer on Checkout option. The offer automatically appears at the Checkout.

To display a specific set of offers at the Checkout, you should associate the offers with an order. You can pass the offers array as a request attribute in the Create Orders API.
Some use cases:
- If you have multiple product lines running on the same account and certain business logic on your side for displaying offers.
- The discount has already been applied, and you would like to restrict the payment method to avail the offer.
Watch Out!
To display an Offer for a particular customer:
- Do not select the Show Offer on the Checkout check box while creating an Offer.
- Specify the offer_id; for example,
offer_ANZoaxsOww2X53in theoffersarray while creating an order.
Use this method when a customer has already selected an offer on your website or app before the payment process begins. By forcing an offer, you lock the checkout to that specific offer, ensuring the customer can only pay using the forced offer. If the customer does not accept the forced offer, the payment will not be processed.
Watch Out!
You must pass only one offer id in the offers array when using force_offer. Passing multiple offers with force_offer set to true is not supported.
To integrate offers, follow these steps:
- .
- .
- .
You can
from the .
Let us say you have created an offer offer_ANZoaxsOww2X53, such that a discount of ₹200 is applicable on all transactions done through AXIS netbanking only.
Create an order using the
. Depending on the method, you can pass specific offers in the request or let Razorpay apply the default offers automatically.Handy Tips
To display specific offers at checkout, pass them in the offers array (see the sample code below). If you don't include anything in the offers array, the default offers will automatically appear at checkout.
You do not have to pass any offer id in the request. Razorpay automatically applies the offers created and enabled from the Dashboard.
curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \-X POST https://api.razorpay.com/v1/orders \-H "content-type: application/json" \-d '{"amount": 5000,"currency": "","receipt": "receipt#1","notes": {"key1": "value3","key2": "value2"}}'
amount
mandatory
integer Enter the amount for which the order is to be created in currency subunits. For example, for an amount of ₹50, enter 5000.
currency
mandatory
string ISO code of the currency associated with the order amount. Here, it is INR.
receipt
optional
string Your receipt id for this order.
notes
optional
object Key-value pair that can be used to store additional information about the order.
For a complete list of response parameters, refer to the
The order_id obtained in the previous step can be passed to the Checkout form as follows:
<button id="rzp-button1">Pay</button><script src="https://checkout.razorpay.com/v1/checkout.js"></script><script>var options = {"key": "[YOUR_KEY_ID]","amount": "1000000","currency": "","order_id":"order_FIL1vBOsWFllnO","name": "Acme Corp","description": "Test Transaction","image": "https://cdn.razorpay.com/logos/F9Yhfb7ZXjXmIQ_medium.jpg","handler": function (response){alert(response.razorpay_payment_id);alert(response.razorpay_order_id);alert(response.razorpay_signature)},"prefill": {"name": "Gaurav Kumar","email": "gaurav.kumar@example.com","contact": "+919876543210"},"notes": {"address": "Razorpay Corporate Office"},"theme": {"color": "#3399cc"}};var rzp1 = new Razorpay(options);document.getElementById('rzp-button1').onclick = function(e){rzp1.open();e.preventDefault();}</script>
Know more about
.After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments:
- From the Dashboard.
- By .
- By polling our .
Is this integration guide useful?
ON THIS PAGE