Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
---
title: "Connect Razorpay payments to Spree Commerce"
sidebarTitle: Razorpay
description: "Configure the Razorpay payment gateway in Spree to accept cards, UPI, net banking, and wallets, plus international transactions across multiple currencies."
---
Razorpay is a secure payment gateway that enables businesses to accept online payments via cards, UPI, net banking, and wallets. It also supports international transactions across multiple currencies.
<Info>
Razorpay integration is maintained and developed by [Umesh Ravani](https://github.com/umeshravani).
To support this development, please star the [GitHub repository](https://github.com/umeshravani/spree_razorpay) ❤️
</Info>
## Installation
Before you can enable Razorpay, it must be installed. To do so, you need to run the following command:
<CodeGroup>
```bash Spree CLI (Docker)
spree add --gem spree_razorpay_checkout
```
```bash Without Spree CLI
bundle add spree_razorpay_checkout && bin/rails g spree_razorpay_checkout:install
```
</CodeGroup>
After that, you need to make sure to restart the server.
## Connect Razorpay
Sign in to your Spree admin dashboard and navigate to **Settings → Payments**.

Find Razorpay under Available Payment Methods and click **Add**.
This will redirect you to the Razorpay setup form.

You will need Key and Key Secret from your [Razorpay dashboard credentials page](https://dashboard.razorpay.com/app/website-app-settings/api-keys).
<Tip>
To get your credentials, Navigate to Account & Settings → API Keys (under Website and app settings) → Generate new key to generate key for the selected mode.
</Tip>

You should see your live and test credentials. Copy both API key into `Key` and Secret into `Key Secret`, also Test API key into `Test Key` and Test Key Secret into `Test Key Secret`
If you wish to test the Razorpay payments before going live, just select `Test Mode` option in Spree.
Click **Create** to enable Razorpay as a payment method on your store.