Spree Commerce
Spree Commerce
Quickstart
Start building awesome eCommerce applications with Spree open-source eg. multi-store, multi-vendor, multi-tenant, multi-language, multi-currency. B2B or B2C.

Getting Started with Spree Commerce
Welcome to the Spree Commerce open-source eCommerce documentation guide. Follow the instructions below to learn how to build and deploy your Spree Commerce store.
1. Installing Spree
2. Exploring Your Store
Feel free to explore your store. You can do so because Spree comes with a default pre-built Storefront and Admin Panel.
All Done!
Congrats! You’ve set up your Spree Commerce and it’s looking amazing!
Give Spree a GitHub Star, why dont’t ya? Thank you for supporting Spree open-source!
Need support or want to give some feedback? Join our community with 6000+ members or drop us an email at hello@spreecommerce.org.
Spree Commerce
Spree Commerce
https://spreecommerce.org/docs/developer/core-concepts/payments
https://github.com/activemerchant/active_merchant#supported-payment-gateways
Adding your custom Payment Method
In order to make your own custom Payment Method show up on the backend list of available payment methods, you need to add it to the spree config list of payment methods first.
Firstly create a new model inheriting from Spree::PaymentMethod
in your app/models
directory:
Next, add your custom gateway to the list of available payment methods in config/initializers/spree.rb
:
Spree Braintree Vzero is a good example of a standalone custom gateway.
Payment Method visibility
We’ve mentioned before that a PaymentMethod
can have a display_on
attribute. This attribute can have the following values: front
, back
, or both
. For more granular control which Payment Methods should be available in which Store, you can override the available_for_store?
method in your PaymentMethod
subclass.
Above code will make the payment method available only for stores that support the EUR currency.
If you want more control you can specify available_for_order?
method to control Payment Method visibility for specific Order, eg.
This code will make the payment method available only for orders with a total greater than 100 and currency USD.