*MCP › Reference › Finance › Treasury*

# Update a payment

> Corrects an already recorded payment or marks it as reconciled with the bank statement.

`reconciled` and `notes` are accepted and not returned: they are state of the internal accounting process. The date follows the rule of the creation: any time of today, not a later day in the time zone of the account (400 on `date`). A new amount moves the assignment only when the whole payment was assigned to a single document or order; on any other payment only the unassigned part changes, so the documents keep what they had collected, and an amount below what is already assigned responds 409 `conflict` without writing. A refunded deposit, and the refund itself, keep their amount and direction: changing either responds 409 `conflict` and nothing is written. If the documents linked to the payment keep changing while it is saved, it also responds 409 `conflict`, nothing is written and the call can be retried. Returns the full payment, the same projection as its GET.

TOOL `filmo_treasury_payments_update` · `treasury:write` · 120/min · Server annotation: Idempotent

## Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `paymentId` | string | Yes | Treasury payment identifier. |
| `direction` | string | No | New direction of the payment. `in`, `out` |
| `amount` | string | No | New amount as a decimal string, greater than zero. If the whole payment is assigned to a single document or order, the assignment follows the new amount. Otherwise what is assigned stays as it is and only the unassigned part changes; an amount below what is already assigned responds 409 `conflict`. |
| `date` | string<date-time> | No | New date, in ISO 8601 with offset. Any time of today is accepted; a later day, in the time zone of the account, is rejected with 400. |
| `paymentMethodId` | string | No | New payment method; null removes it. |
| `contactId` | string | No | New contact; null unlinks it. |
| `reference` | string | No | New external reference; null clears it. |
| `notes` | string | No | New notes. NOT returned. |
| `reconciled` | boolean | No | Marks the payment as reconciled with the bank statement. |
| `idempotencyKey` | string | No | Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure. |
| `ifMatch` | string | No | Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally. |

## Result

On success the result carries `structuredContent` with `data` and `meta`. These are the attributes of `data`.

| Name | Type | Description |
| --- | --- | --- |
| `id` | string | Payment identifier. |
| `direction` | string | in when money comes in (a collection) and out when it goes out (a payment). |
| `amount` | string | Payment amount as a decimal string, in the indicated currency. |
| `currency` | string | Payment currency, as an ISO 4217 code. |
| `date` | string<date-time> | Payment date in ISO 8601 UTC. |
| `type` | string | normal, or deposit when it is an advance payment. |
| `treasuryAccountId` | string | Treasury account the payment goes through. |
| `contactId` | string | Customer or supplier of the payment; null if not declared. |
| `reference` | string | External reference of the payment; null if it has none. |
| `linkedDocuments` | object[] | Documents the payment is assigned to; empty if it is not linked to any. |
| `linkedDocuments.type` | string | Kind of the linked document. `invoice`, `creditNote`, `supplierInvoice`, `quote`, `proforma`, `salesReceipt`, `simpleCreditNote`, `purchaseOrder` |
| `linkedDocuments.id` | string | Identifier of the linked document. |
| `linkedDocuments.amount` | string | Amount of this payment assigned to the document, as a decimal string. |
| `createdAt` | string<date-time> | Creation date in ISO 8601 UTC. |
| `updatedAt` | string<date-time> | Last modification date in ISO 8601 UTC. |

*Call · filmo_treasury_payments_update*

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "filmo_treasury_payments_update",
    "arguments": {
      "paymentId": "paym_8f2a1c"
    }
  }
}
```

*Result (generated from the schema)*

```json
{
  "structuredContent": {
    "data": {
      "id": "id_8f2a1c",
      "direction": "<direction>",
      "amount": "1234.50",
      "currency": "EUR",
      "date": "2026-09-01T08:00:00Z",
      "type": "<type>",
      "treasuryAccountId": "trea_8f2a1c",
      "contactId": "cont_8f2a1c",
      "reference": "<reference>",
      "linkedDocuments": [
        {
          "type": "invoice",
          "id": "id_8f2a1c",
          "amount": "1234.50"
        }
      ],
      "createdAt": "2026-09-01T08:00:00Z",
      "updatedAt": "2026-09-01T08:00:00Z"
    },
    "meta": {
      "idempotencyKey": "<the key you sent, or the one the server generated>",
      "rateLimit": {
        "limit": 120,
        "remaining": 119,
        "reset": 42
      }
    }
  }
}
```

## The same operation by REST

This tool runs [`PATCH /api/v1/treasury/payments/{paymentId}`](https://docs.filmo.io/rest-api/endpoint-reference/treasury/update-a-payment).

---

Canonical URL: https://docs.filmo.io/mcp/tools/treasury/filmo-treasury-payments-update  
Last updated: 2026-10-25