Treasury

Record an incoming or outgoing payment

Records a payment in a treasury account.

Tool
filmo_treasury_payments_create
Access: Destructive

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "filmo_treasury_payments_create",
    "arguments": {
      "direction": "in",
      "amount": "1234.50",
      "date": "2026-09-01T08:00:00Z",
      "paymentMethodId": "paym_8f2a1c",
      "treasuryAccountId": "trea_8f2a1c",
      "idempotencyKey": "<a UUID you generate>"
    }
  }
}

generated from the schema

Send your own idempotencyKey

A retry without the same key duplicates the effect. Send your own idempotencyKey (a UUID) and resend the same one if you retry.

Requires human confirmation

Put this tool on your client's “ask before running” list. The annotations are hints that the server declares, not guarantees: do not decide the approval from destructiveHint alone. The server flags this tool with _meta["anthropic/requiresUserInteraction"], which clients that honor it use to ask a person before every call.

The document it is tied to goes as the PAIR linkedDocumentType + linkedDocumentId, never as one field per type: sending two identifiers at once would leave it unknown which one it was tied to. type: "deposit" marks a security deposit collected from a customer: it requires direction: in (400 on direction otherwise) and does not deduct from the order total. The date can be any time of today but not a later day, in the time zone of the account (400 on date). Send Idempotency-Key: a retry without it records the payment twice. Returns the full payment, the same projection as its GET.

Arguments

directionstringRequired

in for a collection from a customer, out for a payment to a supplier.

Available options: in, out

amountstringRequired

Amount as a decimal string, greater than zero.

Limits: pattern ^\d{1,13}(\.\d{1,2})?$

currencystring

Currency in ISO 4217. Defaults to EUR.

Limits: min length 3, max length 3

datestring<date-time>Required

Payment 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.

paymentMethodIdstringRequired

Payment method configured in the account.

Limits: min length 1

treasuryAccountIdstringRequired

Treasury account through which the money comes in or goes out.

Limits: min length 1

typestring

"deposit" marks a security deposit collected from a customer: it requires direction=in (400 otherwise) and is not deducted from the order total.

Available options: normal, deposit

contactIdstring

Customer or supplier of the payment.

linkedDocumentTypestring

Type of the document the payment is linked to. Goes with linkedDocumentId.

Available options: invoice, creditNote, supplierInvoice, quote, proforma, salesReceipt, simpleCreditNote, purchaseOrder

linkedDocumentIdstring

Document the payment is linked to. Goes with linkedDocumentType.

referencestring

External reference of the payment.

Limits: max length 200

notesstring

Notes. They are stored in Filmo and NOT returned.

Limits: max length 2000

idempotencyKeystring

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.

Limits: min length 1, max length 255

ifMatchstring

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.

Limits: min length 1

Result

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

Show the attributes of data
idstring

Payment identifier.

directionstring

in when money comes in (a collection) and out when it goes out (a payment).

amountstring

Payment amount as a decimal string, in the indicated currency.

Limits: pattern ^-?\d+\.\d{2}$

currencystring

Payment currency, as an ISO 4217 code.

datestring<date-time>

Payment date in ISO 8601 UTC.

typestring

normal, or deposit when it is an advance payment.

treasuryAccountIdstring

Treasury account the payment goes through.

contactIdstring | null

Customer or supplier of the payment; null if not declared.

referencestring | null

External reference of the payment; null if it has none.

linkedDocumentsobject[]

Documents the payment is assigned to; empty if it is not linked to any.

Show child attributes
linkedDocuments.typestring

Kind of the linked document.

Available options: invoice, creditNote, supplierInvoice, quote, proforma, salesReceipt, simpleCreditNote, purchaseOrder

linkedDocuments.idstring

Identifier of the linked document.

linkedDocuments.amountstring

Amount of this payment assigned to the document, as a decimal string.

Limits: pattern ^-?\d+\.\d{2}$

createdAtstring<date-time>

Creation date in ISO 8601 UTC.

updatedAtstring<date-time>

Last modification date in ISO 8601 UTC.

An error is a result with isError: true and the problem in content[0].text; there is no structuredContent. See Errors.

The same operation by REST

This tool runs POST /api/v1/treasury/payments.

  • Treasury

    Record an incoming or outgoing payment

    Records a payment in a treasury account.

  • Guides

    Safe writes

    An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.

  • Guides

    Errors

    A tool error is a result with isError: true and the problem in the first text block. Branch on its code.