GET /admin/monetization/platform-fees returns a revenue rollup of every droplinked-monetized transaction in the requested window, aggregated by PSP / merchant / day. Operators use it to answer: “how much is droplinked actually earning, and from which surfaces?”
P1 of the Monetization Pillar. This endpoint is the operator’s primary visibility into droplinked revenue across the trust + commerce stack. The merchant-facing billing history endpoint (P2) ships separately so the read paths stay cleanly scoped per audience.
When to use this
- The operator wants a real-time snapshot of droplinked revenue across all PSPs
- A finance review needs the gross / fees / net split per merchant or per PSP
- An ops investigation needs to confirm the fee_breakdown projector is healthy (
degraded: false)
Authentication
JwtAuthGuard + SuperAdminGuard. A non-admin JWT returns 403.
Request
Curl example
Response (200)
Field reference
Money fields are decimal USD (NOT cents)
Unlike the abandoned-cart list endpoint (which serializes integer minor units), this endpoint returns all USD values as decimals. This matches the canonicalunified_transactions collection’s persisted shape — the projector’s contract (ProjectionInputDto) is explicit: “decimal, NOT minor units (canonical schema convention).”
Clients pass values straight into Intl.NumberFormat({ style: 'currency', currency: 'USD' }) without dividing by 100.
Fail-open posture
A row with a malformedfee_breakdown is NOT a 500. The service emits a partialErrors entry naming the offending row’s PSP transaction id; the response still ships the rollup across the rows that succeeded. degraded: true lets the UI render a visible “showing partial data” badge.
This matches the broader Stripe Head of Platform fail-open backbone discipline — never crash a read path on a single bad row. UI consumers should always check degraded and surface it to the operator.
Group-by behaviors
Error responses
Architecture notes
- Reads canonical
unified_transactionscollection via Mongoose connection — no new schema introduced (every field already projected at PSP-webhook landing time). - Sums use banker’s rounding to 2 decimals (Stripe Billing Head of Product discipline).
completedstatus only —pending/failed/chargeback/refundedrows excluded. Refund + chargeback rollups will surface as separate slices in P2 follow-ups (Stripe Billing convention: refund / chargeback paths are first-class, never an exception path).- Coinbase is excluded from the providers enum per the Coinbase sunset memo.
Related
- Abandoned cart recovery (public) — sister fees mechanic on the recovery side
- Order lifecycle — chokepoint that flips a row to
completed - KPI dashboard (admin) — sibling operator-visibility surface
- PSP health (admin) — sibling per-PSP operator surface