Introduction

Mercur uses Stripe as the default payment and payout provider. The integration enables secure payment processing, automatic payouts to sellers, and commission handling for marketplace transactions.

Setup

To use Stripe with Mercur, you’ll need to:

  1. Create a Stripe account at stripe.com
  2. Enable Stripe Connect in your Stripe Dashboard
  3. Obtain your API keys from the Stripe Dashboard
  4. Add the following environment variables to your .env file:
STRIPE_SECRET_KEY=your_secret_key_here
STRIPE_WEBHOOK_SECRET=your_webhook_secret_here

Stripe Connect Configuration

Enable Stripe Connect:

  • Go to your Stripe Dashboard
  • Navigate to Settings > Connect settings
  • Enable Connect and configure your account settings
  • Set up your Connect branding and terms of service

Seller Onboarding

Sellers need to complete the Stripe Connect onboarding process to receive payouts:

  1. Create Payout Account:

    • Sellers create a payout account through the vendor panel
    • System generates a Stripe Connect onboarding link
    • Sellers complete the onboarding process
  2. Onboarding Flow:

Commission Setup

Configure commission rates in the admin panel. Marketplace commission is deducted from payout amount.

  1. Commission Types:

    • Percentage-based: Set a percentage of the order total
    • Flat rate: Set a fixed amount per order
  2. Commission Rules:

    • Set different rates for different product types
    • Configure rates per seller
    • Set category-specific rates
    • Define global default rates

Testing

Test Cards:

Success: 4242 4242 4242 4242
Decline: 4000 0000 0000 0002

Additional Resources