| [ Web Proxy ] |
| Viewing: https://docs.stripe.com/api/subscription_items | [Back] [Original] |
Subscription items allow you to create customer subscriptions with more than one plan, making it easy to represent complex billing relationships.
Unique identifier for the object.
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.
The price the customer is subscribed to.
The quantity of the plan to which the customer should be subscribed.
The subscription this subscription_item belongs to.
{ "id": "si_NcLYdDxLHxlFo7", "object": "subscription_item", "created": 1680126546, "metadata": {}, "price": { "id": "price_1Mr6rdLkdIwHu7ixwPmiybbR", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1680126545, "currency": "usd", "custom_unit_amount": null, "discounts": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_NcLYGKH0eY5b8s", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 1000, "unit_amount_decimal": "1000" }, "quantity": 2, "subscription": "sub_1Mr6rbLkdIwHu7ix4Xm9Ahtd", "tax_rates": []}Adds a new item to an existing subscription. No existing items will be changed or replaced.
The identifier of the subscription to modify.
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.
Controls how Stripe handles payment when a subscription update requires payment and collection_method=charge_automatically.
allow_incompleteThis is the default behavior since 2019-03-14. Transition the subscription to |
default_incompleteWhen payment is required, transition the subscription to |
error_if_incompleteIf payment fails, return an HTTP |
pending_if_incompleteIf payment fails, Stripe creates a pending update, which applies only if the payment eventually succeeds. This behavior doesnt support all attributes and payment methods. This option is the simplest way to ensure the customer completes payment before Stripe applies the update. |
The ID of the price object.
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 items quantity changes. The default value is create_prorations.
always_invoiceAlways invoice immediately for prorations. |
create_prorationsWill cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions. |
noneDisable creating prorations in this request. |
The quantity youd like to apply to the subscription item youre creating.
Returns the created Subscription Item object, if successful. Otherwise, this call raises an error.
curl https://api.stripe.com/v1/subscription_items \ -u "sk_test_wU7nrJCZspk1NPDxiQgAF05qsk_test_wU7nrJCZspk1NPDxiQgAF05q:" \ -d subscription={{SUBSCRIPTION_ID}} \ -d price={{PRICE_ID}} \ -d quantity=2{ "id": "si_NcLYdDxLHxlFo7", "object": "subscription_item", "created": 1680126546, "metadata": {}, "price": { "id": "price_1Mr6rdLkdIwHu7ixwPmiybbR", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1680126545, "currency": "usd", "custom_unit_amount": null, "discounts": null, "livemode": false, "lookup_key": null, "metadata": {}, "nickname": null, "product": "prod_NcLYGKH0eY5b8s", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tax_behavior": "unspecified", "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 1000, "unit_amount_decimal": "1000" }, "quantity": 2, "subscription": "sub_1Mr6rbLkdIwHu7ix4Xm9Ahtd", "tax_rates": []}| Web Proxy Viewer | New URL | Original Page |