Available in🇮🇳 India
You can accept payments through several payment methods such as netbanking, debit cards, credit cards, wallets and UPI. However, you can configure payment methods of your choice for collecting payments from your customers.
Check the payment methods activated for your account.
Check the API Endpoint
On this page, we have listed the sample codes with the S2S JSON V2 API. If you are using the Redirect API version, use the API endpoint as suggested below:Supported Payment Fields
Understand the fields required to construct a payment request: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 code for the currency in which you want to accept the payment. For example,
INR. Refer to the list of supported currencies. Length must be of 3 characters.Unique identifier of the Order.
Know more about Orders API.
Know more about Orders API.
Phone number of the customer. Maximum length supported is 15 characters, inclusive of country code.
Information regarding the customer’s browser. This parameter need not be passed when
authentication_channel=app.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.
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.
Time difference between UTC time and the cardholder’s browser local time. Obtained from the
getTimezoneOffset() method applied to the Date object.Total width of the payer’s screen in pixels. Obtained from the
screen.width HTML DOM property.Obtained from the payer’s browser using the
navigator.language HTML DOM property. Maximum limit of 8 characters.Name of the payment method. Possible values are:
cardnetbankingwalletemiupicardless_emipaylater
Handy Tips
- CVV is not required by default for tokenised cards across all networks.
- CVV is optional for tokenised card payments. Do not pass dummy CVV values.
- To implement this change, skip passing the
cvvparameter entirely, or pass anullor empty value in the CVV field. - We recommend removing the CVV field from your checkout UI/UX for tokenised cards.
- If CVV is still collected for tokenised cards and the customer enters a CVV, pass the entered CVV value to Razorpay.
The details of the bank account that should be passed in the request. Required if the method is
emandate.Key-value object used for passing tracking info. Refer to Notes for more details.
Debit and Credit Cards
Given below is the sample code for card payments:Supported Card Networks
List of supported card networks:- Visa
- Mastercard
- American Express
- Bajaj
- Maestro
- Rupay
- Diners (Only available for private limited and registered businesses)
Netbanking
Given below is the sample code for netbanking payments. Pass the value for thebank parameter as shown below:
Supported Banks
Fetch the supported bank codes using the Methods API.EMI
Given below is the sample code for EMI payments. Pass the card details along with these parameters:methodemi_duration
EMI Plans
- Fetch the available EMI plans (for each supported bank) by invoking the Methods API. Extract the EMI plans from the response to be shown to your customers while making the payment.
- Know more about EMI plans offered by OneCard and HSBC.
Cardless EMI
Given below is the sample code for Cardless EMI payments.Handy Tips
- Contact our Support Team to get the Cardless EMI payment method enabled for your account.
- Customers should have accounts with the Cardless EMI payment partner.
Supported Providers
List of supported Cardless EMI providers:Wallet
Given below is the sample code for wallet payments. Pass the wallet provider name as shown:Supported Wallets
The table below lists the various wallets available to you. Some of them are available by default, while others require approval from us. Raise a request with our Support Team to enable such wallets.Handy TipsIntegrate your PayPal account with Razorpay Checkout to accept payments in international currencies.You can accept payments based on the transaction limit of your PayPal account.
UPI
Know about UPI Intent and UPI Collect.Pay Later
Given below is the sample code for Pay Later payments.Handy Tips
- Contact our Support Team to get this payment method enabled for your account.
- Customers should have accounts with the Pay Later service providers.
createPayment and passing method=paylater and provider=<provider_name>.
Supported Providers
CRED
Your customers can pay via a combination of CRED Coins and Credit Cards saved on CRED. To add CRED Pay as a payment method, you need to:- Pass the
app_offerparameter in Orders API. - Pass the
methodandproviderparameters in Create Payments API.
Pass app_offer Parameter in Order
You must create an order using Orders API. In the response, you obtain anorder_id which you must pass to Checkout.
POST /orders
Request Parameters
amount mandatory
: integer The transaction amount, expressed in the currency sub-unit, such as paise (in case of INR). For example, for an actual amount of ₹299.35, the value of this field should be 29935.
currency mandatory
: string The currency in which the transaction should be made. See the list of supported currencies. Default is INR.
app_offer optional
: boolean Allow/disallow customers from using CRED coins to make payments. This is used to prevent double discounting scenarios where customers have already availed discounts using voucher/coupon and you do not want them to redeem Coins as well. Possible values:
true: Customer not allowed to use CRED coins to make payment.false(default): Customer can use CRED coins to make payment.
receipt optional
: string Your receipt id for this order should be passed here. Maximum length is 40 characters.notes optional
: 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”.
Pass method and provider Parameters in Create Payments API
Request Parameters
Along with the other Create Payment API request parameters, you must pass:method mandatory
: string The method used to make the payment. Here, it must be app.
provider mandatory if method=app
: string Name of the PSP app. Here, it must be cred.
app_present mandatory if app=cred
: boolean Sets the payment flow as collect. Possible values:
true: Opens CRED app on customer’s device.false(default): Sends a push notification to customer’s device.
Emandate
You can accept recurring payments from your customers usingemandate, card or upi as the method. Know more about Recurring Payments.
Feature RequestThis is an on-demand feature. Please raise a request with our Support team to get this feature activated on your Razorpay account.
Workflow
- Create a customer.
- Create an Order with method as
emandate,nachorupi. - Collect authorisation transaction.
- Using custom checkout
- Using an authorization link
- Verify Tokens.
- Charge subsequent payments.
Sample Checkout Code to Collect Authorisation Transaction
Upload NACH File Using API
The current way to collect the NACH form is via Razorpay:- Checkout
- Merchant Dashboard
- Hosted Checkout page, where a customer signs and uploads the form via Checkout while attempting authorisation transaction.
Feature RequestThis is an on-demand feature. Please raise a request with our Support team to get this feature activated on your Razorpay account.
- Create a Customer
- Create an Order
- Upload the NACH file via API
- Fetch Token
- Create Subsequent Payments
Sample Server Request and Responses
Acceptable Image Formats and Sizes
The acceptable image formats and sizes are:- .jpeg
- .jpg
- .png
- Maximum accepted size is 6 MB.