@bates-solutions/stripe API Reference - v2.2.1
    Preparing search index...

    Interface NormalizedSubscription

    A normalized subscription with a stable shape across Stripe API versions.

    Notably, currentPeriodStart / currentPeriodEnd are surfaced as JS Dates regardless of whether the pinned API version puts current_period_* on the subscription (older) or on the subscription item (newer) — the wrapper reads from the item first and falls back to the subscription.

    interface NormalizedSubscription {
        cancelAtPeriodEnd: boolean;
        canceledAt?: Date;
        currentPeriodEnd?: Date;
        currentPeriodStart?: Date;
        customerId?: string;
        id: string;
        items: NormalizedSubscriptionItem[];
        priceId?: string;
        quantity?: number;
        raw: Subscription;
        status: Status;
        trialEnd?: Date;
    }
    Index
    cancelAtPeriodEnd: boolean
    canceledAt?: Date
    currentPeriodEnd?: Date
    currentPeriodStart?: Date
    customerId?: string
    id: string
    priceId?: string

    Price ID of the first item — the common single-item case

    quantity?: number

    Quantity of the first item

    raw: Subscription

    The raw Stripe subscription, for anything not normalized here

    status: Status
    trialEnd?: Date