Files
dezky/apps/operator/server/api/billing/tenants/[slug]/invoices.get.ts
T
Ronni Baslund 0e1d2fb0d1 feat(billing): Stripe-backed billing engine (dark-launched)
Add a lazy/guarded Stripe client (boots without keys), Invoice/Payout schemas, per-currency Price.stripePriceIds, and a BillingService deriving partner/platform summaries, invoices and a partner-cut payout ledger. Partner and operator billing controllers plus a signature-verified Stripe webhook (Fastify raw body). Frontend: partner and operator billing pages and the operator tenant billing/audit tabs on real data. Gated behind new_billing_engine and BILLING_STRIPE_ENABLED; live money paths stay off until keys are set.
2026-05-30 08:03:23 +02:00

8 lines
302 B
TypeScript

import { platformApi } from '~~/server/utils/platform-api'
// Invoices for a single tenant (tenant-detail billing tab). Operator-only.
export default defineEventHandler(async (event) => {
const slug = getRouterParam(event, 'slug')
return platformApi(event, `/billing/tenants/${slug}/invoices`)
})