Mayson Monorepo Documentation
    Preparing search index...
    interface SubscriptionDetails {
        billing_cycle_anchor?:
            | number
            | Stripe.InvoiceCreatePreviewParams.SubscriptionDetails.BillingCycleAnchor;
        billing_mode?: Stripe.InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode;
        cancel_at?: Emptyable<
            number
            | Stripe.InvoiceCreatePreviewParams.SubscriptionDetails.CancelAt,
        >;
        cancel_at_period_end?: boolean;
        cancel_now?: boolean;
        default_tax_rates?: Emptyable<string[]>;
        items?: Stripe.InvoiceCreatePreviewParams.SubscriptionDetails.Item[];
        proration_behavior?: Stripe.InvoiceCreatePreviewParams.SubscriptionDetails.ProrationBehavior;
        proration_date?: number;
        resume_at?: "now";
        start_date?: number;
        trial_end?: number | "now";
    }
    Index

    Properties

    billing_cycle_anchor?:
        | number
        | Stripe.InvoiceCreatePreviewParams.SubscriptionDetails.BillingCycleAnchor

    For new subscriptions, a future timestamp to anchor the subscription's billing cycle. This is used to determine the date of the first full invoice, and, for plans with month or year intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to now or unchanged.

    Controls how prorations and invoices for subscriptions are calculated and orchestrated.

    A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using proration_behavior. If set during a future period, this will always cause a proration for that period.

    cancel_at_period_end?: boolean

    Indicate whether this subscription should cancel at the end of the current period (current_period_end). Defaults to false.

    cancel_now?: boolean

    This simulates the subscription being canceled or expired immediately.

    default_tax_rates?: Emptyable<string[]>

    If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have tax_rates set.

    A list of up to 20 subscription items, each with an attached price.

    Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item's quantity changes. The default value is create_prorations.

    proration_date?: number

    If previewing an update to a subscription, and doing proration, subscription_details.proration_date forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, subscription, and one of subscription_details.items, or subscription_details.trial_end are required. Also, subscription_details.proration_behavior cannot be set to 'none'.

    resume_at?: "now"

    For paused subscriptions, setting subscription_details.resume_at to now will preview the invoice that will be generated if the subscription is resumed.

    start_date?: number

    Date a subscription is intended to start (can be future or past).

    trial_end?: number | "now"

    If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of subscription_details.items or subscription is required.