Stripe.Params.InvoiceCreatePreviewParams.SubscriptionDetails
(tiger_stripe v0.1.10)
Copy Markdown
View Source
Nested parameters.
Summary
Types
@type t() :: %Stripe.Params.InvoiceCreatePreviewParams.SubscriptionDetails{ billing_cycle_anchor: map() | nil, billing_mode: Stripe.Params.InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.t() | nil, cancel_at: map() | nil, cancel_at_period_end: boolean() | nil, cancel_now: boolean() | nil, default_tax_rates: map() | nil, items: [Stripe.Params.InvoiceCreatePreviewParams.SubscriptionDetails.Items.t()] | nil, proration_behavior: String.t() | nil, proration_date: integer() | nil, resume_at: String.t() | nil, start_date: integer() | nil, trial_end: map() | nil }
billing_cycle_anchor- 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 withmonthoryearintervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set tonoworunchanged.billing_mode- Controls how prorations and invoices for subscriptions are calculated and orchestrated.cancel_at- 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 usingproration_behavior. If set during a future period, this will always cause a proration for that period.cancel_at_period_end- Indicate whether this subscription should cancel at the end of the current period (current_period_end). Defaults tofalse.cancel_now- This simulates the subscription being canceled or expired immediately.default_tax_rates- 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 havetax_ratesset.items- A list of up to 20 subscription items, each with an attached price.proration_behavior- Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resettingbilling_cycle_anchor=now, or starting a trial), or if an item'squantitychanges. The default value iscreate_prorations. Possible values:always_invoice,create_prorations,none.proration_date- If previewing an update to a subscription, and doing proration,subscription_details.proration_dateforces 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 ofsubscription_details.items, orsubscription_details.trial_endare required. Also,subscription_details.proration_behaviorcannot be set to 'none'. Format: Unix timestamp.resume_at- For paused subscriptions, settingsubscription_details.resume_attonowwill preview the invoice that will be generated if the subscription is resumed. Possible values:now. Max length: 5000.start_date- Date a subscription is intended to start (can be future or past). Format: Unix timestamp.trial_end- If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one ofsubscription_details.itemsorsubscriptionis required.