arazzo: 1.0.1 info: title: Intuit Void Payment Safely summary: Read a payment for its SyncToken and then void it. description: >- A safe reversal flow for a recorded customer payment. The workflow reads a Payment to capture the current Id and SyncToken, then voids it by replaying that Id and SyncToken in the void request body together with the required operation=void query parameter. Reading first guarantees the void carries the latest SyncToken, which QuickBooks requires. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: quickbooksAccounting url: ../openapi/quickbooks-accounting.yml type: openapi workflows: - workflowId: void-payment-safely summary: Read a payment then void it with its current SyncToken. description: >- Reads a Payment for its SyncToken and voids it via the void endpoint with the operation=void parameter. inputs: type: object required: - accessToken - paymentId properties: accessToken: type: string description: OAuth 2.0 bearer access token for the QuickBooks company. paymentId: type: string description: Id of the payment to void. steps: - stepId: readPayment description: Read the payment to obtain its current Id and SyncToken. operationId: readPayment parameters: - name: paymentId in: path value: $inputs.paymentId - name: Authorization in: header value: "Bearer $inputs.accessToken" successCriteria: - condition: $statusCode == 200 outputs: paymentId: $response.body#/Payment/Id syncToken: $response.body#/Payment/SyncToken totalAmt: $response.body#/Payment/TotalAmt - stepId: voidPayment description: Void the payment using its Id, SyncToken, and the operation parameter. operationId: voidPayment parameters: - name: paymentId in: path value: $steps.readPayment.outputs.paymentId - name: operation in: query value: void - name: Authorization in: header value: "Bearer $inputs.accessToken" requestBody: contentType: application/json payload: Id: $steps.readPayment.outputs.paymentId SyncToken: $steps.readPayment.outputs.syncToken successCriteria: - condition: $statusCode == 200 outputs: voidedId: $response.body#/Payment/Id totalAmt: $response.body#/Payment/TotalAmt outputs: paymentId: $steps.readPayment.outputs.paymentId voidedId: $steps.voidPayment.outputs.voidedId