Razorpay — Domestic & Export
Connect Razorpay for businesses legally registered in India (Domestic, and optionally Export). Use this page after you choose Domestic & export in Chargebee.
If you are still deciding between Domestic / Export and Import, start on Razorpay.
See also
On this path
- Complete Prerequisites
- Connect with Razorpay (OAuth) — recommended for new connections
- Return to Enable payment methods
- Configure Cards or UPI & Netbanking
Prerequisites
For Domestic / Export accounts
- Configure your Chargebee test and live sites with Razorpay independently. Payment information and data on the test site are not available on the live site.
- S2S (Server to Server) integration, Virtual Payment Address (VPA) validation, recurring CAW (Charge_At_Will), and recurring e-mandates must be enabled in your Razorpay account. Contact Chargebee Support for assistance. Razorpay may take 25 to 30 business days to connect with the bank and enable these permissions as per regulatory requirements.
- Webhooks are mandatory for the legacy Key ID / Key Secret connection.
- Enable Auto Capture with Custom timeout on Razorpay when you need time to void or refund authorized payments before capture. See Razorpay capture settings.
- For Export (non-INR presentment), enable international payments on the Razorpay Domestic account first. See Razorpay: enable international debit and credit cards.
Information
Webhooks with OAuth: For Razorpay connections using OAuth, you do not need to configure webhooks manually in Razorpay. Chargebee handles that for you.
Configure Razorpay Domestic and Export in Chargebee
First choose Domestic & export in How will you process payments? on Razorpay.
Connect with Razorpay (OAuth)
For new Razorpay gateway connections, Chargebee uses OAuth.
-
After choosing Domestic & export, open Connect with Razorpay.

-
If you already have a Razorpay account: click Connect to an existing account and authorize Chargebee.

-
If you do not have a Razorpay account: click Create one, complete Razorpay signup / KYC, then authorize Chargebee.
-
When authorization succeeds, the Razorpay account is linked in Chargebee.
Information
What’s next after OAuth
- Enable payment methods on the Razorpay overview.
- Configure Razorpay Cards and/or Razorpay UPI & Netbanking.
- Optionally enable Gateway Access Error Notifications so admins are alerted if reconnect is needed.
Legacy: Key ID and Key Secret
Use this path only if you must maintain an existing Key ID / Key Secret connection. Prefer OAuth for new setups.
Warning
Deprecation notice: Connecting with Key ID and Key Secret is a legacy method and will be deprecated soon. Existing Key ID / Key Secret connections continue to work until further notice.
Retrieve Razorpay Key ID and Key Secret
-
Log into your Razorpay account.
-
If you already have the Key ID and Secret Key, note them and continue to Add Razorpay Gateway. If you do not, go to Settings > API Keys, and click Regenerate Key.

-
In the Roll Key pop-up, select the option that keeps the previous key available until you finish updating every system that still uses it, then click OK to view the new details.

Note
- The new key details cannot be viewed later. Note them down or use Download Key Details.
- Inventory every Chargebee site, Razorpay integration, and other consumer that uses the previous Key ID and Key Secret. Update each consumer to the new credentials before you disable the previous key. Keep the previous key active until migration is complete so payment processing is not interrupted.
Add Razorpay Gateway (Legacy Key ID / Key Secret only)
-
Enter the Key ID and Key Secret from your Razorpay account in the applicable fields.
-
Select the relevant account type from the Razorpay Account Type drop-down menu and click Connect.

Configure webhooks (Legacy Key ID / Key Secret only)
Webhooks are mandatory for legacy Key ID / Key Secret connections.
-
Review the Notification URL and Secret in the Notification URL pop-up. Copy these values into Razorpay so Chargebee receives events for this account.

-
Log in to your Razorpay account. Go to Settings > Webhooks > Add new Webhook.
-
Paste the Notification URL in the Webhook URL field.
-
Paste the Secret from the Notification URL pop-up and select all events under Active events.
-
Enter the email you want to use for webhook alerts and notifications.
-
Click Create Webhook.

-
Return to the Chargebee configuration page, select I have added this URL in Razorpay, and click Continue.

After the legacy connection is complete, continue with Enable payment methods.
Reconnect and gateway access error notifications
Warning
Do not revoke Chargebee’s access from the Razorpay account. If access is revoked or authorization fails, payments can stop until you reconnect.
Enable reconnect emails
Chargebee may email site admins when it detects repeated Razorpay failures that indicate a gateway or merchant configuration issue. These are sent through Gateway Reconnect Mails in Chargebee Notifications.
The email may ask you to reconnect Razorpay. The alert can be triggered by failed transactions on your site, an expired OAuth authorization, or when you manually revoke Chargebee access from your Razorpay account.
- Enable Gateway Access Error Notifications (Gateway Reconnect Mails) under Chargebee Notifications for Admin / Owner recipients as needed.
- If you receive a reconnect email after an access error, open the gateway in Chargebee and use Reconnect to re-authorize the same Razorpay account.
Reconnect
-
Use Reconnect when you see an access / authorization error, or after Chargebee access was revoked in Razorpay.

-
Sign in to the same Razorpay account that was originally connected. To use a different Razorpay account, add a new gateway instead.
Limitations
- Legacy Key ID / Key Secret connections require manual webhook configuration and are scheduled for deprecation.
- S2S, VPA validation, recurring CAW, and recurring e-mandates must be enabled on Razorpay before recurring collection works as expected; Razorpay enablement can take 25 to 30 business days.
- Export (non-INR presentment) requires international payments to be enabled separately on the Razorpay Domestic account.
For gateway error handling in Chargebee, see Payment errors.
Related content
- Razorpay — setup choice and enable payment methods
- Razorpay Cards
- Razorpay UPI & Netbanking
- Razorpay RBI e-Mandate Impacts
- Razorpay Import — only if your business is registered outside India
Was this article helpful?