arazzo: 1.0.1 info: title: Fintecture Settlement Reconciliation summary: List settlements, read one settlement's detail, then pull merchant transactions to reconcile. description: >- A back-office reconciliation flow. It lists disbursements from the merchant's Local Acquiring account, reads the detail of the first settlement to obtain the disbursed amount and the transactions it covers, and then lists merchant transactions over a date window so the settlement can be reconciled against underlying transactions. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI descriptions. version: 1.0.0 sourceDescriptions: - name: pisApi url: ../openapi/fintecture-pis-api-openapi.yml type: openapi - name: transactionsApi url: ../openapi/fintecture-transactions-api-openapi.yml type: openapi workflows: - workflowId: settlement-reconciliation summary: Enumerate settlements, inspect one, and reconcile against merchant transactions. description: >- Lists settlements, reads the first settlement's detail, and lists merchant transactions over a date range to support reconciliation. inputs: type: object required: - accessToken properties: accessToken: type: string description: A bearer access token valid for the PIS and Transactions scopes. from: type: string description: Inclusive start date (YYYY-MM-DD) for the transaction query. to: type: string description: Inclusive end date (YYYY-MM-DD) for the transaction query. steps: - stepId: listSettlements description: List all disbursements from the merchant's Local Acquiring account. operationId: getPisV2Settlements parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" successCriteria: - condition: $statusCode == 200 outputs: settlements: $response.body#/data firstSettlementId: $response.body#/data/0/id - stepId: getSettlement description: Read the first settlement's detail to obtain its amount and covered transactions. operationId: getSettlementById parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: settlement_id in: path value: $steps.listSettlements.outputs.firstSettlementId successCriteria: - condition: $statusCode == 200 outputs: amount: $response.body#/amount transactions: $response.body#/transactions settledAt: $response.body#/settled_at - stepId: listTransactions description: List merchant transactions over a date window to reconcile against the settlement. operationId: listAllTransactions parameters: - name: Authorization in: header value: "Bearer $inputs.accessToken" - name: filter[from] in: query value: $inputs.from - name: filter[to] in: query value: $inputs.to successCriteria: - condition: $statusCode == 200 outputs: merchantTransactions: $response.body#/data outputs: settlements: $steps.listSettlements.outputs.settlements settlementAmount: $steps.getSettlement.outputs.amount merchantTransactions: $steps.listTransactions.outputs.merchantTransactions