/** * Stripe Payment Gateway Implementation * * Implements BillingGateway interface for Stripe. * Wraps Stripe SDK types into provider-agnostic result types. * * P2: Stripe Integration */ import Stripe from 'stripe'; import type { BillingGateway } from './interface'; import type { CheckoutSessionResult, PortalSessionResult, SubscriptionResult, CustomerResult, WebhookEventResult, CreateCheckoutParams, CreatePortalParams, CreateCustomerParams, UpdateSubscriptionParams, CreateOneTimeCheckoutParams } from './types'; /** * Lazy accessor for the shared Stripe SDK client. Returns the same instance on * every call. Throws if STRIPE_SECRET_KEY is not configured. * * Exported so theme code can reach the SDK directly for the few cases the * BillingGateway interface does not cover (e.g. updating subscription * `quantity`, which is not part of UpdateSubscriptionParams). Prefer the * BillingGateway interface for everything it already exposes. */ export declare function getStripeInstance(): Stripe; /** * Stripe implementation of the BillingGateway interface. * Maps Stripe SDK types to provider-agnostic result types. */ export declare class StripeGateway implements BillingGateway { createCheckoutSession(params: CreateCheckoutParams): Promise; createOneTimeCheckout(params: CreateOneTimeCheckoutParams): Promise; createPortalSession(params: CreatePortalParams): Promise; verifyWebhookSignature(payload: string | Buffer, signatureOrHeaders: string | Record): WebhookEventResult; getCustomer(customerId: string): Promise; createCustomer(params: CreateCustomerParams): Promise; updateSubscriptionPlan(params: UpdateSubscriptionParams): Promise; cancelSubscriptionAtPeriodEnd(subscriptionId: string): Promise; cancelSubscriptionImmediately(subscriptionId: string): Promise; getProviderName(): string; getResourceHintDomains(): { preconnect: string[]; dnsPrefetch: string[]; }; getSubscriptionDashboardUrl(externalSubscriptionId: string | null | undefined): string | null; reactivateSubscription(subscriptionId: string): Promise; } //# sourceMappingURL=stripe.d.ts.map