Available in🇮🇳 India
Feature AvailabilityThe IP whitelist is being rolled out to merchants in phases, so it may not be available for your account yet. If the IP Whitelist section is not visible on the API Keys page, the feature is not turned on for your account yet.
How the IP Whitelist Works
The IP whitelist works as follows:- Test and Live mode have separate IP whitelists. The Live IP whitelist checks calls made with your Live keys. The Test IP whitelist checks calls made with your Test keys. Switch the mode on the Dashboard to see the other list.
- Only server-side calls are checked. The IP whitelist applies to every API call authenticated with your key ID and secret, such as creating orders, payments, refunds and Route linked accounts. Checkout runs in your customers’ browsers and apps with only your key ID, so your customers can still pay from anywhere.
- Add all your servers. Once the IP whitelist has one IP, Razorpay blocks calls from every other IP. If your servers make calls from more than one public IP, for example through several Network Address Translation (NAT) gateways or regions, add all of them.
- All keys in a mode share one IP whitelist. Regenerating a key keeps the IP whitelist, unless you choose Regenerate without IP whitelist.
Before You Start
The table below lists the rules for the IP whitelist:
Know more about standard user roles and permissions.
Add IPs When You Generate or Regenerate a Key
When you generate your first key or regenerate a key, the Dashboard asks for your server IPs first. If you already have an IP whitelist in that mode, the Dashboard fills in the saved IPs for you to check.Live Mode
To add IPs while you generate or regenerate a Live key:- Log in to the Razorpay Dashboard and select Live mode.
- Navigate to Account & Settings → API keys (under Website and app settings) and click Generate Key (or Regenerate Key).
-
In the Add your server IPs pop-up page, enter the public IPv4 address of every server that calls Razorpay’s APIs in the Server IP addresses text box. Separate the addresses with commas. Click Continue.

- Check the IPs in the Confirm pop-up page and click Confirm. Click Back to change them.
- Enter the OTP. This one OTP saves your IPs and creates your key.
- Copy your key ID and key secret and store them safely.
Test Mode
To add IPs while you generate or regenerate a Test key:- Log in to the Dashboard and select Test mode.
- Navigate to Account & Settings → API keys (under Website and app settings) and click Generate Key (or Regenerate Key).
-
In the Add your server IPs pop-up page, enter your server IPs in the Server IP addresses text box and click Continue. Razorpay does not ask for an OTP in Test mode.

Generate a Key Without an IP Whitelist
If you cannot add IPs yet, for example because your servers do not have a fixed public IP, generate the key without an IP whitelist. To generate a key without an IP whitelist:- In the Add your server IPs pop-up page, clear the Server IP addresses text box. The button in the next step stays unavailable while the text box has IPs.
- Click Generate without IP whitelist (or Regenerate without IP whitelist).
-
In Live mode, the Continue without an IP whitelist? pop-up page opens with a high-risk warning. Select the I accept the risk and the terms. My business is responsible for all activity on this key. check box.

- Click Continue without IP whitelist and enter the OTP.
Add or Remove IPs Later
Log in to the Dashboard, select the mode (Test or Live) and navigate to Account & Settings → API keys (under Website and app settings). The IP whitelist section shows whether the IP whitelist is On or Off, how many IPs are saved out of 15, and who added each IP and when. Razorpay saves each add and each remove straight away. In Live mode, each one needs an OTP.
Add IPs
To add IPs to your IP whitelist:- In the Add IP addresses text box, enter one or more public IPv4 addresses. Separate them with commas.
- Click Add.
- In Live mode, enter the OTP.
Remove an IP
To remove an IP from your IP whitelist:- Click the remove icon in the row of the IP.
- In Live mode, enter the OTP.
Find the Public IP of Your Server
Add the public IP that your server’s API calls come from, which is its outbound IP. This is often not the IP your website runs on and not the private IP your server sees for itself.Check from the Server
Run this command on each server or container that calls Razorpay’s APIs. The address it prints is the one Razorpay sees.Find the IP on a Cloud Provider
The table below lists the IP to add for each setup:If Your Server Has No Fixed IP
Serverless functions, such as AWS Lambda outside a VPC, and many managed platforms usually send requests from addresses that can change. Other customers of the provider can share these addresses, so you cannot whitelist them reliably. Do one of the following:- Route outbound traffic through a NAT gateway with a fixed IP. For AWS Lambda, run the function in a VPC with a NAT gateway and an Elastic IP.
- Use your platform’s static outbound IP option.
- Generate your key without an IP whitelist until you have a fixed IP, then add the IPs.
IPs You Should Not Add
Do not add the following:- Your laptop or office IP for Live keys, unless your Live servers really call from there. Use Test mode for development.
- Your website’s IP, if it is not the server that calls Razorpay’s APIs.
- Private addresses such as
10.0.0.5or192.168.1.20. Razorpay never sees these.
Messages You Might See
The table below lists the messages the Dashboard shows and what to do about each:
Errors in the key generation step appear under the Server IP addresses text box after you leave it. Errors in the IP whitelist section appear when you click Add.


If Your API Calls Are Blocked
A call from an IP that is not on the IP whitelist fails with an error. To fix it:- Run the check in Find the Public IP of Your Server on the server that made the call.
- Log in to the Dashboard and add that IP to the IP whitelist. The IP whitelist does not affect the Dashboard.
- Retry the call.
Best Practices
Follow these practices to get the most from the IP whitelist:- Turn on the IP whitelist for your Live keys. Generate a key without an IP whitelist only if your servers have no fixed public IP yet. Add IPs as soon as you have one.
- Use fixed outbound IPs. Send API calls from addresses that do not change on restart or redeploy, such as an Elastic IP or a NAT gateway with static IPs. See Find the Public IP of Your Server.
- Add every server that calls Razorpay’s APIs. Include each region, NAT gateway, standby or failover server and scheduled jobs such as refund or reconciliation scripts. Razorpay blocks calls from a server you leave out.
- Keep Test and Live separate. Add your development machines and office IPs to the Test IP whitelist only. The Live IP whitelist must hold only the servers that make Live API calls.
- Add the new IP before you remove the old one. When you move servers or change an IP, add the new address first. Check that API calls from it work, then remove the old address.
- Review the IP whitelist regularly. Remove IPs you no longer use. Check that IPs with a dash under Added by, which Razorpay Support added before self-serve, are still yours.
- Regenerate keys with care. Regenerating a key keeps your IP whitelist. Regenerate without IP whitelist removes every IP in that mode, so choose it only if that is what you want.
- Keep your key secret on your servers. Never put it in website code, mobile apps or public code repositories. Store it in a secrets manager or in environment variables. An IP whitelist limits where the secret works, but it does not replace keeping the secret safe.
- Limit who can make changes. Only users with the Owner, Pseudo Owner or Admin role can change the IP whitelist. Give those roles only to people who need them.
Frequently Asked Questions
Does the IP whitelist affect my customers' payments on Checkout?
Does the IP whitelist affect my customers' payments on Checkout?
No. Checkout uses only your key ID from your customers’ browsers and apps, and Razorpay does not check those calls. Razorpay checks only calls made with your key ID and secret.
Does the IP whitelist affect webhooks?
Does the IP whitelist affect webhooks?
No. Webhooks are calls from Razorpay to your server. The IP whitelist checks calls from your server to Razorpay.
Is the IP whitelist the same as whitelisting my website?
Is the IP whitelist the same as whitelisting my website?
No. Website whitelisting controls which websites and apps can accept payments. The IP whitelist controls which servers can call Razorpay’s APIs with your key secret. Know more about business website details.
Is the IP whitelist the same as the RazorpayX IP allowlist?
Is the IP whitelist the same as the RazorpayX IP allowlist?
No. RazorpayX payouts have their own IP allowlist, managed in RazorpayX. Know more about Allowlist IPs. The IP whitelist on this page covers payment APIs.