CreateTransaction
Ynab_CreateTransactionCreate a purchase, income, transfer, or split transaction in a YNAB account by providing account, date, and amount; supports memos, payees, categories, and cleared status.
Instructions
Create a transaction: a purchase, income, a transfer between accounts, or a split.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Transaction date (YYYY-MM-DD). Future dates are not allowed. | |
| memo | No | Optional memo. | |
| amount | Yes | Amount in currency units. Negative for an outflow (spending), positive for inflow. | |
| cleared | No | Cleared status. | |
| plan_id | No | The YNAB plan (budget) ID. Defaults to 'last-used', the plan the user opened most recently. Use ListPlans to find other plan IDs. | |
| approved | No | Mark as approved. Defaults to true, since the user asked for it explicitly. | |
| payee_id | No | An existing payee ID. | |
| account_id | Yes | The account the transaction belongs to. | |
| flag_color | No | Optional flag color. | |
| payee_name | No | Payee name. Matches an existing payee by name or creates a new one. Ignored if payee_id is given. | |
| category_id | No | Category ID. Leave empty for transfers between budget accounts and splits. | |
| subtransactions | No | Split lines. Each has an amount (same sign convention) and usually a category_id. The lines must add up to the transaction amount. | |
| transfer_account_id | No | For a transfer, the OTHER account's ID. The amount is from this account's point of view (negative moves money out of account_id). Don't combine with payee_id/payee_name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||