Prompt
QuickBooks Online API invoice sync
Latest observation
Nov 3, 2026
OpenAI APIWeb search: off
If you want to sync invoices with the QuickBooks Online API, the usual flow is:
-
Authenticate with OAuth 2.0
- Create an Intuit app
- Get
client_id,client_secret - Complete OAuth consent
- Store
access_tokenandrefresh_token
-
Get the company realm ID
- This identifies the QuickBooks company you’re connected to
-
Create or update customers first
- Invoices require an existing
CustomerRef
- Invoices require an existing
-
Create the invoice
POST https://quickbooks.api.intuit.com/v3/company/{realmId}/invoice- Use JSON body with
CustomerRef, line items, dates, etc.
-
Handle syncing
- Store the QuickBooks
IdandSyncToken - For updates, send the current
SyncToken - Use webhooks or periodic polling to detect changes
- Store the QuickBooks
Example invoice create payload:
{
"CustomerRef": {
"value": "123"
},
"Line": [
{
"Amount": 100.00,
"DetailType": "SalesItemLineDetail",
"SalesItemLineDetail": {
"ItemRef": {
"value": "1"
},
"Qty": 1,
"UnitPrice": 100.00
}
}
]
}
Example headers:
Authorization: Bearer ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
A few important notes:
- QuickBooks Online requires line items to reference valid Items
DocNumbermay be auto-generated unless you provide one- Tax handling depends on the company’s tax settings
- Updates must include the latest
SyncToken
If you want, I can give you one of these next:
- a full working cURL example
- Node.js / Python code
- a sync strategy for two-way invoice sync
- help mapping your invoice fields to QuickBooks fields
Brands