Create an invoice in QuickBooks Online via the Accounting API
domain: developer.intuit.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
QuickBooks OAuth refresh token rotation — the full failure-mode walkthrough related to developer.intuit.com, checked against official docs, with linked verified routes.
Steps
Complete the OAuth 2.0 authorization code flow to obtain an access token and realmId (company ID) for the target QBO company.
Construct a POST request to https://quickbooks.api.intuit.com/v3/company/{realmId}/invoice with Content-Type: application/json and Authorization: Bearer YOUR_TOKEN.
Build the request body with required fields: CustomerRef (Id and name), Line array with at least one SalesItemLineDetail or DescriptionOnlyLine, and CurrencyRef if multicurrency is enabled.
Parse the response for the returned Invoice object; store the Id and SyncToken fields for any future updates.
To retrieve the invoice, issue a GET to the same base URL appended with /invoice/{invoiceId}.
If the company uses the Sandbox environment, replace the base URL host with sandbox-quickbooks.api.intuit.com.
Known gotchas
The realmId is company-specific and must be captured during the OAuth callback; using the wrong realmId returns a 401 or 403.
Every mutating operation requires the current SyncToken; stale tokens cause a 400 with a 'stale object' error.
Line items must include an Amount field that matches the calculated unit price times quantity or the API will reject the request.
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?