Connect Razorpay with Grigora Commerce

Connecting Razorpay to Grigora Commerce allows your store to accept online payments through Razorpay during checkout. Before connecting the gateway, make sure you have an active Razorpay account and access to the required API credentials. Razorpay provides separate API keys for test and live modes, so use the credentials that correspond to the environment you want to configure.

Open Payment Settings

Step 1: Open the payment setup

From the Grigora dashboard, expand Commerce and open the payment setup option. You can also use the Set up payments option shown in the payment gateway setup notification when payments have not yet been configured.

The payment setup screen allows you to connect a supported checkout provider for your store.

Select Razorpay

Step 2: Select Razorpay as the payment provider

From the available payment providers, select Razorpay.

Razorpay will be used as the payment gateway for processing customer payments made through your store's checkout.

image.png

Get Razorpay API Credentials

Step 3: Generate or retrieve your Razorpay API keys

Log in to your Razorpay Dashboard and open the API key section. Generate or retrieve the API credentials required for the integration.

For this documentation, we use Test API keys to demonstrate the setup and verify the payment flow safely without processing real payments. Razorpay provides separate Test and Live API keys. When your store is ready to accept real payments, switch to the Live mode and use your live API credentials.

Keep your API credentials secure. Never expose your Key Secret in publicly accessible code, documentation, screenshots, or client-side applications.

image.png

Add Razorpay Credentials to Grigora

Step 4: Enter the Razorpay credentials and configure the webhook

Return to Grigora and click Razorpay from the available payment gateway options. A configuration modal will open with fields for Key ID, Key secret, and Webhook secret.

  1. Enter your Razorpay Key ID and Key secret in the corresponding fields.

  2. In the same modal, locate the Razorpay Webhook URL displayed below the credential fields and click Copy to copy it.

  3. Open your Razorpay Dashboard and go to Account & Settings → Webhooks.

  4. Create a new webhook and paste the copied Grigora Webhook URL into the webhook URL field.

  5. Set a Webhook Secret in Razorpay and configure the required webhook events.

  6. Copy the Webhook Secret from Razorpay and return to the Grigora configuration modal.

  7. Paste the same value into the Webhook secret field.

For this documentation, use Test Mode Razorpay credentials. If you are configuring a live store, use the corresponding Live Mode credentials and webhook configuration.

image.png

Connect Razorpay

Step 5: Configure and save the Razorpay payment gateway

From the payment gateway options, click Razorpay. A configuration popup will open where you can enter the required Key ID, Key secret, and Webhook secret.

After entering the credentials, review the configuration and click Primary provider to save the Razorpay configuration and set Razorpay as the primary payment gateway for your Commerce checkout.

image.png

Verify the Connection

Step 6: Confirm that Razorpay is connected

Save and Verify the Razorpay Configuration

Step 5: Save the Razorpay payment configuration

After entering the Razorpay credentials and clicking Primary provider in the Razorpay configuration modal, the selection is not saved automatically.

On the Payments settings page, verify that Razorpay is selected as the Primary provider and that the appropriate Mode is selected, such as Test mode. Then click Save settings to save the payment gateway configuration.

After saving, verify that Razorpay is shown as the configured payment provider and that the previous payment setup warning is no longer displayed.

If you configured Razorpay using Test Mode credentials, complete a test checkout to verify that the payment flow works correctly before switching to live credentials. Once testing is successful, replace the test credentials with the appropriate Live Mode credentials to accept real payments.

image.png


Was this article helpful?