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 Stripe payments to Spree Commerce"
sidebarTitle: Stripe
description: "Set up Spree's native Stripe integration to accept cards and alternative payment methods, and pay marketplace sellers through Stripe Connect."
---
Stripe is a widely used payment processor that enables secure and seamless transactions for online businesses. It supports multiple payment methods, automates payouts, and ensures a smooth checkout experience for customers.
<Tip>Running a marketplace? The same Stripe account pays your sellers through [Stripe Connect](/integrations/payments/stripe-connect).</Tip>
## Installation
Before you can enable Stripe, it must be installed. To do so, you need to run the following command:
<CodeGroup>
```bash Spree CLI (Docker)
spree add stripe
```
```ruby Without Spree CLI
# server/Gemfile — use the same version requirement as your `spree` gem, then run `bundle install`
gem 'spree_stripe', '>= 6.0.0'
```
</CodeGroup>
The Spree CLI restarts the server for you. Without it, restart the server yourself.
<Note>New Spree projects include Stripe already, so you can skip this step.</Note>
## Connect Stripe
Sign in to your Spree admin dashboard and navigate to **Settings → Payments**.

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

Simply copy and paste the **Publishable Key** and **Secret Key** from your Stripe dashboard into their respective fields and click **Create** to enable Stripe as a payment method on your store.
<Note>
The **Publishable Key** and **Secret Key** can be found in the Get Started section of the Home screen in your Stripe dashboard. Alternatively, they can be found out in **Developers → API Keys**.
</Note>

### Additional Settings

You can optionally configure the following settings for your Stripe payment method:
- **Name**: Customize the display name shown for this payment method on the storefront.
- **Display**: Choose where Stripe should be available:
- Storefront only
- Admin panel only
- Both (recommended)
- **Auto Capture**: Decide whether payments should be automatically captured at the time of authorization (recommended), or manually captured later.
- **Active Status**: Enable or disable the payment method. Inactive methods are hidden from checkout but not removed.
### Enable Apple Pay
To enable Apple Pay (including Apple Pay quick checkout) as a payment method, follow these steps:
1. Find ‘payment method domains’ in your Stripe dashboard
2. Click ‘Add new domain’ and enter your store’s domain
3. Click ‘Download file’ and attach it using the ‘Choose file’ button in Spree
4. Click ‘Update’ at the bottom of the page
5. Click ‘Verify’ to verify the file was uploaded correctly
### Test Mode
If you'd like to test your checkout flow without processing real payments, Stripe's test mode is a safe and effective way to simulate transactions. To enable it, simply switch your Stripe dashboard to **Test mode** and paste the corresponding **test API keys** into the payment method settings in Spree.
## Features
Spree’s native Stripe integration supports a wide range of features and payment methods to help you offer a fast, secure, and flexible checkout experience:
- Support for quick checkout using Apple Pay, Google Pay, Stripe Link
- Support for 3D Secure and other security standards
- Support for off-session payments
- Support for Storefront API integration (see the API docs here).
- Accept payments in over 130 currencies
- Accept Credit Cards, Apple Pay, Google Pay, and more
- Accept SEPA Direct Debit payments
- Accept iDEAL payments
- Accept SOFORT payments
- Accept Bancontact payments
- Accept Alipay payments
- Accept WeChat Pay payments
- Accept Afterpay, Klarna, Affirm, and more
- Automatic tax calculation at checkout with Stripe Tax
### Storefront Display
Spree’s Stripe integration enhances the customer experience with dynamic, context-aware payment options across the storefront:
- Installment (BNPL) payments indicator on PDP (Product Detail Page)

- Quick payment options on the cart (Apple Pay, Google Pay, Link)

- Quick payments bypassing checkout 1st step (Apple Pay, Google Pay, Link)

- Various payment options on the payment step (cards, BNPL, Apple Pay, Google Pay, Link)

## Stripe Tax
Stripe Tax lets Spree calculate tax automatically at checkout based on the customer's shipping address, so you don't need to maintain manual rates for every region you sell into. It's only available if Stripe is connected as your payment gateway.
<Note>Before using Stripe Tax, you need to configure your tax nexus (the regions where you're registered to collect tax) in your Stripe dashboard.</Note>
To enable it in Spree:
1. Navigate to **Settings → Tax → Tax Rates** and add a new tax rate.
2. Set the **Calculator** field to **Stripe Tax Calculator**.
3. Make sure any products you want Stripe to calculate tax on are assigned the tax category associated with that rate. You can assign a tax category from the **Tax** section of the product editor.
See [<u>Settings → Tax Rates</u>](/user/settings/tax-rates) for more on configuring tax rates and categories, and [<u>Create a Product</u>](/user/products/creating-products) for details on assigning tax categories.
## Stripe Connect for Marketplaces
Stripe Connect is the payout provider that ships with this integration: each seller onboards to an Express account through Stripe's hosted pages, their share of every order is transferred as it ships, and settlements are confirmed by webhook. Setup and the money flow are on their own page — [Stripe Connect for marketplaces](/integrations/payments/stripe-connect).