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 sourceDescriptions: - name: paymentIntentsApi url: ../openapi/stripe-payment-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