Skip to content

Latest commit

 

History

History
39 lines (36 loc) · 29.8 KB

File metadata and controls

39 lines (36 loc) · 29.8 KB

Subscription

Fields

Field Type Required Description Example
created_at date ✔️ Creation timestamp of the object.
modified_at date ✔️ Last modification timestamp of the object.
id str ✔️ The ID of the object.
amount int ✔️ The amount of the subscription. 10000
currency str ✔️ The currency of the subscription. usd
recurring_interval models.SubscriptionRecurringInterval ✔️ N/A
recurring_interval_count int ✔️ Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
status models.SubscriptionStatus ✔️ N/A
current_period_start date ✔️ The start timestamp of the current billing period.
current_period_end date ✔️ The end timestamp of the current billing period.
trial_start date ✔️ The start timestamp of the trial period, if any.
trial_end date ✔️ The end timestamp of the trial period, if any.
cancel_at_period_end bool ✔️ Whether the subscription will be canceled at the end of the current period.
canceled_at date ✔️ The timestamp when the subscription was canceled. The subscription might still be active if cancel_at_period_end is true.
started_at date ✔️ The timestamp when the subscription started.
ends_at date ✔️ The timestamp when the subscription will end.
ended_at date ✔️ The timestamp when the subscription ended.
customer_id str ✔️ The ID of the subscribed customer.
product_id str ✔️ The ID of the subscribed product.
discount_id Nullable[str] ✔️ The ID of the applied discount, if any.
checkout_id Nullable[str] ✔️ N/A
seats OptionalNullable[int] The number of seats for seat-based subscriptions. None for non-seat subscriptions.
customer_cancellation_reason Nullable[models.CustomerCancellationReason] ✔️ N/A
customer_cancellation_comment Nullable[str] ✔️ N/A
metadata Dict[str, models.MetadataOutputType] ✔️ N/A
custom_field_data Dict[str, Nullable[models.CustomFieldData]] Key-value object storing custom field values.
customer models.SubscriptionCustomer ✔️ N/A
product models.Product ✔️ A product.
discount Nullable[models.SubscriptionDiscount] ✔️ N/A
prices List[models.SubscriptionPrices] ✔️ List of enabled prices for the subscription.
meters List[models.SubscriptionMeter] ✔️ List of meters associated with the subscription.
pending_update Nullable[models.PendingSubscriptionUpdate] ✔️ Pending subscription update that will be applied at the beginning of the next period. If null, there is no pending update.