arazzo: 1.0.1 info: title: Stripe Cancel Uncaptured Payment summary: Open a manual-capture PaymentIntent and cancel it to release the authorization. description: >- Releases an authorization hold that will not be captured, for example when an order is abandoned. The workflow opens a manual-capture PaymentIntent and confirms it to place the hold, then cancels the PaymentIntent with a cancellation reason to release the held funds. 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-1340.10 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-1340.10 capability_name: Payment Initiation Management spec: stripe-intents-api-openapi.yml confidence: 0.85 model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0 sourceDescriptions: - name: cancelApi url: ../openapi/stripe-cancel-api-openapi.yml type: openapi - name: confirmApi url: ../openapi/stripe-confirm-api-openapi.yml type: openapi - name: intentsApi url: ../openapi/stripe-intents-api-openapi.yml type: openapi workflows: - workflowId: cancel-uncaptured-payment summary: Authorize a payment, then cancel it to release the hold. description: >- Creates a manual-capture PaymentIntent, confirms it to authorize the card, and then cancels the PaymentIntent so the authorization is released rather than captured. inputs: type: object required: - amount - currency - paymentMethod properties: amount: type: integer description: Amount to authorize in the smallest currency unit. currency: type: string description: Three-letter ISO currency code. paymentMethod: type: string description: ID of the PaymentMethod to authorize. cancellationReason: type: string description: Reason for cancellation (e.g. abandoned, requested_by_customer). steps: - stepId: authorizePayment description: Open a PaymentIntent with manual capture to hold funds. operationId: postPaymentIntents requestBody: contentType: application/x-www-form-urlencoded payload: amount: $inputs.amount currency: $inputs.currency payment_method: $inputs.paymentMethod capture_method: manual successCriteria: - condition: $statusCode == 200 outputs: paymentIntentId: $response.body#/id - stepId: confirmAuthorization description: Confirm the PaymentIntent to place the authorization hold. operationId: postPaymentIntentsIntentConfirm parameters: - name: intent in: path value: $steps.authorizePayment.outputs.paymentIntentId requestBody: contentType: application/x-www-form-urlencoded payload: payment_method: $inputs.paymentMethod successCriteria: - condition: $statusCode == 200 outputs: status: $response.body#/status - stepId: cancelPayment description: Cancel the PaymentIntent to release the authorization hold. operationId: postPaymentIntentsIntentCancel parameters: - name: intent in: path value: $steps.authorizePayment.outputs.paymentIntentId requestBody: contentType: application/x-www-form-urlencoded payload: cancellation_reason: $inputs.cancellationReason successCriteria: - condition: $statusCode == 200 outputs: status: $response.body#/status outputs: paymentIntentId: $steps.authorizePayment.outputs.paymentIntentId status: $steps.cancelPayment.outputs.status