import Stripe from 'stripe'; export declare const CREDIT_PACKAGES: { readonly starter: { readonly id: "starter"; readonly name: "Starter Pack"; readonly amountUsd: 10; readonly credits: 100; readonly bonus: 0; readonly description: "$10 → 100 credits"; }; readonly growth: { readonly id: "growth"; readonly name: "Growth Pack"; readonly amountUsd: 50; readonly credits: 550; readonly bonus: 50; readonly description: "$50 → 550 credits (10% bonus)"; }; readonly scale: { readonly id: "scale"; readonly name: "Scale Pack"; readonly amountUsd: 100; readonly credits: 1200; readonly bonus: 200; readonly description: "$100 → 1,200 credits (20% bonus)"; }; }; export type PackageType = keyof typeof CREDIT_PACKAGES; /** * Create a Stripe Checkout Session for credit purchase */ export declare function createCheckoutSession(agentId: string, packageType: PackageType, successUrl: string, cancelUrl: string): Promise<{ sessionId: string; url: string; } | { error: string; }>; /** * Create a Payment Intent for programmatic payment (agent-to-agent) */ export declare function createPaymentIntent(agentId: string, packageType: PackageType): Promise<{ clientSecret: string; paymentIntentId: string; amount: number; } | { error: string; }>; /** * Verify Stripe webhook signature */ export declare function verifyWebhookSignature(payload: string | Buffer, signature: string): Stripe.Event | null; /** * Process webhook event and return credit grant info */ export interface CreditGrant { agentId: string; packageType: string; credits: number; amountUsd: number; stripeSessionId?: string; stripePaymentIntentId?: string; } export declare function processWebhookEvent(event: Stripe.Event): CreditGrant | null; /** * Get Stripe instance (for advanced usage) */ export declare function getStripe(): Stripe | null; export declare const METERED_BILLING: { readonly meterId: "mtr_61UFEGojJ0b2awh1441RtJYK3aJTqS9g"; readonly eventName: "api_call"; readonly priceId: "price_1TL038RtJYK3aJTqODoFAiVT"; readonly productId: "prod_UJdJXIL3CziTRT"; readonly pricePerUnit: 0.01; readonly pricePerCall: 0.002; }; /** * Report API usage to Stripe Meter * Call this after each successful API call */ export declare function reportUsage(customerId: string, calls?: number, idempotencyKey?: string): Promise<{ success: boolean; eventId?: string; error?: string; }>; /** * Create or get a customer in Stripe */ export declare function getOrCreateCustomer(agentId: string, email?: string): Promise<{ customerId: string; } | { error: string; }>; /** * Create a metered subscription for pay-per-call billing */ export declare function createMeteredSubscription(customerId: string, paymentMethodId?: string): Promise<{ subscriptionId: string; status: string; } | { error: string; }>; /** * Create a checkout session for metered billing subscription */ export declare function createMeteredCheckoutSession(agentId: string, successUrl: string, cancelUrl: string): Promise<{ sessionId: string; url: string; } | { error: string; }>; /** * Get usage summary for a subscription */ export declare function getUsageSummary(subscriptionId: string): Promise<{ totalCalls: number; totalCost: number; period: { start: number; end: number; }; } | { error: string; }>; /** * Check if a customer has an active metered subscription */ export declare function hasActiveMeteredSubscription(customerId: string): Promise<{ active: boolean; subscriptionId?: string; }>; //# sourceMappingURL=stripe.d.ts.map