medusa-config.ts, plus two webhook endpoints in the Stripe Dashboard:
Credentials
Full example
medusa-config.ts
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 idstripe, 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 idstripe, so Mercur exposes it as pop_stripe-connect_stripe. The payout module takes exactly one provider.
Account validation
A connected account isactive 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 underplugins, 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
- Activate your Stripe account and complete the Connect platform profile under Settings → Connect.
- Replace every
sk_test_key with itssk_live_counterpart. - Create both webhook endpoints again in live mode, and replace both signing secrets. Test-mode endpoints never receive live events.
- Set
onboarding.returnUrlandonboarding.refreshBaseUrlto your production vendor and API URLs. Stripe rejectshttp://links in live mode. - Set
alerting.technicalEmailand register an email notification provider, so failed operations reach someone. - Check Settings → Stripe: the API key is set and Last webhook updates after the first live event.