The project is in a healthy, maintained state
Seamless Razorpay checkout integration for Spree Commerce 5.x stores.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

razorpay

Razorpay Extension for Spree Commerce v5

RazorPay is the only payments solution in India that allows businesses to accept, process and disburse payments with its product suite.

Installation

  1. Add Gem:

    bundle add spree_razorpay_checkout
  2. Install the Gem:

    bundle exec rails g spree_razorpay_checkout:install
  3. Compile Assets (Optional):

    bin/rails assets:precompile
  4. Start Server:

     foreman start -f Procfile.dev

Installation (Traditional)

  1. Add this to your Gemfile with this line:

    gem 'spree_razorpay_checkout'
  2. Install the Gem using Bundle Install:

    bundle install
  3. Copy & Run Migrations:

    bundle exec rails g spree_razorpay_checkout:install
  4. Compile Assests for Proper Images & JS loading:

    RAILS_ENV=development bin/rails assets:precompile
  5. Start Server:

    foreman start -f Procfile.dev

Installation (For Docker)

  1. Add Gem using docker compose:

    docker compose run web bundle add spree_razorpay_checkout
  2. Install the Gem using Docker's Bundle Install:

    docker compose run web bundle exec rails g spree_razorpay_checkout:install
  3. Compile Assests for Razorpay logo & assets (Recommended):

    docker compose run web bundle exec rails assets:precompile
  4. Re-Start Server (Recommended):

    docker compose down
    docker compose up -d

Plugin Configuration

  1. Get keys from Razorpay Dashboard here.

    razorpay dashboard
  2. Make Sure to include both Razorpay Live & Test Keys from Razorpay Dashboard:

Admin Dashboard - Razorpay Plugin
  1. Drag Razorpay to Top in Payment Methods to make it Default:
Payment Methods - Razorpay Plugin

Checkout View

  1. Checkout Page:
Razorpay Checkout Page
  1. Razorpay Modal to Capture Payments:
Razorpay Modal
  1. Order Page (Customer View):
Razorpay in Order Page Client
  1. Order Page (Admin View):
Admin Orders Page Razorpay

Thankyou for supporting this plugin. if you find any issues related to plugin you are open to contribute and support which can help more Spree users in India.

Gem Info


Uninstallation

  1. Uninstall Gem:

    gem uninstall spree_razorpay_checkout
    gem uninstall razorpay
  2. Update Gemfile:

    bundle install
  3. Remove Migrations:

    rm db/migrate/*_create_spree_razorpay_checkouts.spree_razorpay_checkout.rb
  4. Open Rails Console:

     rails c 
  5. Drop Razorpay Database:

     ActiveRecord::Base.connection.drop_table(:spree_razorpay_checkouts)
  6. Check Razorpay (You should see "nill"):

     defined?(Razorpay) # => nil  

Note: If you see "nill" then Razorpay is completely uninstalled from Spree commerce, either if you see "constant" try "gem uninstall razorpay" & "bundle update".

Contributing

Contributions are welcome! Please open issues or submit pull requests to help improve this plugin for the Spree + Razorpay community in India.