Undo an instruction's settlement reconciliation
POST/api/v1/payment_batches/:id/settlement/instructions/:payment_instruction_id/undo
Removes the link between the instruction and its bank operation, and only what the confirmation derived from it: the invoice payment it recorded is reversed (an exported accounting entry is corrected by a new entry, never rewritten). The payment at the bank is never cancelled and the bank's status reports are kept. Without a bank settlement report (ACSC) the instruction returns to pending - execution to confirm - keeps its invoice reserved and is never resubmitted, and a settled batch returns to submitted. Undoing an instruction that is not linked answers the same 200.
Request
Responses
- 200
- 404
- 409
- 422
The instruction's settlement row, no longer matched.
No payment batch with this id is reachable by the token's grants, or the instruction is not one of this batch.
stale_version: the batch changed since the expected_version you sent. NOTHING WAS UNDONE; 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 or expected_version is not an integer (details names the field); operation_failed: the undo is refused - the recorded invoice payment could not be reversed, or another settlement action holds the batch - and message says why.