pay_document
Register a payment for a document, which auto-approves it. Optionally link the payment to a bank account using bankId.
Instructions
Register a payment for a document. IMPORTANT: this AUTO-APPROVES the document as a side effect (status 0→1) — Holded has no separate approve endpoint, and approval cannot be undone via the API. paymentmethod is the payment-method catalog id (from list_payment_methods), NOT a bank/treasury id. To link the payment to a bank account, pass bankId: the /pay endpoint can't set it, so the tool performs a second step (PUT /payments/{id}) and reports the outcome in _warnings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Payment date as Unix timestamp | |
| amount | Yes | Payment amount | |
| bankId | No | Bank account id to link the payment to. Triggers a second step (PUT /payments/{id}) because /pay cannot set the bank link. | |
| docType | Yes | Type of document | |
| documentId | Yes | Document ID | |
| treasuryId | No | Treasury account ID | |
| paymentmethod | No | Payment-method catalog id (from list_payment_methods), NOT a bank/treasury id. |