update subscription

This block is part of the stripe group and was last modified in core v15.0.0.

update subscription v15.0.0

Upgrades, downgrades or re-quantities a subscription. proration behaviour decides what happens to the part of the term already paid for: create_prorations credits the unused time and bills the new plan pro rata on the next invoice, always_invoice bills it straight away, none leaves the customer on the old amount until the term ends. Changing the plan needs the subscription item's id, which this block looks up for you when you give a price id.

In pins 11 + flow
  • flow
  • connection stripeconnection required
  • subscription id value required
  • price id value

    The plan to move to. Applies to the first subscription item : for a multi-plan subscription use items.

  • quantity number

    New seat or unit count.

  • items array<object>

    Full Stripe items, each with the item's own id. Wins over price id and quantity.

  • proration behaviour value

    create_prorations (Stripe's default), always_invoice or none. • Suggestions: create_prorations always_invoice none

  • payment method id value

    Change which saved method is billed from now on.

  • coupon value
  • cancel at period end boolean

    Set the subscription to run out. Resume subscription is what clears it again.

  • meta data object
  • idempotency key value

    Optional. Reusing a key makes Stripe replay the first response instead of creating a second object : wire something stable per order, like the order GUID.

Out pins 19 + flow
  • flow
  • connection stripeconnection
  • is active condition

    True for active AND trialing : branching on status == active alone locks every trial user out.

  • status value

    trialing, active, past_due, canceled, unpaid, incomplete, paused.

  • subscription id value
  • cancels at period end condition

    True when the subscription is running out rather than renewing. Resume clears it.

  • period end number

    Unix timestamp : when the customer's paid-for access runs out, and when the next charge falls due.

  • period start number

    Unix timestamp.

  • canceled at number

    Unix timestamp of when cancellation was requested. 0 when it has not been.

  • trial end number

    Unix timestamp. 0 when there is no trial.

  • price id value

    The plan on the first item : what a single-plan subscription is subscribed to.

  • items array<object>

    Every subscription item, for the multi-plan case.

  • customer id value
  • latest invoice id value

    The invoice a credit note would be issued against.

  • meta data object
  • subscription object
  • success condition
  • error value

    Stripe's own message, or a sentinel like MISSING_SESSION_ID for a problem in the wiring.

  • error code value

    Stripe's machine-readable code, e.g. card_declined, resource_missing.

  • decline code value

    Why the bank refused, e.g. insufficient_funds. Only set on a declined card.

upgrade subscription
downgrade
change plan
proration
credit subscription

An upgrade is a price change on the existing subscription, not a new one. update subscription takes the new price id, and the proration setting decides whether the customer is charged the difference now or at the next renewal. That single pin is the difference between an upgrade that bills immediately and one that does not, so it is worth setting deliberately rather than leaving to the default.

Studio canvas example for the update subscription block: moving somebody to a different plan.

Version history

Introduced in v15.0.0.

Service documentation

External API reference This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.
Back to stripe Return to the main group to view all sub-groups Back to subscriptions Return to the group to view all blocks within this group