Set up Razorpay
Connect your Razorpay account to your Laramin: enter your API keys, add your Laramin's callback URL as a Razorpay webhook, and switch the Razorpay gateway on. Start with test keys, then move to live keys.
- Applies to
- Razorpay 1.0 and later
- Who can do this
- Platform owner, Administrator
- Permission
feature.pg. gateway.edit - Where
- Payment Gateway › Payment Gateways
On this page
The Razorpay add-on lets your Laramin take payments through your own Razorpay account. It has no screen of its own: you set it up on the Razorpay gateway in Payment Gateway.
Before you start
- Install and turn on three add-ons: Payment Gateway, Billing and Razorpay. In Addons › Addon Management, Razorpay is listed as Razorpay. Before Razorpay 1.1.0, or on Laramin earlier than 12.4, it's listed as PgRazorpay. See Upload and install an add-on.
- You need Edit Gateway (
feature.) in Payment Gateway.pg. gateway.edit - Work in the workspace whose Razorpay account this is, not in All Workspaces.
- Sign in to your Razorpay dashboard. You'll copy keys from it and add a webhook to it.
Tip: Start with Razorpay's test keys. No real money moves, and you can try a whole payment before you go live.
Steps
-
In your Laramin, open Payment Gateway › Payment Gateways.
-
Find Razorpay. Its Gateway Type is Automatic. Open its actions menu and select Edit.
-
In the Razorpay dashboard, open Settings › API Keys and generate a key.
-
In your Laramin, paste the key's ID into Key ID. It starts with
rzp_test_for a test key orrzp_live_for a live one. -
Paste the key's secret into Key Secret. Razorpay shows the secret only once, when you generate the key.
-
Copy the Callback URL.
-
In the Razorpay dashboard, open Settings › Webhooks and add a webhook:
- For the webhook's address, paste the Callback URL.
- Enter a secret of your own. Use a long, random value and keep a copy for the next step.
- Choose these events:
payment.,authorized payment.captured,payment.failed,order.paid,refund.processedandrefund.failed. - Save the webhook.
-
In your Laramin, enter the same secret in Webhook Secret.
-
Set Status to Active.
-
Select Save.
You see Gateway Razorpay Updated Successfully!, and Availability shows Ready. Key Secret and Webhook Secret now show Stored.
Careful: Without Webhook Secret, your Laramin can't trust Razorpay's messages, so no Razorpay payment is ever confirmed by them. Payments are then confirmed only by Laramin's own status checks. See How Razorpay payments are confirmed.
Test mode and live mode
There's no test mode switch in your Laramin. The key decides:
- A Key ID starting with
rzp_test_uses Razorpay's test mode. Payments are pretend, and Razorpay's test cards and accounts work. - A Key ID starting with
rzp_live_uses live mode. Real money moves.
Razorpay keeps test mode and live mode apart, each with its own keys and its own webhooks. To go live:
- In the Razorpay dashboard, switch to live mode.
- Generate live API keys, and add a webhook in live mode with the same Callback URL, the same events and a new secret.
- In your Laramin, edit the Razorpay gateway and replace Key ID, Key Secret and Webhook Secret with the live values.
- Select Save.
Your Laramin checks every Razorpay payment with the keys saved at the time. Test payments still waiting when you switch can't be checked with live keys, so let them finish first.
Check the currencies
Payers are offered Razorpay only for a currency that's Active on the gateway's Update Supported Currencies screen and that Razorpay handles. Payment Gateway sets up the Razorpay gateway with INR. See Choose the currencies a gateway accepts.
If the Razorpay gateway isn't there
Payment Gateway sets up the Razorpay gateway when it's installed, but only when your Laramin has exactly one active workspace at that moment. If it isn't on the list, see A gateway isn't offered or won't switch on.
What happens next
Try a payment with a test key. If it stays pending, see Razorpay payments stay pending.
Thanks. That helps us decide what to write next.
Thanks for telling us what was missing.
You already answered for this article today. Thanks.
We got a lot of answers from your network just now. Try again in a few minutes.
We couldn't send that. Check your connection and try again.
Links in this article
Printed from help.laramin.in. The online article may have changed since.