Skip to main content
Integrate Offers with Orders APIUsing our JS, SDK files, or other Ecommerce plugins, you should integrate offers with the Orders API.

Exception

You need not integrate offers with Orders API if you use any of the following Razorpay products or plugins to accept payments:
  • Plugins: Razorpay 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.

Validation Criteria

Only those No Cost EMI offers that pass the following validations are displayed at the Checkout:

Criteria | Description

Amount Match | Order amount should be more than or equal to the Minimum Order Amount set in an offer.

Validity | Offer should be in the active or enabled state.

Date Validation | The current date lies within the range of the offer’s start and end dates.

Usage | You can define the maximum number of times an offer can be availed. If this limit is met, the offer will not be displayed on Checkout.

Show Offer on Checkout | This option must be enabled while the offer is created. This determines whether the offer will be displayed at the Checkout or not.

Display No Cost EMI Offers at Checkout

There are two ways in which you can display No Cost EMI offers at the Razorpay Checkout:

Method 1: Display No Cost EMI Offers by Default

This is the easiest way to display No Cost EMI offers at the Checkout. While creating the No Cost EMI offer from the Dashboard, enable the Show Offer on Checkout option.

Method 2: Display Limited No Cost EMI offers

To display a specific No Cost EMI offer at the Checkout, you should associate the offer 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 have certain business logic for displaying No Cost EMI offers.
  • The discount has already been applied, and you would like to restrict the payment method to avail the offer.
To display offers:

Step 1: Create an Offer from the Dashboard

You can create No Cost EMI offers from the Dashboard. Let us say you have created a No Cost EMI offer offer_ANZoaxsOww2X53, such that a discount of ₹200 is applicable on all transactions done through AXIS netbanking only.

Step 2: Pass offer_id in Orders API

Create an order using the Orders API and pass the offer_id as a request parameter.

Sample Code

Curl

Request Parameters

amount mandatory : integer Enter the amount for which the order is to be created in currency subunits. For example, for an amount of ₹10000, enter 1000000. currency mandatory : string ISO code of the currency associated with the order amount. Here, it is INR. offers mandatory : array Unique identifier of the offer. Pass the offer_id obtained from the response of the previous step.

Step 3: Pass Order_id and Trigger the Checkout

The order_id obtained in the previous step can be passed to the Checkout form as follows:
Checkout
Know more about Standard Checkout.

Next Steps

After the customer has availed the offers and made the payment at the Checkout, you can track the status of the payments: