/v1/customers/{customer}/subscriptionsCreates a new subscription on an existing customer.
| Name | Description |
|---|---|
| customer* |
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| add_invoice_items | array<object> | A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. array item fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| application_fee_percent | number | string | A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees documentation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| automatic_tax | object | Automatic tax settings for this subscription. 2 nested fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backdate_start_date | integer (unix-time) | A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| billing_cycle_anchor | integer (unix-time) | A future timestamp in UTC format to anchor the subscription's billing cycle. The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| billing_thresholds | object | string | Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cancel_at | integer (unix-time) | string | 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 using | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cancel_at_period_end | boolean | Indicate whether this subscription should cancel at the end of the current period ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| collection_method | string | Either | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| currency | string (currency) | Three-letter ISO currency code, in lowercase. Must be a supported currency. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| days_until_due | integer | Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default_payment_method | string | ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default_source | string | ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default_tax_rates | array<string> | string | The tax rates that will apply to any subscription item that does not have | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| discounts | array<object> | string | The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| expand | array<string> | Specifies which fields in the response should be expanded. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| invoice_settings | object | All invoices will be billed using the specified settings. 5 nested fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items | array<object> | A list of up to 20 subscription items, each with an attached price. array item fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| metadata | object | string | Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| off_session | boolean | Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| payment_behavior | string | Controls how Stripe handles the first invoice when payment is required and | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| payment_settings | object | Payment settings to pass to invoices created by the subscription. 3 nested fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pending_invoice_item_interval | object | string | Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling Create an invoice for the given subscription at the specified interval. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| proration_behavior | string | Determines how to handle prorations resulting from the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| transfer_data | object | If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. 2 nested fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| trial_end | string | integer (unix-time) | Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| trial_from_plan | boolean | Indicates if a plan's | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| trial_period_days | integer | Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See Using trial periods on subscriptions to learn more. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| trial_settings | object | Settings related to subscription trials. 1 nested field
|
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| application | string | application | deleted_application | ID of the Connect Application that created the subscription. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| application_fee_percent | number | A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| automatic_tax* | subscription_automatic_tax | 3 nested fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| billing_cycle_anchor* | integer (unix-time) | The reference point that aligns future billing cycle dates. It sets the day of week for | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| billing_cycle_anchor_config | subscriptions_resource_billing_cycle_anchor_config | The fixed values used to calculate the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| billing_mode* | subscriptions_resource_billing_mode | The billing mode of the subscription. 3 nested fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| billing_schedules* | array<subscriptions_resource_billing_schedules> | Billing schedules for this subscription. array item fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| billing_thresholds | subscription_billing_thresholds | Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cancel_at | integer (unix-time) | A date in the future at which the subscription will automatically get canceled | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cancel_at_period_end* | boolean | Whether this subscription will (if | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| canceled_at | integer (unix-time) | If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cancellation_details | cancellation_details | Details about why this subscription was cancelled | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| collection_method* | string | Either | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| created* | integer (unix-time) | Time at which the object was created. Measured in seconds since the Unix epoch. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| currency* | string (currency) | Three-letter ISO currency code, in lowercase. Must be a supported currency. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| customer* | string | customer | deleted_customer | ID of the customer who owns the subscription. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| customer_account | string | ID of the account representing the customer who owns the subscription. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| days_until_due | integer | Number of days a customer has to pay invoices generated by this subscription. This value will be | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default_payment_method | string | payment_method | ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default_source | string | bank_account | card | source | ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default_tax_rates | array<tax_rate> | The tax rates that will apply to any subscription item that does not have array item fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description | string | The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| discounts* | array<string | discount> | The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ended_at | integer (unix-time) | If the subscription has ended, the date the subscription ended. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id* | string | Unique identifier for the object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| invoice_settings* | subscriptions_resource_subscription_invoice_settings | 5 nested fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items* | object | List of subscription items, each with an attached price. 4 nested fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| latest_invoice | string | invoice | The most recent invoice this subscription has generated over its lifecycle (for example, when it cycles or is updated). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| livemode* | boolean | If the object exists in live mode, the value is | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| managed_payments | smor_resource_managed_payments | Settings for Managed Payments for this Subscription and resulting Invoices and PaymentIntents. |