Skip to content
Proud to collaborate with Microsoft for Startups

stripe.subscriptions.cancel_subscription ​

Cancel a Stripe subscription immediately or at period end

Cancel a Stripe subscription immediately or at period end.

Acts on the CUSTOMER'S OWN Stripe account, authenticated via the org-scoped Stripe connection selected by cloud_connection_uuid.

When cancel_at_period_end is true (default) the subscription stays active until the billing period ends, then auto-cancels. When false, it cancels immediately and a pro-rated refund may be issued.

Inputs:

  • cloud_connection_uuid: Org-scoped Stripe connection UUID (required).
  • subscription_id: Stripe subscription ID, e.g. sub_ABC123 (required).
  • cancel_at_period_end: Cancel at the end of the billing period (optional, default: true).

Outputs (terminal state_data):

  • subscription_id: str
  • status: str — subscription status after cancellation
  • cancel_at_period_end: bool
  • cancel_at: int | None — Unix timestamp when cancellation takes effect

Connection required: cloud_connection_uuid — the organization's own Stripe account credentials; there is no platform-key fallback.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-stripe
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
cloud_connection_uuiduuidYes—Org-scoped Stripe connection (customer's own account)
subscription_idstringYes—Stripe subscription ID, e.g. sub_ABC123
cancel_at_period_endbooleanNo—Cancel at period end vs immediately (default: true)

Output Schema ​

FieldTypeRequiredDefaultDescription
cancel_atstringNo——
cancel_at_period_endbooleanNo——
statusstringNo——
subscription_idstringNo——
cloud_connection_uuiduuidNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "stripe.subscriptions.cancel_subscription",
  "initial_data": {
    "cloud_connection_uuid": "value",
    "subscription_id": "value"
  }
}