cancel subscription
This block is part of the stripe group and was last modified in core v15.0.0.
cancel subscription v15.0.0 Cancels a subscription. By default at the end of the paid-for period: the customer keeps their access until it runs out, the subscription stays active with cancels at period end set, and resume subscription undoes it. Tick immediately to stop access now : that is irreversible, and unless prorate is set the customer is not credited for the unused time.
- flow
flow - connection required
stripeconnection - subscription id required
value - immediately
booleanStop access now instead of at the end of the period. Cannot be undone : a new subscription has to be created.
- prorate
booleanWith
immediately: credit the unused time to the customer's Stripe balance, applied to their next invoice. This does not refund their card : use create refund for that. - reason
valueA free-text note stored on the cancellation, for your own reporting.
- idempotency key
valueOptional. Reusing a key makes Stripe replay the first response instead of creating a second object : wire something stable per order, like the order GUID.
- flow
flow - connection
stripeconnection - is active
conditionTrue for
activeANDtrialing: branching on status == active alone locks every trial user out. - status
valuetrialing,active,past_due,canceled,unpaid,incomplete,paused. - subscription id
value - cancels at period end
conditionTrue when the subscription is running out rather than renewing. Resume clears it.
- period end
numberUnix timestamp : when the customer's paid-for access runs out, and when the next charge falls due.
- period start
numberUnix timestamp.
- canceled at
numberUnix timestamp of when cancellation was requested. 0 when it has not been.
- trial end
numberUnix timestamp. 0 when there is no trial.
- price id
valueThe 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
valueThe invoice a credit note would be issued against.
- meta data
object - subscription
object - success
condition - error
valueStripe's own message, or a sentinel like MISSING_SESSION_ID for a problem in the wiring.
- error code
valueStripe's machine-readable code, e.g.
card_declined,resource_missing. - decline code
valueWhy the bank refused, e.g.
insufficient_funds. Only set on a declined card.
unsubscribe |
end subscription |
stop billing |
cancel |
Leave the immediate flag off and cancel subscription schedules the cancellation for the end of the period the customer already paid for: they keep access until then, and cancel_at_period_end comes back true while is_active is still true. That pair is what your billing screen renders as "cancels on the 3rd" rather than "cancelled". Setting immediately instead ends it now, which is what you want for fraud and almost never for a customer who asked.
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 