> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dezerx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Razorpay

> Accept cards, UPI, netbanking and wallets with Razorpay

![Razorpay settings in Spartan](https://mintcdn.com/dezerx/dVNBM3sq4VCh7CKa/public/gateways/razorpay/settings.webp?fit=max\&auto=format\&n=dVNBM3sq4VCh7CKa\&q=85\&s=99e2934042166e5027dd625f31aa0fef)

Customers pay in Razorpay Checkout. Non-INR payments need international payments enabled on your Razorpay account.

## On the provider side

**1. Copy the API keys**

In the Razorpay Dashboard open Account & Settings, API Keys. Test keys start with `rzp_test_`, live keys with `rzp_live_`.

**2. Add the webhook**

Open Account & Settings, Webhooks, add the URL below, type a secret of your own and select `payment.authorized`, `payment.captured`, `payment.failed`, `order.paid` and `refund.processed`.

## In Spartan

Go to Integrations, Modules, then open Razorpay and enable the module.

| Field | Value |
| - | - |
| Key ID, Key secret | From the API keys. The mode follows the key prefix |
| Webhook secret | The secret you typed in Razorpay |
| Display name, Business name, Theme colour | How the method and Checkout look |
| Allowed currencies | Optional, comma separated. Use `INR` alone without international payments |
| Auto capture | Off keeps invoices pending until you capture in Razorpay |

Use Test connection to check the keys.

Leave a secret field empty to keep the stored value.

## Webhook

```text theme={null}
https://yourdomain.com/api/razorpay/webhook/callback
```

## Troubleshooting

* Webhooks rejected: the Webhook secret here must equal the one in Razorpay. The Connection card shows Missing if empty.
* Currency refused: Razorpay does not support every currency. Restrict Allowed currencies.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.