Skip to main content
Use Mercur to control how each seller is onboarded and settled, while the payment provider handles KYC. Settlement you control is the Payout domain. Once an order is placed and fulfilled, it splits each seller’s share out to their own connected account, so funds are settled per seller rather than pooled. The seller’s share is the order total minus commission. Onboarding is provider-driven, with the payment provider carrying KYC, and the domain ships with a pluggable provider interface and a Stripe Connect implementation out of the box. It also runs a fully automated capture-and-transfer pipeline driven by scheduled jobs and provider webhooks.
Provider-agnostic. The module talks to exactly one registered payout provider through a single interface. Stripe Connect ships by default; any other processor is a drop-in implementation of the same IPayoutProvider contract.

Key features

  • Pluggable provider interface: one IPayoutProvider contract, with Stripe Connect included.
  • Payout accounts and onboarding: a per-seller account plus a provider onboarding record.
  • Webhook-driven lifecycle: account status (PENDINGACTIVERESTRICTED / REJECTED) tracks the provider.
  • Automated pipeline: a capture-check job, payment capture, a daily payout job, and transfer, with no manual steps.
  • Commission-aware transfers: each payout is the order total minus its commission lines.
  • Tunable timing: authorization window, seller-action window, capture buffer, and required fulfillment status.

Get started

Learn how the domain fits together.

Accounts & onboarding

The payout account, its onboarding record, and provider data.

Account lifecycle

Statuses and the webhook-driven transitions between them.

The payout pipeline

Capture check, capture, daily payout, transfer, and the provider interface.

Examples

Build against the Payout domain in your own code.

Create a payout account

Run createPayoutAccountWorkflow for a seller.

Start onboarding

Kick off provider onboarding with createOnboardingWorkflow.

Process a webhook

Turn a provider webhook into account and payout status updates.

Resources

Data models, workflows, service methods, and events for the Payout domain.

Data models

The PayoutAccount, Onboarding, and Payout entities.

Links

How the Payout domain links to sellers and orders.

Workflows

Account, onboarding, payout, and webhook workflows.

Service

Module service methods for working with records directly.

Events

Events that drive the payout pipeline.