txn_link
Link two transactions in the same book by company, source ID, target ID, and kind to record transfers, refunds, payments, adjustments, or recategorizations and return an audit-undo receipt.
Instructions
Link two transactions in the same book. Send company, source_id, target_id, and kind (transfer, refund, payment, adjustment, recategorization, or related). For kind payment, source_id is the payment and target_id the charge it paid (CLI: txn link PAYMENT CHARGE --kind payment); a payment link the wrong way round is refused, one whose direction cannot be told is recorded with warnings, and aging counts it from the day it is recorded. Use it for journal-only charges; for typed invoices and bills use document_allocate instead. Returns a receipt for audit_undo.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company": "<company>",
"source_id": "<source_id>",
"target_id": "<target_id>",
"kind": "<kind>"
},
"name": "txn_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| company | Yes | ||
| source_id | Yes | ID of the source transaction, such as a refund or payment. | |
| target_id | Yes | ID of the related transaction, such as the charge or invoice. |