Confirm the bank operation that settled an instruction
POST/api/v1/payment_batches/:id/settlement/confirm
Asserts that the bank operation settled the instruction. The pair is re-checked under lock with the suggestion controls (the batch's debit account, an outgoing operation, the same currency and exact amount, an operation no other instruction takes and no other invoice was reconciled against). The instruction's invoice is paid through the bank reconciliation - an existing reconciliation of that operation with that invoice is reused, never duplicated; an instruction paying no invoice is linked only. The instruction reads settled and the batch settles when every instruction did. Confirming the pair already confirmed answers the same 200. Use it for a result of GET /payment_batches/{id}/settlement/candidates, whatever its date.
Request
Responses
- 200
- 409
- 422
The instruction's settlement row, matched.
stale_version: the batch changed since the expected_version you sent. NOTHING WAS CONFIRMED; details carries the current version and batch. idempotency_key_reuse and idempotency_request_in_progress also answer 409, with no details.
validation_failed: the Idempotency-Key header is missing, expected_version is not an integer, or the instruction or the operation is unknown (details names the field); operation_failed: the pair is refused and message says why.