Skip to main content
The integration is configured in four places in medusa-config.ts, plus two webhook endpoints in the Stripe Dashboard:

Credentials

Full example

medusa-config.ts
Run bunx medusa db:migrate after adding the plugin. It creates the plugin’s stripe_connector tables. Then add pp_stripe-connector_stripe to the payment providers of every region that sells through Stripe, under Settings → Regions.

Payment provider

Registered with the id stripe, so Medusa exposes it as pp_stripe-connector_stripe. Capture is always manual. The plugin’s capture job decides when to capture, so there’s no capture option.

Payout provider

Registered with the id stripe, so Mercur exposes it as pop_stripe-connect_stripe. The payout module takes exactly one provider.

Account validation

A connected account is active when every enabled check passes. An account that fails a check after submitting its details is restricted, and one Stripe rejected is rejected.
manualPayouts only applies to accounts the provider creates from then on. To move existing accounts to a manual schedule, update their payout settings in Stripe.

Payout module

These options belong to @mercurjs/core/modules/payout and apply to any provider.

Plugin

These go on the plugin entry under plugins, typed by StripeConnectorPluginOptions from @mercurjs/stripe-connector-plugin/types.

Credentials

Onboarding

Capture

Payouts and reversals

Settlements

Notifications and alerts

Alert emails go through Medusa’s notification module on the email channel, so register a notification provider for that channel to receive them.

Webhooks

Create two endpoints under Developers → Webhooks in the Stripe Dashboard. Settings → Stripe in the admin prints both URLs for your deployment. Paste the first endpoint’s signing secret into the payment provider’s webhookSecret, and the second’s into the payout provider’s and the plugin’s webhookSecret. Both endpoints verify the stripe-signature header against the raw body. An event with a bad signature is logged and ignored.

Go live

  1. Activate your Stripe account and complete the Connect platform profile under Settings → Connect.
  2. Replace every sk_test_ key with its sk_live_ counterpart.
  3. Create both webhook endpoints again in live mode, and replace both signing secrets. Test-mode endpoints never receive live events.
  4. Set onboarding.returnUrl and onboarding.refreshBaseUrl to your production vendor and API URLs. Stripe rejects http:// links in live mode.
  5. Set alerting.technicalEmail and register an email notification provider, so failed operations reach someone.
  6. Check Settings → Stripe: the API key is set and Last webhook updates after the first live event.
Payout accounts created with test keys point at test-mode connected accounts, which live keys can’t reach. Start production on a fresh database, or remove those payout accounts so sellers onboard again in live mode.