SubscriptionCreateRequest
Request body for creating a new subscription.
Currency Validation:
currencyis required at the subscription level- When using
price_data: currency inside price_data must match the subscription currency
- customerType: stringrequired
ID of the customer to subscribe.
- itemsType: array 1…20required
Subscription items. All recurring items must share the same billing interval. Items without
recurringare one-time charges captured at creation and excluded from all future billing cycles. - currencyType: stringmin length:3max length:3required
Three-letter ISO currency code. Required at subscription level.
- collectionType: "charge_automatically" or "send_invoice"enum
_method How to collect payment from the customer:
charge_automatically— charge the default payment method automatically (default)send_invoice— (coming soon) send an invoice and require manual payment
- daysType: integer
_until _due min:1Number of days until the invoice is due. Required when
collection_method=send_invoice. - defaultType: string
_payment _method ID of the payment method to use for this subscription.
- trialType: string | nullFormat: date-time
_end End date of the trial period (ISO 8601 datetime). Mutually exclusive with
trial_period_days; provide exactly one. - trialType: integer
_period _days min:1max:730Number of days for the trial period. Convenience alternative to
trial_end— resolved totrial_end = now + trial_period_daysat creation time. Mutually exclusive withtrial_end. - trialType: TrialSettings
_settings Properties: 1Controls what happens when a trial period ends.
- billingType: string | nullFormat: date-time
_cycle _anchor Defines the billing cycle anchor date (ISO 8601). Mutually exclusive with
billing_cycle_anchor_config. - billingType: BillingCycleAnchorConfig
_cycle _anchor _config Properties: 5Advanced billing cycle configuration. Allows precise control over when billing cycles occur. All fields are optional integers with specific ranges.
- cancelType: boolean
_at _period _end If
true, cancel at the end of the current billing period instead of immediately. - cancelType: string | nullFormat: date-time
_at Schedule cancellation for a specific date (ISO 8601). Cannot be used with
cancel_at_period_end=true. - paymentType: stringenum
_behavior Controls when and how the first charge is collected.
-
default_incomplete(default) — subscription is created asincomplete. Without anchor: charge is attempted inline at creation; success →active; failure →past_due. Withbilling_cycle_anchor/billing_cycle_anchor_config: subscription staysincompleteuntil the anchor date; charge fires at the anchor date; success →active; failure →past_due. Up to 3 total charge attempts; exhaustion →incomplete_expired. -
allow_incomplete— subscription is created asincomplete. Without anchor: charge is attempted inline at creation; success →active; failure →past_due. Withbilling_cycle_anchor/billing_cycle_anchor_config: subscription staysincompleteuntil the anchor date; charge fires at the anchor date; success →active; failure →past_due. Up to 3 total charge attempts; exhaustion →canceled. -
error_if_incomplete— charge is attempted before the subscription is created. On success: subscription is created asactive. On failure: 402 returned, nothing is created. Cannot be combined withtrial_end,trial_period_days,billing_cycle_anchor, orbilling_cycle_anchor_config. -
send_invoice— (coming soon) skip inline charge; use invoice-based billing.
valuesallow_incompletedefault_incompleteerror_if_incompletesend_invoice -
- onType: string
_behalf _of Account ID for connected account scenarios.
- livemodeType: boolean
Whether this subscription is in live mode or test mode.
- metadataType: objectProperties: 1
Set of key-value pairs for storing additional information about the subscription.

