Payment Methods

Check the various payment methods you can configure at the checkout by integrating with Razorpay APIs.


Check the

activated for your account.

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:

Understand the fields required to construct a payment request:

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.00, then pass 29900 in this field.

order_id

mandatory

string Unique identifier of the Order.
Know more about

.

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.

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

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.

Sample payloads for each of the payment methods are shown below in the JSON format.

Given below is the sample code for card payments:

The acceptable image formats and sizes are:

  • .jpeg
  • .jpg
  • .png
  • Maximum accepted size is 6 MB.

Know about

.


Is this integration guide useful?