---
title: "Take a movement off what it paid"
method: POST
path: "/api/v1/banking/matches/{bankTransactionId}/undo"
tags: ["Money"]
---

# Take a movement off what it paid

`POST /api/v1/banking/matches/{bankTransactionId}/undo`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/banking/matches/{bankTransactionId}/undo`
- Auth: API key in cookie `better-auth.session_token`

The exact reverse of placing money coming in. The payment goes, each notice it paid owes again what it had settled and reads overdue where it is past due, a case closed by that payment opens again at the step it had reached, a receipt filed for it and never sent is discarded, and the movement waits unmatched. It is final for the engine: Dardaris never places that movement again on its own, and the owner can still place it by hand. The whole of it is one batch with an audit line naming the owner.

## Path parameters

- `bankTransactionId` string, required

## Response `200`

Taken off.

- object
  - `ok` unknown, required
  - `data` object, required
    - `bankTransactionId` string, required: Stable record id, e.g. `lse_012`.
    - `status` 'unmatched', required
    - `paymentId` string, nullable, required: Stable record id, e.g. `lse_012`.
    - `invoiceIds` string[], required: The notices it paid, open again for what it had settled.
    - `discarded` number, required: Receipts filed for that payment and never sent, now discarded.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: The movement is not placed against anything, or it is money going out.
- `404`: No such movement on this portfolio.
- `409`: Something else changed the movement or what it paid at the same moment. Nothing was written; send it again.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
