API ReferenceIntegrationsKnowledge Base

Shopify Integration

Shopify is a cloud-based, multi channel ecommerce platform that offers a wide range of customizable features to open your own online store.

Integrating your Shopify store with Razorpay enables you to accept payments via the Razorpay Payment Gateway. You can accept payments via debit card, credit card, netbanking (supports 3D Secure), UPI or through any of our supported wallets.

The plugin offers seamless integration, allowing the customer to pay on your website without being redirected. This allows the plugin to work across all browsers.

Demo Link#

  • To test out the Shopify integration with Razorpay, you can make test purchases (without paying) on our Shopify Test Store.

  • To test out the international currency support on the Shopify integration with Razorpay, you can make test purchases (without paying) on our Shopify International Test Store.


Generate API Key#

You have to generate separate API Keys for the test and live modes. No money is deducted from your account in test mode.

To generate API key:

  1. Log into your Dashboard.
  2. Select the mode for which you want to generate the API key from the menu ribbon.
  3. Navigate to Settings.
  4. Click API Keys.
  5. Click Generate Key to generate key for the selected mode.

The Key Id and Key secret appear in a pop-out window. You also have the option to download the Key Details.

Watch the short animation below for more information.

After generating the keys from the Dashboard, download and save them securely. If you do not remember your API Keys, you need to re-generate it from the Dashboard and replace it wherever required.

Configure your Store to use Razorpay#

To integrate your Shopify Store with Razorpay:

  1. Sign into your Shopify store.
  2. Click the Settings tab, then to the Payments tab and to the Alternative Payments section.
  3. Select Razorpay from the drop down list.

  4. Enter the <key_id> and <key_secret> generated in the previous section.

  5. Click Activate. This activates your account to use Razorpay. Test Mode:
    - To use your store in test mode, replace your configured live Razorpay API key secret pair with the pair generated in test mode. With this, your store payments will be routed to a mocked bank page and no real money will be deducted from the customer's account.
    - You can keep the Test Mode checkbox turned off in Shopify settings, if you see one.

Abandoned Checkouts#

Shopify payments involve redirection of your customer away from your store and to your bank page.

Due to the nature of this payment flow, it is possible that for a small number of your customers, a redirection can fail after successful payment processing on their bank page, but before they are routed back to your store. Such a situation can lead to an abandoned checkout where the customer has in fact been debited, but the order appears as failed on your Shopify store.

Razorpay Dashboard is designed to handle such situations, and constantly verify the actual payment status. To update the order status in your Shopify store as well, as thus reduce the number of abandoned checkout cases, you'll need to set up a webhook. Use the following settings for your live webhook:

Webhook URL

Use https://checkout.razorpay.com/webhooks/shopify?mode=live



Set any random string here as your webhook secret. For security reasons, please do not leave this field blank.

Action Events

✓ : order.paid

With this webhook enabled, the number of abandoned checkout cases where customer is debited will dramatically reduce. If you still observe such cases after this setting is configured, please raise a ticket on Support Portal.