Docs Billing
Set up payments
Connect Razorpay for top-ups and plans (admins).
- 1
Create API keys
In the Razorpay dashboard, create a key pair. Never paste secrets into chat, issues or code. - 2
Register your website
In Account & Settings, add the website where payments happen. Razorpay blocks payments from sites that are not registered. - 3
Add server variables
SetRAZORPAY_KEY_IDandRAZORPAY_KEY_SECRETon your host, then redeploy. - 4
Add the webhook
Create a webhook tohttps://YOUR-SITE/api/public/razorpay-webhookfor the eventspayment.capturedandorder.paid, with a secret of your choice. - 5
Set the webhook secret
Add the same secret asRAZORPAY_WEBHOOK_SECRETand redeploy. - 6
Test
Make a Rs 1 payment and confirm it in Credit Usage.
Troubleshooting
| Message | Fix |
|---|---|
| Payment blocked as website does not match registered website(s) | Add your site in Razorpay under Account & Settings. |
| Payments are not configured yet | The key id or key secret is missing on the server. |
| Webhook returns 401 | The webhook secret in Razorpay and on the server do not match. |