Skip to content

Statements & payouts

How sales become money owed, and money owed becomes a payout.

The flow

placed orders → purchase orders (per seller, commission snapshotted)
   ▼  marketplace:statement:generate  (closed date interval)
flyokai_statement  (+ flyokai_statement_line)   open
   ▼  close
flyokai_statement   closed   ← frozen
   ▼  marketplace:payout:execute
flyokai_payout   pending → executing → completed

Statements

A statement rolls a seller's purchase orders over a closed-interval date range into a single payable figure. Each statement carries lines (flyokai_statement_line) tracing back to the contributing POs, plus totals:

  • total sales — gross over the period,
  • total commission — what the platform keeps (from the per-PO snapshots),
  • payout amount — what the seller is owed.

Generate one with:

php bin/console marketplace:statement:generate \
    --seller <id> --from 2026-05-01 --to 2026-05-31

(Run per seller or across all sellers, depending on options.) Results show up in the Finance admin and in the seller's portal under /flyok-portal/sellers/me/statements.

Commission & fees are snapshotted

The numbers come from the PO-line snapshots taken at order placement, not from current config. Changing defaultCommissionPercent or a product's commission does not retroactively change a statement for orders already placed. This is what makes statements reproducible and auditable. See Domain model → Commission & fees.

Shipping in the payout

If includeShippingInPayout is on, the shipping a seller collected is added back into their payout (payout += shipping). If off (default), the platform retains shipping and hides it from statements. The flag is applied when a statement is generated or recomputed:

Statement state Effect of changing the flag
open Recompute the statement to pick up the new value.
closed / paid Frozen — unaffected.

Open vs closed

  • open — can be recomputed (e.g. after a config change or a late PO).
  • closed — finalised; the input for a payout.
  • paid — a payout has completed against it.

Payouts

A payout moves money to a seller against a closed statement, carrying the bank details snapshotted from the seller's flyokai_seller_payout_config (holder, IBAN, SWIFT).

php bin/console marketplace:payout:execute --statement <id>

Status runs pending → executing → completed. Execution is the integration seam: out of the box it records the movement and marks the statement paid. Wire your PSP, bank-file export or accounting hook into the execute step to actually disburse.

Sellers track their payouts in the portal under /flyok-portal/sellers/me/payouts; operators see the full history in the Payouts admin.

Putting it together (month close)

# 1. Close the books for May, per seller (or all sellers)
php bin/console marketplace:statement:generate --from 2026-05-01 --to 2026-05-31

# 2. Review in admin → Finance → Statements, close them

# 3. Pay
php bin/console marketplace:payout:execute --statement <id>
  • Configuration → Marketplace statementsincludeShippingInPayout.
  • CLImarketplace:statement:generate, marketplace:payout:execute.
  • Under Remote, statement generation and payout execution run on the cluster — heavy finance writes no longer block storefront traffic.