qb_add_transaction
Preview and confirm a home-currency check, deposit, or credit card charge/credit, then book it with a confirmation code and undo log.
Instructions
Adds a transaction (Check, Deposit, CreditCardCharge, or CreditCardCredit) in the home currency. lines: [{"account": str, "amount": number or string, "memo": str|None}, ...]. For foreign-currency accounts or exchange rates use qb_write_check / qb_deposit instead. A Deposit has no header payee or refnum in qbXML: payee is put on every line (as EntityRef) and a refnum is refused.
Two steps: without confirm_code this only returns a preview and a confirm code; with the code it books and logs an undo entry (qb_revert_run).
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": {
"txn_type": "<txn_type>",
"account": "<account>",
"txn_date": "<txn_date>",
"lines": "<lines>"
},
"name": "qb_add_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | ||
| payee | No | ||
| refnum | No | ||
| run_id | No | ||
| account | Yes | ||
| txn_date | Yes | ||
| txn_type | Yes | ||
| header_memo | No | ||
| confirm_code | No | ||
| expected_company_file | No |