Create a subscription item

Changed on

Adds a new item to an existing subscription. No existing items will be changed or replaced.

post/v1/subscription_items

Request

  • Base URL: https://api.stripe.com
  • URL: https://api.stripe.com/v1/subscription_items
  • Auth: one of:
    • HTTP basic
    • HTTP bearer

Request body application/x-www-form-urlencoded

expandstring[]

Specifies which fields in the response should be expanded.

metadataobject

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 metadata.

payment_behavior'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete'

Controls how Stripe handles payment when a subscription update requires payment and collection_method=charge_automatically.

pricestring

The ID of the price object.

proration_behavior'always_invoice' | 'create_prorations' | 'none'

Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item's quantity changes. The default value is create_prorations.

proration_dateinteger

If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint.

quantityinteger

The quantity you'd like to apply to the subscription item you're creating.

subscriptionstring required

The identifier of the subscription to modify.

Response

Successful response.

billed_untilinteger

The time period the subscription item has been billed for.

createdinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

current_period_endinteger required

The end time of this subscription item's current billing period.

current_period_startinteger required

The start time of this subscription item's current billing period.

idstring required

Unique identifier for the object.

metadataobject required

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.

object'subscription_item' required

String representing the object's type. Objects of the same type share the same value.

quantityinteger

The quantity of the plan to which the customer should be subscribed.

subscriptionstring required

The subscription this subscription_item belongs to.

Changes

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////////// to the response with the status

Some revisions have not been checked yet.