Prerequisites
Generate the API keys to start your integration. The keys are required for authenticating API requests with our servers. Log in to the Dashboard to generate the API keys, if you have not done earlier. For making the direct API calls, you need theKey_Secret as well.
Workflow
1
Step 1
2
Step 2
4
Step 4
5
Step 5
6
Step 6
7
Step 7
Step 1: Create Offers
Create an offer from the Dashboard.Step 2: Fetch all Offers
Use the following API to retrieve a list of active offers based on specific input parameters such as order details, payment methods or customer details. /v1/engage/offers/listCurl
Success
Request Parameters
offers optional
: array List of Offer ids to fetch. Can fetch a maximum of 20 offers per request.
order_id optional
: string Unique Razorpay order_id for which Offers are being fetched.
order optional
: object Order details for cases where order_id is not passed.
amount optional
: integer The amount for which the order was created, in currency subunits. For example, for an amount of 295, enter 29500.
currency optional
: string Currency code. Here it is, INR. Currently, only INR is supported.
customer optional
: object Customer details.
contact optional
: string The customer’s phone number. A maximum length of 15 characters including country code. For example, +919123456780.
email optional
: string Customer’s email address
payment_instruments optional
: object Details of payment instruments.
method optional
: string Payment method. For example, card, upi, emi, netbanking.
iins optional
: integer List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported.
card_tokens optional
: array Card tokens associated with the payment instrument.
count optional
: integer Number of Offers to fetch. Default: 10. Maximum: 50.
skip optional
: integer Number of Offers to skip.
Response Parameters
entity
: string Represents the type of collection.
count
: integer Number of offers to be fetched.
items
: array List of offer objects.
entity
: string The entity being created. Here, it is offer.
id
: string The unique identifier of the offer.
name
: string Internal name of the offer.
display_name
: string Display name of the offer visible to customers.
description
: string Description of the offer.
status
: enum Current status of the offer. Possible values:
createdactiveinactive
inactivation_reason
: enum Reason for inactivation. Possible values:
expiredexhaustedon_demand
currency
: string The currency in which the payment should be made by the customer. For example, INR.
starts_at
: integer Start time of the offer in UNIX timestamp.
ends_at
: integer End time of the offer in UNIX timestamp.
schedules
: object List of schedule objects defining the cadence of the offer.
period
: enum Frequency of the offer activation. Possible values:
dailyweeklyfortnightlymonthlyyearly
interval
: integer Specifies the repeating pattern in terms of the period. Possible values:
1-71-311-12
starts_at
: integer Start time of the schedule in UNIX timestamp.
ends_at
: integer End time of the schedule in UNIX timestamp.
terms_condition
: string Terms and conditions of the offer.
description
: string Additional description about the offer.
url
: string URL linking to the full terms and conditions of the offer.
applicable_channels
: enum Specifies where the offer is applicable. Possible values:
onlineoffline
funding
: object Defines how the offer is funded and distributed amongst stakeholders.
type
: string Specifies whether the offer is fully funded or co-funded. Possible values:
fullcofunded
split
: array List of funding contributions from different entities.
bearer
: string Defines the entity responsible for bearing the offer cost. Possible values:
businessissuernetworkcobranding_partnerapp
type
: string Specifies the type of funding applied. Possible values:
fixedpercentage
value
: integer Defines the funding amount or percentage contributed. For example: 50 for 50%.
benefits_types
: enum List of benefit types. Possible values:
instant_discountcashbackno_cost_emilow_cost_emivoucher
usage_limits
: object Defines the restrictions on offer usage across offer, customer and payment instrument.
on
: enum Level at which the usage limit applies. Possible values:
offermobile numbercard numberemailphonecustomer id
limit_type
: enum Type of usage limit. Possible values:
COUNTBUDGET
limit_value
: integer Value corresponding to the limit. For example, 1 for single use.
frequency_type
: enum Frequency for the usage limit. Possible values:
dailyweeklymonthlyyearly
frequency_value
: string Value corresponding to the frequency type. Possible values:
1-7for daily1-31for monthly1-12for yearly
rules
: object Defines the validations and the benefits for an offer.
filters
: object Criteria for transactions to qualify for the offer. Possible values:
min_amountmin_amountapplies_toline_items
includes
: object Criteria that qualify transactions for the offer.
order
: object Order-specific filters such as min_amount or max_amount.
min_amount
: integer Minimum order amount required to apply the offer. Amount is in the smallest currency sub-unit.
max_amount
: integer Maximum order amount eligible for the offer. Amount is in the smallest currency sub-unit.
applies_to
: enum Specifies what the offer applies to. Possible values:
cartproducts
payment_instruments
: object Filters on payment methods and instruments. For example, issuer, apps or vpa.
method
: string Payment method. For example, card, upi, emi, netbanking.
card
: object Details associated with the card. Required if the payment method is card.
saved
: boolean Indicates if the offer promotes card tokenisation. Possible values:
truefalse
international
: boolean Specifies if the card is international.
issuers
: string List of eligible card issuers For example, HDFC, ICICI, SBI.
types
: enum Type of card. Possible values:
debitcreditprepaid
networks
: enum Card networks. Possible values:
visaamexmastercardbajajmaestrorupaydiners
categories
: string Specifies the category of the card. For example: Platinum, Infinia.
iins
: integer List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported.
subtype
: enum Specifies the subtype of the card. Possible values:
consumerbusiness
cobranding_partners
: enum List of co-branding partners associated with the card. For example: onecard, flipkart, swiggy.
tokens
: string Card tokens for tokenized payments.
number
: string Reference number to fetch offers based on the card number.
upi
: object Contains details specific to UPI payments.
psp
: enum List of supported UPI apps. For example, gpay, cred.
vpa_handle
: enum List of supported VPA handles. For example: xyz@okaxis.
payer_account_types
: string Types of payer accounts. Possible values:
credit_cardbank_accountcredit_linewallet
flow
: enum Specifies the UPI payment flow. Possible values:
collectintent.
bank_account
: object Details related to bank account payments.
account_numbers
: string List of allowed account numbers.
ifscs
: string List of allowed IFSC codes.
names
: string List of allowed account holder names.
emi
: object Details of EMI payment method.
emi_duration
: integer List of available EMI durations in months. For example: 3, 6.
wallet
: object Details of wallet payment method.
providers
: string List of supported wallet providers. For example, Wallet providers.
netbanking
: object Details of net banking payment method.
banks
: enum List of supported banks for net banking. For example: HDFC.
excludes
: object Criteria that disqualify transactions for the offer.
orders
: object Specific exclusions on order details like min_amount or max_amount.
payment_instruments
: object Specific exclusions for payment instruments. For example, issuer, apps or VPA.tokens.
benefits
: object The details of the benefits of the offer.
offer_type
: enum Type of benefit provided. Possible values:
instant_discountcashbackalready_discountedlow_cost_emino_cost_emivoucher
limit_type
: enum Type of benefit. Possible values:
flatup_to
unit
: enum Unit of the benefit. Possible values:
percentageabsolute
value
: integer Value of the benefit. Amount is in the smallest currency sub-unit.
max_discount
: integer Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit.
calculated_benefit_value
: integer Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit.
display_config
: object Contains configurations to control how the offer is displayed and validated.
offer_display_priority
: integer Determines the priority level for displaying the offer. A lower value indicates a higher priority. For example: 1.
should_validate
: boolean Specifies if additional customer-specific validation is required for the offer. Possible values:
truefalse
is_hidden
: boolean Determines whether the offer should be visible to customers in the checkout UI. Possible values:
true: The offer is hidden from the checkout UI. It can still be applied programmatically or automatically based on conditions.false: The offer is visible and may be shown in the checkout UI for users to apply.
auto_apply
: boolean Specifies whether the offer should be automatically applied during checkout without requiring user action. Possible values:
true: The offer is auto-applied if it meets the eligibility criteria.false: The offer requires the customer to explicitly select or input the offer/voucher during checkout.
Error Response Parameters
Error | Cause | Solution
The Offer id does not exist. | The offer id passed in the request is invalid or does not exist. | Retry with a valid inquiry parameter.
The Offer id is invalid. | The offer id provided is not in a valid format. | Retry with a valid offer id.
The number of offers passed in the request must be less than 20. | The request contains more than the allowed limit of 20 offer ids. | Retry with an optimal length of offer IDs (1–20).
offers must be of type array. | The offers parameter in the request is not an array. | Pass the offers parameter as an array in the request.
The order_id does not exist. | The order_id provided in the request does not exist. | Retry with a valid order_id.
The order_id is invalid. | The order_id passed in the request is invalid or in an incorrect format. | Retry with a valid order_id.
Currency is required if the order amount is greater than 0. | The currency field is missing in the request when the order amount is greater than 0. | Provide a valid currency code (e.g., INR) in the request.
The amount must be at least 1.00 unit. | The order amount provided is less than the minimum allowed value of 1.00. | Retry with a valid order amount of at least 1.00 unit.
Contact number is required. | The contact number field is missing in the request. | Provide a valid contact number in the request.
The contact number can only contain digits and the + symbol. | The contact number contains invalid characters. | Retry with a valid contact number containing only digits and the + symbol.
The contact number should be at least 8 digits, including the country code. | The contact number provided is less than 8 digits. | Retry with a valid contact number of at least 8 digits, including the country code.
The amount is required. | The amount field is missing in the request. | Provide a valid amount in the request.
The customer_id is invalid. | The customer_id provided in the request is invalid. | Retry with a valid customer_id.
The customer_id does not exist. | The customer_id provided in the request does not exist. | Retry with a valid customer_id.
The method is invalid. | The payment method provided in the instruments array is invalid. | Provide a valid payment method in the instruments array.
The provider is invalid. | The provider specified in the instruments array is invalid. | Provide a valid provider in the instruments array.
The issuer is invalid. | The issuer provided in the instruments array is invalid. | Provide a valid issuer in the instruments array.
The card type is invalid. | The card type provided in the instruments array is invalid. | Provide a valid card type in the instruments array.
The method is not enabled for you. | The payment method is not enabled for your account. | Ensure the payment method is enabled for your account.
The provider is not enabled for you. | The provider is not enabled for your account. | Ensure the provider is enabled for your account.
Step 3: Create an Order
After generating offers from the Dashboard, pass theoffer_id in the order request attributes to the following endpoint:
/orders
Curl
Success
Request Parameters
amount mandatory
: string Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass 29900 in this field.
currency mandatory
: integer Currency code for the currency in which you want to accept the payment. For example, INR.
offer_id
: string Unique identifier of the offer.
Response Parameters
id
: string The unique identifier of the order.
amount
: integer The amount for which the order was created, in currency subunits. For example, for an amount of 295, enter 29500.
entity
: string Name of the entity. Here, it is order.
amount_paid
: integer The amount paid against the order.
amount_due
: integer The amount pending against the order.
currency
: string ISO code for the currency in which you want to accept the payment. The default length is 3 characters.
receipt
: string Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique.
order_id
: json object Collection of offers entity.
offer_id
: string Unique identifier of the offer.
offers
: array Unique identifier of the offer.
status
: string The status of the order. Possible values:
created: When you create an order it is in thecreatedstate. It stays in this state till a payment is attempted on it.attempted: An order moves fromcreatedtoattemptedstate when a payment is first attempted on it. It remains in theattemptedstate till one payment associated with that order is captured.paid: After the successful capture of the payment, the order moves to thepaidstate. No further payment requests are permitted once the order moves to thepaidstate. The order stays in thepaidstate even if the payment associated with the order is refunded.
attempts
: integer The number of payment attempts, successful and failed, that have been made against this order.
notes
: json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
created_at
: integer Indicates the Unix timestamp when this order was created.
Step 4: Validate Offers
Validate the applicability of an offer based on input details like order, customer or instrument data to ensure it is eligible for use. /v1/engage/offers/validateCurl
Success
Request Parameters
offers mandatory
: array Array of Offer id to fetch. Maximum: 20 Offers per request.
order_id optional
: string Unique Razorpay order_id for which Offers are being fetched.
order optional
: object Order details for cases where order_id is not passed.
amount optional
: integer The amount for which the order was created, in currency subunits. For example, for an amount of 295, enter 29500.
currency optional
: string Currency code. Here it is, INR. Currently, only INR is supported.
customer optional
: object Customer details.
contact optional
: string The customer’s phone number. A maximum length of 15 characters including country code. For example, +919123456780.
email optional
: string Customer’s email address
payment_instruments mandatory
: object Details of payment instruments.
method optional
: string Payment method. For example, card, upi, emi, netbanking.
iins optional
: integer List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported.
card_tokens optional
: array Card tokens associated with the payment instrument.
count optional
: integer Number of Offers to fetch. Default: 10. Maximum: 50.
skip optional
: integer Number of Offers to skip.
Response Parameters
valid_offers
: array List of applicable offers.
entity
: string Represents the type of collection.
count
: integer Number of valid offers.
items
: array List of valid offer objects.
entity
: string The entity being created. Here, it is offer.
id
: string The unique identifier of the offer.
name
: string Internal name of the offer.
validity
: object Object containing offer validity details.
valid
: boolean Indicates whether the offer is valid. Possible values:
true: Offer is valid.false: Offer is invalid.
display_name
: string Display name of the offer visible to customers.
description
: string Description of the offer.
status
: enum Current status of the offer. Possible values:
createdactiveinactive
inactivation_reason
: enum Reason for inactivation. Possible values:
expiredexhaustedon_demand
currency
: string The currency in which the payment should be made by the customer. For example, INR. See the list of supported currencies.
starts_at
: integer Start time of the offer in UNIX timestamp.
ends_at
: integer End time of the offer in UNIX timestamp.
schedules
: object List of schedule objects defining the cadence of the offer.
period
: enum Frequency of the offer activation. Possible values:
dailyweeklyfortnightlymonthlyyearly
interval
: integer Specifies the repeating pattern in terms of the period. Possible values:
1-71-311-12
starts_at
: integer Start time of the schedule in UNIX timestamp.
ends_at
: integer End time of the schedule in UNIX timestamp.
terms_condition
: string Terms and conditions of the offer.
description
: string Additional description about the offer.
url
: string URL linking to the full terms and conditions of the offer.
applicable_channels
: enum Specifies where the offer is applicable. Possible values:
onlineoffline
funding
: object Defines how the offer is funded and distributed amongst stakeholders.
type
: string Specifies whether the offer is fully funded or co-funded. Possible values:
fullcofunded
split
: array List of funding contributions from different entities.
bearer
: string Defines the entity responsible for bearing the offer cost. Possible values:
businessissuernetworkcobranding_partnerapp
type
: string Specifies the type of funding applied. Possible values:
fixedpercentage
value
: integer Defines the funding amount or percentage contributed. For example: 50 for 50%.
benefits_types
: enum List of benefit types. Possible values:
instant_discountcashbackno_cost_emilow_cost_emivoucher
usage_limits
: object Defines the restrictions on offer usage across offer, customer, payment instrument.
on
: enum Level at which the usage limit applies. Possible values:
offermobile numbercard numberemailphonecustomer id
limit_type
: enum Type of usage limit. Possible values:
COUNTBUDGET
limit_value
: integer Value corresponding to the limit. For example, 1 for single use.
frequency_type
: enum Frequency for the usage limit. Possible values:
dailyweeklymonthlyyearly
frequency_value
: string Value corresponding to the frequency type. Possible values:
1-7for daily1-31for monthly1-12for yearly
rules
: object Defines the validations and the benefits for an offer.
filters
: object Criteria for transactions to qualify for the offer. Possible values:
min_amountmin_amountapplies_toline_items
includes
: object Criteria that qualify transactions for the offer.
order
: object Order-specific filters such as min_amount or max_amount.
min_amount
: integer Minimum order amount required to apply the offer. Amount is in the smallest currency sub-unit.
max_amount
: integer Maximum order amount eligible for the offer. Amount is in the smallest currency sub-unit.
applies_to
: enum Specifies what the offer applies to. Possible values:
cartproducts
payment_instruments
: object Filters on payment methods and instruments. For example, issuer, apps or vpa.
method
: string Payment method. For example, card, upi, emi, netbanking.
card
: object Details associated with the card. Required if the payment method is card.
saved
: boolean Indicates if the offer promotes card tokenisation. Possible values:
truefalse
international
: boolean Specifies if the card is international.
issuers
: string List of eligible card issuers For example, HDFC, ICICI, SBI.
types
: enum Type of card. Possible values:
debitcreditprepaid
networks
: enum Card networks. Possible values:
visaamexmastercardbajajmaestrorupaydiners
categories
: string Specifies the category of the card. For example: Platinum, Infinia.
iins
: integer List of Issuer Identification Numbers (IINs). Only 6-digit IINs are supported.
subtype
: enum Specifies the subtype of the card. Possible values:
consumerbusiness
cobranding_partners
: enum List of co-branding partners associated with the card. For example: onecard, flipkart, swiggy.
tokens
: string Card tokens for tokenized payments.
number
: string Reference number to fetch offers based on the card number.
upi
: object Contains details specific to UPI payments.
psp
: enum List of supported UPI apps. For example, gpay, cred.
vpa_handle
: enum List of supported VPA handles. For example: xyz@okaxis.
payer_account_types
: string Types of payer accounts. Possible values:
credit_cardbank_accountcredit_linewallet
flow
: enum Specifies the UPI payment flow. Possible values:
collectintent.
bank_account
: object Details related to bank account payments.
account_numbers
: string List of allowed account numbers.
ifscs
: string List of allowed IFSC codes.
names
: string List of allowed account holder names.
emi
: object Details of EMI payment method.
emi_duration
: integer List of available EMI durations in months. For example: 3, 6.
wallet
: object Details of wallet payment method.
providers
: string List of supported wallet providers. For example, Wallet providers.
netbanking
: object Details of net banking payment method.
banks
: enum List of supported banks for net banking. For example: HDFC.
excludes
: object Criteria that disqualify transactions for the offer.
orders
: object Specific exclusions on order details like min_amount or max_amount.
payment_instruments
: object Specific exclusions for payment instruments. For example, issuer, apps or VPA.tokens.
benefits
: object The details of the benefits of the offer.
offer_type
: enum Type of benefit provided. Possible values:
instant_discountcashbackalready_discountedlow_cost_emino_cost_emivoucher
limit_type
: enum Type of benefit. Possible values:
flatup_to
unit
: enum Unit of the benefit. Possible values:
percentageabsolute
value
: integer Value of the benefit. Amount is in the smallest currency sub-unit.
max_discount
: integer Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit.
calculated_benefit_value
: integer Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit.
display_config
: object Contains configurations to control how the offer is displayed and validated.
offer_display_priority
: integer Determines the priority level for displaying the offer. A lower value indicates a higher priority. For example: 1.
should_validate
: boolean Specifies if additional customer-specific validation is required for the offer. Possible values:
truefalse
is_hidden
: boolean Determines whether the offer should be visible to customers in the checkout UI. Possible values:
true: The offer is hidden from the checkout UI. It can still be applied programmatically or automatically based on conditions.false: The offer is visible and may be shown in the checkout UI for users to apply.
auto_apply
: boolean Specifies whether the offer should be automatically applied during checkout without requiring user action. Possible values:
true: The offer is auto-applied if it meets the eligibility criteria.false: The offer requires the customer to explicitly select or input the offer/voucher during checkout.
invalid_offers
: array List of offers that are not applicable.
entity
: string Represents the type of collection.
count
: integer Number of invalid offers.
items
: array List of invalid offer objects.
Error Response Parameters
Error | Cause | Solution
Invalid offer id. | The offer id provided in the request is invalid. | Retry with a valid offer id.
Missing voucher code. | The voucher code is missing in the request. | Retry with a valid voucher code.
Missing user id. | The user id is missing in the request. | Retry with a valid user ID.
Missing user type. | The user type is missing in the request. | Retry with a valid user type.
Invalid user type. | The user type provided in the request is invalid. | Retry with a valid user type.
No active Offers found. | No active Offers are available for the provided details. | Retry with a valid voucher code and contact.
Missing fact: customer. | The request is missing customer fact values. | Retry with valid customer fact values.
Missing fact: card number. | The request is missing a required card number. | Retry with a valid card number.
Missing fact: email. | The request is missing a required email address. | Retry with a valid email address.
Step 5: Fetch Orders
Fetches the details of a specific order using theorder_id. When the expand[]=offers query parameter is included, this API also returns detailed information about the offers applied to the order.
/v1/orders/:id/?expand[]=offers
Curl
Success
Query Parameter
expand[] optional
: string Use expand[]=offers to include the offers_applied object in the response.
Response Parameters
id
: string The unique identifier of the order.
amount
: integer The amount for which the order was created, in currency subunits. For example, for an amount of 295, enter 29500.
entity
: string Name of the entity. Here, it is order.
amount_paid
: integer The amount paid against the order.
amount_due
: integer The amount pending against the order.
currency
: string ISO code for the currency in which you want to accept the payment. The default length is 3 characters.
receipt
: string Receipt number that corresponds to this order. Can have a maximum length of 40 characters and has to be unique.
offers_applied
: json object Collection of offers entity.
entity
: string Represents the type of collection.
count
: integer Number of offers to be fetched.
items
: array List of offer objects.
entity
: string Represents the type of collection. Here it is offers.
id
: string Unique identifier of the offer.
status
: string The status of the offer.
benefits
: object The details of the benefits of the offer.
offer_type
: enum Type of benefit provided. Possible values:
instant_discountcashbackalready_discountedlow_cost_emino_cost_emivoucher
limit_type
: enum Type of benefit. Possible values:
flatup_to
unit
: enum Unit of the benefit. Possible values:
percentageabsolute
value
: integer Value of the benefit. Amount is in the smallest currency sub-unit.
max_discount
: integer Maximum discount applicable for the benefit. Amount is in the smallest currency sub-unit.
calculated_benefit_value
: integer Actual benefit value applied to the transaction. Amount is in the smallest currency sub-unit.
customer
: string Details of the customer.
contact
: string The customer’s phone number. For example, +919000090000.
email
: string The customer’s email address. For example, gaurav.kumar@example.com.
status
: string The status of the order. Possible values:
created: When you create an order it is in thecreatedstate. It stays in this state till a payment is attempted on it.attempted: An order moves fromcreatedtoattemptedstate when a payment is first attempted on it. It remains in theattemptedstate till one payment associated with that order is captured.paid: After the successful capture of the payment, the order moves to thepaidstate. No further payment requests are permitted once the order moves to thepaidstate. The order stays in thepaidstate even if the payment associated with the order is refunded.
attempts
: integer The number of payment attempts, successful and failed, that have been made against this order.
notes
: json object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
created_at
: integer Indicates the Unix timestamp when this order was created.
Step 6: Create a Payment
Send the following attributes required to create a payment at the following endpoint: /payments/create/jsonSample Code
Curl
Request Parameters
key_id mandatory
: string The Key id that you have generated from the API Keys tab in the Dashboard.
amount mandatory
: integer Payment amount in the smallest currency sub-unit. For example, if the amount to be charged is 299, then pass 29900 in this field.
currency mandatory
: string Currency code for the currency in which you want to accept the payment. For example, INR.
order_id mandatory
: string Unique identifier of the Order.
Know more about Orders API.
offer_id
: string Unique identifier of the offer.
ip mandatory
: string Customer’s IP address.
email mandatory
: string Email address of the customer. Maximum length supported is 40 characters.
contact mandatory
: string Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code.
authentication optional
: object Details of the authentication channel.
authentication_channel
: string The authentication channel for the payment. Possible values:
browser(default)app
browser mandatory
: object Information regarding the customer’s browser. This parameter need not be passed when authentication_channel=app.
java_enabled
: boolean Indicates whether the customer’s browser supports Java. Obtained from the navigator HTML DOM object. Possible values:
true: Customer’s browser supports Java.false: Customer’s browser does not support Java.
javascript_enabled
: boolean Indicates whether the customer’s browser can execute JavaScript. Obtained from the navigator HTML DOM object. Possible values:
true: Customer’s browser can execute JavaScript.false: Customer’s browser cannot execute JavaScript.
timezone_offset
: integer Time difference between UTC time and the cardholder’s browser local time. Obtained from the getTimezoneOffset() method applied to the Date object.
screen_width
: integer Total width of the payer’s screen in pixels. Obtained from the screen.width HTML DOM property.
screen_height
: integer Obtained from the navigator HTML DOM object.
color_depth
: integer Obtained from the payer’s browser using the screen.colorDepth HTML DOM property.
language
: string Obtained from the payer’s browser using the navigator.language HTML DOM property. Maximum limit of 8 characters.
method mandatory
: string Name of the payment method. Possible values are:
cardnetbankingwalletemiupicardless_emipaylater
card
: Details associated with the card. Required if the payment method is card.
number mandatory
: string Unformatted card number. Required if the method is card.
name mandatory
: string Name of the cardholder. Required if the method is card.
expiry_month mandatory
: integer Expiry month for card in MM format. Required if the method is card.
expiry_year mandatory
: string Expiry year for card in YY format. Required if the method is card.
cvv mandatory
: string CVV printed on the back of card. Required if the method is card.
Handy Tips
- CVV is not required by default for Visa and Amex tokenised cards.
- To enable CVV-less flow for Rupay and Mastercard, contact our support team.
- CVV is mandatory for Diners tokenised cards.
- CVV is an optional field. Skip passing the
cvvparameter to Razorpay to implement this change.
bank
: string Bank code of the bank used for the payment. Required if the method is netbanking.bank_account
: The details of the bank account that should be passed in the request. Required if the method is emandate.account_number mandatory
: string Bank account number used to initiate the payment.ifsc mandatory
: string IFSC of the bank used to initiate the payment.name mandatory
: string Name associated with the bank account used to initiate the payment.emi_duration
: string The EMI duration in months. Required if the method is emi.vpa
: string Virtual payment address of the customer. Required if the method is upi.wallet
: string Wallet code for the wallet used for the payment. Required if the method is wallet.notes optional
: object Key-value object used for passing tracking info. Refer to Notes for more details.callback_url optional
: string URL endpoint where Razorpay will submit the final payment status.referrer optional
: string Referrer header passed by the client’s browser.user_agent optional
: string Customer user-agent.Response Parameters
If the payment request is valid, the response contains the following fields.razorpay_payment_id
: string Unique identifier of the payment. Present for all responses.
next
: array A list of action objects available to you to continue the payment process. Present when the payment requires further processing.
action
: string An indication of the next step available to you to continue the payment process. The value here is redirect. Use this URL to redirect customer to the bank page.
url
: string URL to be used for the action indicated.
Response Types
2OO OK
: In this case, the response contains 200 OK code and the HTML content that needs to be opened in the customer’s browser. This HTML content contains form-fields, which will be automatically posted to the redirect URL for the customer to complete the payment.
400 Bad Request
: This can happen when erroneous parameters are passed in the request. For example, when the limit set in Offers is exceeded:
Know more about the error codes.
The HTML form returned in the response should be opened in the customer’s browser. The customer completes the payment on the displayed page.
Step 7: Verify the Payment
Once the customer completes the payment, aPOST request is sent to the callback_url provided in the payment create request. The data contained in the POST request depends on the success or failure of the payment made by the customer.
Next Steps
After the customer has availed the offers and made the payment on the Checkout, you can track the status of the payments:- From the Dashboard.
- By configuring webhooks.
- By polling our payment APIs.