1. Build Integration

Steps to integrate your Drupal Commerce website with the Razorpay Payment Gateway.


Follow the steps below to integrate Razorpay Payment Gateway with your Drupal Commerce website.

  1. .
  2. .
  3. .

Follow the steps given below to upload the plugin:

  1. the Drupal Commerce .zip file.
  2. Log in to your and navigate to Extend.
    Navigate to Extend on Drupal
  3. Click + Add new module.
  4. Add the module from URL or click Choose file and select the .zip file downloaded previously.
  5. Click Continue.
Add/upload drupal .zip file/URL

You have successfully uploaded the plugin.

Handy Tips

Alternatively, you skip this step and simply run composer require 'drupal/drupal_commerce_razorpay:^1.0' in your drupal directory to download the plugin. You can view the downloaded file in the contrib folder.

Follow the steps given below to install the plugin:

  1. On your Drupal Commerce Dashboard, navigate to Extend.
  2. Search for Razorpay in the Filter section.
  3. Select Commerce Razorpay and click Install.
Install drupal plugin

Follow the steps given below to configure the plugin:

  1. On your Drupal Commerce Dashboard, navigate to Commerce.

  2. Click Configuration.

    Navigate to commerce to configure the plugin
  3. In the Payment section, select Payment gateways.

    Configure the payment gateway
  4. Click + Add payment gateway.

    Add the payment gateway
  5. In the Name section, enter Razorpay and select Razorpay as the Plugin.

  6. Select Test Mode to test the integration and enter the test Key ID and Secret generated from the

    .

    Handy Tips

    To go live with the integration and start accepting real payments:

    • Select Live Mode.
    • Generate and replace the test keys with the live keys in the integration. Click Save.
      Switch to live mode
  7. Select the Payment Action based on your requirement. Set the Payment Action to Authorize and Capture to auto-capture payments. If you want to capture payments manually, set the Payment Method to Authorize.

  8. Select Enabled in the Status section.

  9. Click Save.

Configure the Razorpay payment gateway

Handy Tips

If you want to edit any fields, navigate to CommerceConfiguration. Select Payment Gateway and click Edit.

You have successfully integrated the Razorpay Payment Gateway with your Drupal Commerce website.

Handy Tips

  • Webhooks are auto-configured when you enter and submit the API key ID during the installation. You can verify if webhooks are enabled on your .
  • The payment.authorized, payment.failed and refund.created events are auto-configured. You do not have to configure it on the Razorpay Dashboard.

Is this integration guide useful?