QuickBooks Integration
Automated invoice creation for every NuChoice order
Connection Status
Environment
sandbox
Company ID
—
Mode
Mock (logs only)
Auto-Invoice
Pending Setup
What Happens Automatically
Invoice on Payment
Every paid order instantly creates a QB invoice with full line items, customer record, and tax.
Customer Sync
QB customer record created or matched by email — no duplicate entries.
Void on Cancel
Cancelled or refunded orders automatically void the QB invoice.
Token Auto-Refresh
Access tokens refresh automatically — no manual re-auth needed.
Setup Steps
Create a QB Developer App
Go to developer.intuit.com → Sign in → Create new app → Select QuickBooks Online Accounting
Open QB Developer PortalCopy API Credentials
In your app → Keys & credentials → Copy Client ID and Client Secret
Add Redirect URI
In your app → Keys & credentials → Add redirect URI:
https://nuchoicefoods.store/api/quickbooks/auth/callbackSet Environment Variables
Add the credentials to Cloudflare Pages → Settings → Environment Variables (or your .env file)
Open Cloudflare Env SettingsConnect Your QB Company
Click "Connect QuickBooks" below — log in to your QB account and authorize NuChoice Foods access
Environment Variables to Set
QUICKBOOKS_CLIENT_IDFrom QB Developer Portal → App → Keys & Credentials
QUICKBOOKS_CLIENT_SECRETFrom QB Developer Portal → App → Keys & Credentials
QUICKBOOKS_REDIRECT_URIhttps://nuchoicefoods.store/api/quickbooks/auth/callbackMust match exactly in QB Developer Portal
QUICKBOOKS_ENVIRONMENTsandboxChange to "production" when going live
QUICKBOOKS_WEBHOOK_VERIFIER_TOKENFrom QB Developer Portal → Webhooks section