stripe.subscriptions.update_subscription ​
Update a Stripe subscription (plan change with proration)
Upgrade, downgrade, or re-flag a subscription.
Pass price_id to move the subscription onto a different plan. The current subscription item is resolved first and swapped in place, which is what makes Stripe prorate rather than start a second line item. proration_behavior defaults to create_prorations (charge or credit the difference immediately); pass none to change the plan without any proration.
Acts on the CUSTOMER'S OWN Stripe account, authenticated via the org-scoped Stripe connection selected by cloud_connection_uuid.
Inputs:
- cloud_connection_uuid: Org-scoped Stripe connection (customer's own account).
- subscription_id: Stripe subscription ID (sub_...).
- price_id: New price to move the subscription onto (optional).
- quantity: New quantity for the item (optional).
- proration_behavior: create_prorations | none | always_invoice (default: create_prorations) (optional).
- cancel_at_period_end: Schedule (true) or clear (false) cancellation at period end (optional).
- metadata: Metadata keys to set (optional).
Outputs (terminal state_data):
- subscription_id: str
- status: str
- price_id: str — price after the change
- proration_behavior: str
Connection required: cloud_connection_uuid — the organization's own Stripe account credentials; there is no platform-key fallback.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-stripe |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cloud_connection_uuid | uuid | Yes | — | Org-scoped Stripe connection (customer's own account) |
subscription_id | string | Yes | — | Stripe subscription ID (sub_...) |
price_id | string | No | — | New price to move the subscription onto |
quantity | integer | No | — | New quantity for the item |
proration_behavior | string | No | — | create_prorations |
cancel_at_period_end | boolean | No | — | Schedule (true) or clear (false) cancellation at period end |
metadata | json | No | — | Metadata keys to set |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
subscription_id | string | No | — | — |
status | string | No | — | — |
price_id | string | No | — | — |
proration_behavior | string | No | — | — |
cloud_connection_uuid | uuid | No | — | — |
quantity | integer | No | — | — |
cancel_at_period_end | boolean | No | — | — |
metadata | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_layer | integer | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "stripe.subscriptions.update_subscription",
"initial_data": {
"cloud_connection_uuid": "value",
"subscription_id": "value"
}
}