Stripe · Arazzo Workflow

Stripe Pause and Resume Subscription

Version 1.0.0

Retrieve a subscription, pause its billing collection, then resume it.

1 workflow 1 source API 1 provider
View Spec View on GitHub CommerceFinancial ServicesFintechPaymentsT1ArazzoWorkflows

Provider

stripe

Workflows

pause-and-resume-subscription
Pause collection on a subscription and then resume it.
Retrieves the subscription, updates it to pause collection with a void behavior, then resumes the subscription to restart billing.
3 steps inputs: billingCycleAnchor, subscription outputs: status, subscriptionId
1
getSubscription
GetSubscriptionsSubscriptionExposedId
Retrieve the subscription to confirm it exists before pausing.
2
pauseSubscription
PostSubscriptionsSubscriptionExposedId
Update the subscription to pause its billing collection.
3
resumeSubscription
PostSubscriptionsSubscriptionResume
Resume the subscription so billing continues.

Source API Descriptions

Arazzo Workflow Specification

stripe-pause-and-resume-subscription-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Stripe Pause and Resume Subscription
  summary: Retrieve a subscription, pause its billing collection, then resume it.
  description: >-
    The temporary-hold pattern for subscription billing, used for grace periods
    or account holds. The workflow retrieves the subscription to confirm it
    exists, updates it to pause collection, then resumes the subscription so
    billing continues. Every step spells out its form-encoded request inline so
    the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
sourceDescriptions:
- name: subscriptionApi
  url: ../openapi/stripe-subscription-api-openapi.yml
  type: openapi
workflows:
- workflowId: pause-and-resume-subscription
  summary: Pause collection on a subscription and then resume it.
  description: >-
    Retrieves the subscription, updates it to pause collection with a void
    behavior, then resumes the subscription to restart billing.
  inputs:
    type: object
    required:
    - subscription
    properties:
      subscription:
        type: string
        description: ID of the subscription to pause and resume.
      billingCycleAnchor:
        type: string
        description: Billing cycle anchor on resume (e.g. now or unchanged).
  steps:
  - stepId: getSubscription
    description: Retrieve the subscription to confirm it exists before pausing.
    operationId: GetSubscriptionsSubscriptionExposedId
    parameters:
    - name: subscription_exposed_id
      in: path
      value: $inputs.subscription
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      subscriptionId: $response.body#/id
      status: $response.body#/status
  - stepId: pauseSubscription
    description: Update the subscription to pause its billing collection.
    operationId: PostSubscriptionsSubscriptionExposedId
    parameters:
    - name: subscription_exposed_id
      in: path
      value: $inputs.subscription
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        pause_collection:
          behavior: void
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
  - stepId: resumeSubscription
    description: Resume the subscription so billing continues.
    operationId: PostSubscriptionsSubscriptionResume
    parameters:
    - name: subscription
      in: path
      value: $inputs.subscription
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        billing_cycle_anchor: $inputs.billingCycleAnchor
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
  outputs:
    subscriptionId: $steps.getSubscription.outputs.subscriptionId
    status: $steps.resumeSubscription.outputs.status