28 lines
712 B
TypeScript
28 lines
712 B
TypeScript
import type { Checkout, Invoice, PaymentFailureCode } from "@autumn/shared";
|
|
import type Stripe from "stripe";
|
|
|
|
export interface StripeBillingPlanResult {
|
|
deferred?: boolean;
|
|
stripeInvoice?: Stripe.Invoice;
|
|
stripeSubscription?: Stripe.Subscription;
|
|
stripeCheckoutSession?:
|
|
| Stripe.Checkout.Session
|
|
| (Pick<Stripe.Checkout.Session, "id"> & { url?: string | null });
|
|
stripeInvoiceItems?: Stripe.InvoiceItem[];
|
|
stripeRefund?: Stripe.Refund;
|
|
requiredAction?: {
|
|
code: PaymentFailureCode;
|
|
reason: string;
|
|
};
|
|
autumnInvoice?: Invoice;
|
|
}
|
|
|
|
export interface AutumnBillingResult {
|
|
checkout?: Checkout;
|
|
}
|
|
|
|
export interface BillingResult {
|
|
stripe: StripeBillingPlanResult;
|
|
autumn?: AutumnBillingResult;
|
|
}
|