stripe_subscriptions_update
Update a Stripe subscription: change items by sending their ID; omit ID to add new items. Unprovided fields remain unchanged.
Instructions
Update a subscription. Parameters not provided are left unchanged. To change an item send its id; omitting the id adds a new item instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | The items to change, up to 20. Absent, the items are left alone. | |
| cancelAt | No | When to cancel: a Unix timestamp, or one of 'max_billed_until', 'max_period_end', 'min_period_end'. A timestamp before the current period ends prorates if prorations are enabled. Pass an empty string to clear a cancellation that was scheduled earlier; `cancel_at_period_end` does not clear a timestamp. A timestamp is seconds, not milliseconds: 1700000000, not 1700000000000. | |
| metadata | No | Set of key-value pairs attached to the subscription. | |
| trialEnd | No | When the trial ends: the string 'now' to end it immediately, or a Unix timestamp at most two years out. Overrides any trial the plan defines. A timestamp is seconds, not milliseconds: 1700000000, not 1700000000000. | |
| discounts | No | Coupons and promotion codes. A populated array replaces the subscription's existing discounts. Absent, they are left alone. | |
| description | No | An arbitrary string attached to the subscription. | |
| daysUntilDue | No | Days until an invoice is due. Valid only when collection_method is 'send_invoice'. | |
| subscription | Yes | The ID of the subscription to update. | |
| prorationDate | No | A Unix timestamp to calculate prorations against, as though the update happened then. Absent, Stripe uses now. A timestamp is seconds, not milliseconds: 1700000000, not 1700000000000. | |
| paymentBehavior | No | What to do if payment for the update fails. Absent, Stripe allows the subscription to go past_due. | |
| collectionMethod | No | How to collect payment. Absent, Stripe charges automatically. | |
| cancelAtPeriodEnd | No | Whether the subscription cancels at the end of the current period. Send it only to change the setting. | |
| prorationBehavior | No | How to handle prorations when the billing cycle or an item quantity changes. Absent, Stripe creates them. | |
| cancellationDetails | No | Why the subscription is being cancelled. | |
| defaultPaymentMethod | No | The payment method to charge. It must already belong to this subscription's customer. |