/** Matches backend `CreateCheckoutRequest` / `SubscriptionCheckoutOrchestrator.normalizeVendor`. */ export type PaymentGatewayId = 'stripe' | 'razorpay'; export interface CreateCheckoutSessionPayload { planId: number; couponCode?: string; /** Sent as `vendor` in the request body (`stripe` or `razorpay`). */ vendor: PaymentGatewayId; } /** Matches backend `com.induseuro.payment.dto.stripe.CreateCheckoutResponse`. */ export interface CreateCheckoutSessionResult { url: string; sessionId?: string; } /** Matches backend `com.induseuro.payment.dto.CheckoutStatusResponse`. */ export interface CheckoutStatusResponse { sessionId?: string; paymentStatus?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'REFUNDED' | string; subscriptionStatus?: 'INCOMPLETE' | 'TRIALING' | 'ACTIVE' | 'PAST_DUE' | 'CANCELED' | 'UNPAID' | string; subscriptionId?: number; planName?: string; /** ISO date string (`LocalDate` from API). */ trialEnd?: string; active?: boolean; } /** Matches backend `com.induseuro.payment.dto.stripe.PortalSessionResponse`. */ export interface PortalSessionResult { url: string; } /** Row from `GET /api/v1/payments/payment-history`. */ export interface PaymentHistoryItem { id: number; amount?: number; currency?: string; status?: 'PENDING' | 'COMPLETED' | 'FAILED' | 'REFUNDED' | string; vendor?: PaymentGatewayId | string; description?: string; createdAt?: string; subscriptionId?: number; } /** Current user subscription (`GET /api/v1/payments/subscription` — override path if your app differs). */ export interface SubscriptionView { id?: number; status?: 'INCOMPLETE' | 'TRIALING' | 'ACTIVE' | 'PAST_DUE' | 'CANCELED' | 'UNPAID' | string; planName?: string; vendor?: PaymentGatewayId | string; trialEnd?: string; currentPeriodEnd?: string; cancelAtPeriodEnd?: boolean; } /** Commerce order (`GET /api/commerce/orders` — override path if your app differs). */ export interface CommerceOrderView { id: number; orderKind?: 'SUBSCRIPTION_INITIAL' | 'SUBSCRIPTION_CYCLE' | 'ONE_OFF' | string; amount?: number; currency?: string; status?: string; createdAt?: string; corePaymentId?: number; } /** Invoice from `GET /api/commerce/invoices` (includes linked order fields when present). */ export interface CommerceInvoiceView { id: number; invoiceNumber?: string; /** Stripe hosted invoice page (view in browser). */ hostedInvoiceUrl?: string; /** Direct PDF URL when the backend exposes Stripe `invoice_pdf` or similar. */ invoicePdfUrl?: string; pdfUrl?: string; downloadUrl?: string; amount?: number; currency?: string; orderKind?: 'SUBSCRIPTION_INITIAL' | 'SUBSCRIPTION_CYCLE' | 'ONE_OFF' | string; orderId?: number; createdAt?: string; status?: string; } //# sourceMappingURL=payment.d.ts.map