/** A Stripe payout (one bank deposit). */ export interface StripePayout { id: string; amount: number; currency: string; created: number; arrival_date: number; status: string; } /** A Stripe charge object (the `source` of a charge balance transaction, expanded). */ export interface StripeCharge { id: string; amount: number; currency: string; description: string | null; receipt_email: string | null; billing_details?: { name: string | null; email: string | null; phone?: string | null; address?: { line1?: string | null; line2?: string | null; city?: string | null; state?: string | null; postal_code?: string | null; country?: string | null; } | null; }; customer?: string | null; invoice?: string | null; metadata?: Record; } /** A Stripe balance transaction. `source` is expanded to the underlying object. */ export interface StripeBalanceTransaction { id: string; type: string; amount: number; fee: number; net: number; currency: string; created: number; source: StripeCharge | { id: string; } | string | null; } /** One ticket charge, normalized for booking. */ export interface ChargeItem { chargeId: string; grossMinor: number; stripeFeeMinor: number; netMinor: number; created: number; currency: string; buyerName: string | null; buyerEmail: string | null; billing: { address: string; city: string; county: string; postalCode: string; phone: string; country: string; }; description: string | null; stripeTaxMinor: number | null; invoiceNoHint: string | null; customerId: string | null; invoiceId: string | null; companyName: string | null; vatId: string | null; } /** A payout's transactions classified into booking buckets. All amounts minor units. */ export interface PayoutBatch { payout: StripePayout; charges: ChargeItem[]; applicationFeesMinor: number; refundsMinor: number; otherFeesMinor: number; currency: string; } /** The account/VAT mapping loaded from stripe-map.json. */ export interface StripeMap { currency: string; stripeAccount?: string; cutoffDate: string; accounts: { revenue: string; vatPayable?: string; stripeFees: string; platformFees: string; refunds: string; clearing: string; }; vat: { rate: number; code: string; }; vatTimezone?: string; revenueMemo?: string; invoiceSeries?: string; arAccount?: string; clearingPaymentMethod?: string; }