Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 14.6 KB

subscription.md

File metadata and controls

34 lines (31 loc) · 14.6 KB

Subscription

Fields

Field Type Required Description
CreatedAt time.Time ✔️ Creation timestamp of the object.
ModifiedAt time.Time ✔️ Last modification timestamp of the object.
ID string ✔️ The ID of the object.
Amount int64 ✔️ The amount of the subscription.
Currency string ✔️ The currency of the subscription.
RecurringInterval components.SubscriptionRecurringInterval ✔️ N/A
Status components.SubscriptionStatus ✔️ N/A
CurrentPeriodStart time.Time ✔️ The start timestamp of the current billing period.
CurrentPeriodEnd time.Time ✔️ The end timestamp of the current billing period.
CancelAtPeriodEnd bool ✔️ Whether the subscription will be canceled at the end of the current period.
CanceledAt time.Time ✔️ The timestamp when the subscription was canceled. The subscription might still be active if cancel_at_period_end is true.
StartedAt time.Time ✔️ The timestamp when the subscription started.
EndsAt time.Time ✔️ The timestamp when the subscription will end.
EndedAt time.Time ✔️ The timestamp when the subscription ended.
CustomerID string ✔️ The ID of the subscribed customer.
ProductID string ✔️ The ID of the subscribed product.
DiscountID string ✔️ The ID of the applied discount, if any.
CheckoutID string ✔️ N/A
CustomerCancellationReason components.CustomerCancellationReason ✔️ N/A
CustomerCancellationComment string ✔️ N/A
Metadata map[string]components.Metadata ✔️ N/A
CustomFieldData map[string]components.CustomFieldData Key-value object storing custom field values.
Customer components.SubscriptionCustomer ✔️ N/A
Product components.Product ✔️ A product.
Discount components.SubscriptionDiscount ✔️ N/A
Prices []components.SubscriptionPrices ✔️ List of enabled prices for the subscription.
Meters []components.SubscriptionMeter ✔️ List of meters associated with the subscription.