import type Stripe from "stripe"; export interface BillingService { checkoutSessionIsPaid(paymentId: string): Promise; handleSubscriptionCancel(subscriptionId: string): Promise; handleSubscriptionCreation(subscriptionId: string): Promise; handleSubscriptionUpdate(args: { subscriptionId: string; subscriptionItemId: string; membershipCount: number; }): Promise; handleEndTrial(subscriptionId: string): Promise; // Customer management createCustomer(args: { email: string; metadata?: Record; }): Promise<{ stripeCustomerId: string }>; createPaymentIntent(args: { customerId: string; amount: number; metadata?: Record; }): Promise<{ id: string; client_secret: string | null }>; // Subscription management createSubscriptionCheckout(args: { customerId: string; successUrl: string; cancelUrl: string; priceId: string; quantity: number; metadata?: Record; mode?: "subscription" | "setup" | "payment"; allowPromotionCodes?: boolean; customerUpdate?: { address?: "auto" | "never"; }; automaticTax?: { enabled: boolean; }; discounts?: Array<{ coupon: string; }>; subscriptionData?: { metadata?: Record; trial_period_days?: number; }; }): Promise<{ checkoutUrl: string | null; sessionId: string }>; // Price management createPrice(args: { amount: number; currency: string; interval: "month" | "year"; nickname?: string; productId: string; metadata?: Record; }): Promise<{ priceId: string }>; getPrice(priceId: string): Promise; getSubscriptionStatus(subscriptionId: string): Promise; getCheckoutSession(checkoutSessionId: string): Promise; getCustomer(customerId: string): Promise; getSubscriptions(customerId: string): Promise; updateCustomer(args: { customerId: string; email: string; userId?: number }): Promise; }