Subscription
A subscription object representing a recurring billing agreement with a customer.
- Type: string | nullFormat: date-time
billing _cycle _anchor requiredThe reference point that aligns future billing cycle dates. Sets the day of week for weekly intervals, day of month for monthly/yearly, etc.
- Type: boolean
cancel _at _period _end requiredWhether this subscription will cancel at the end of the current billing period.
- Type: stringFormat: date-time
created requiredTime at which the subscription was created.
customer required- Type: string
Customer ID (ULID).
- Type: string
id requiredUnique identifier for the subscription (ULID).
- Type: stringFormat: date-time
next _billing _date requiredNext scheduled billing date for the subscription.
- Type: stringFormat: date-time
start _date requiredDate when the subscription was first created. May differ from
createddue to backdating. - Type: stringenum
status requiredCurrent lifecycle status of the subscription:
INCOMPLETE— initial payment attempt failedINCOMPLETE_EXPIRED— initial payment not received within 23 hours (terminal)TRIALING— subscription is in a free trial periodACTIVE— subscription is active and billing normallyPAST_DUE— payment required but could not be collectedCANCELED— subscription has been canceled (terminal)UNPAID— payment failed and all retries exhaustedPAUSED— trial ended without a payment method
valuesI N C O M P L E T E I N C O M P L E T E _ E X P I R E D T R I A L I N G A C T I V E P A S T _ D U E C A N C E L E D U N P A I D P A U S E D
- Type: stringFormat: date-time
updated _at requiredTime at which the subscription was last updated.
- Type: object | null · BillingCycleAnchorConfig
billing _cycle _anchor _config Advanced billing cycle configuration. Allows precise control over when billing cycles occur. All fields are optional integers with specific ranges.
- Type: integer
day _of _month min:1max:31requiredDay of month for billing (1–31).
- Type: integer | null
hour min:0max:23Hour of day for billing in UTC (0–23).
- Type: integer | null
minute min:0max:59Minute of hour for billing (0–59).
- Type: integer | null
month min:1max:12Month of year for billing (1–12).
- Type: integer | null
second min:0max:59Second of minute for billing (0–59).
- Type: object | null
billing _thresholds Thresholds at which an invoice is generated and billing period advances.
- Type: anything
property Name
- Type: string | nullFormat: date-time
cancel _at If set, the date on which the subscription will be canceled.
- Type: string | nullFormat: date-time
canceled _at If the subscription has been canceled, the date of that cancellation.
- Type: object · CancellationDetails
cancellation _details Details about why this subscription was cancelled.
- Type: string | null
comment max length:5000Free-form text comment explaining the cancellation reason.
- Type: string | nullenum
feedback Predefined cancellation reason category provided by the customer.
valuescustomer _service low _quality missing _features other switched _service too _complex too _expensive unused
- Type: stringenum
collection _method How payment is collected from the customer.
valuescharge _automatically send _invoice
- Type: string | null
currency Three-letter ISO currency code (uppercase).
- Type: string | nullFormat: date-time
current _period _end End of the current billing period.
- Type: string | nullFormat: date-time
current _period _start Start of the current billing period.
- Type: integer | null
days _until _due Number of days a customer has to pay invoices. Null for
charge_automatically. - Type: string | null
default _payment _method ID of the default payment method for this subscription.
- Type: string | nullFormat: date-time
ended _at If the subscription has ended, the date it ended.
- Type: array object[] · SubscriptionItem[]
items List of subscription items, each representing a product/price in the subscription.
A subscription item representing a product/price combination active on the subscription.
- Type: stringenum
billing _interval Resolved billing interval for this item (e.g.
monthly).valuesdaily weekly monthly yearly
- Type: stringFormat: date-time
created _at Timestamp when the item was created.
- Type: string | null
currency Three-letter ISO 4217 currency code (uppercase). Resolved from item.currency → subscription.currency.
- Type: string
id Subscription item ID (ULID format with
si_prefix). - Type: string
price Price ID from the product catalog.
- Type: string
product Unique identifier for the product.
- Type: integer
quantity Quantity of the subscription item.
- Type: object · RecurringConfig
recurring Recurring billing configuration.
- Type: number | null
unit _amount Unit price in the smallest currency unit (e.g. cents).
- Type: stringFormat: date-time
updated _at Timestamp when the item was last updated.
- Type: boolean
livemode Whether this subscription exists in live mode (
true) or test mode (false). - Type: object
metadata Set of key-value pairs attached to the subscription.
- Type: anything
property Name
- Type: string | null
on _behalf _of The account (if any) on behalf of which charges are made.
- Type: string | nullFormat: date-time
paused _at If the subscription has been paused, the date it was paused.
- Type: string | null
pending _setup _intent ID of a pending SetupIntent for collecting payment credentials.
- Type: string | nullFormat: date-time
trial _end If the subscription has a trial, the end of that trial.
- Type: object · TrialSettings
trial _settings Controls what happens when a trial period ends.
- Type: object
end _behavior Behavior when the trial ends.
- Type: string | nullFormat: date-time
trial _start If the subscription has a trial, the start of that trial.

