arazzo: 1.0.1 info: title: Stripe Subscribe Existing Customer summary: Confirm a customer exists, then subscribe them to an existing price. description: >- A lightweight subscription flow for catalogs that already have products and prices defined. The workflow retrieves the customer to confirm they exist, then opens a Subscription for them against a pre-existing price. 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 x-realizes-capability-ids: - BC-4240 x-capability-derivation: method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.' min_confidence: 0.7 sources: - capability_id: BC-4240 capability_name: Subscription Lifecycle Management spec: stripe-subscriptions-api-openapi.yml confidence: 0.9 model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0 sourceDescriptions: - name: customerApi url: ../openapi/stripe-customer-api-openapi.yml type: openapi - name: subscriptionsApi url: ../openapi/stripe-subscriptions-api-openapi.yml type: openapi workflows: - workflowId: subscribe-existing-customer summary: Verify a customer and subscribe them to an existing price. description: >- Retrieves the customer to confirm it exists, then creates a Subscription binding that customer to the supplied price. inputs: type: object required: - customer - price properties: customer: type: string description: ID of the existing customer to subscribe. price: type: string description: ID of the existing price to subscribe the customer to. quantity: type: integer description: Optional quantity for the subscription item. steps: - stepId: getCustomer description: Retrieve the customer to confirm it exists before subscribing. operationId: getCustomersCustomer parameters: - name: customer in: path value: $inputs.customer successCriteria: - condition: $statusCode == 200 outputs: customerId: $response.body#/id - stepId: createSubscription description: Subscribe the verified customer to the supplied price. operationId: PostSubscriptions requestBody: contentType: application/x-www-form-urlencoded payload: customer: $steps.getCustomer.outputs.customerId items: - price: $inputs.price quantity: $inputs.quantity successCriteria: - condition: $statusCode == 200 outputs: subscriptionId: $response.body#/id status: $response.body#/status outputs: subscriptionId: $steps.createSubscription.outputs.subscriptionId status: $steps.createSubscription.outputs.status