Query the TaxRates endpoint to retrieve valid TaxType codes for the organization's jurisdiction
Construct a ManualJournal payload with a Narration, Date, and a JournalLines array where each line specifies AccountCode, LineAmount, and TaxType
Ensure debit and credit lines balance to zero before submitting; include a TaxAmount override on lines where the computed tax would differ from the default rate
POST to the ManualJournals endpoint with Status set to DRAFT or POSTED depending on whether an approval step is required
If posting to a locked period is attempted, catch the validation error and either unlock the period or adjust the journal date
Retrieve the posted journal to confirm the TaxAmount was applied as expected and the net amounts are correct
Known gotchas
TaxType codes are jurisdiction-specific and cannot be assumed to be consistent across organizations in different countries; always look up valid codes at runtime
Xero auto-calculates TaxAmount from the LineAmount and TaxType by default; supplying an explicit TaxAmount overrides this, but the override must be exact or a validation error is returned
Manual journals posted directly to a tax account may cause discrepancies in Xero's BAS or VAT return; use the correct tax account codes and types to ensure proper tax reporting
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp