Back to Blog
Integration Guides

How to Integrate Twilio with QuickBooks: Step-by-Step Guide

Connect Twilio to QuickBooks to send SMS invoice reminders, payment confirmations, and overdue payment alerts to customers automatically.

DA
Danial A
Senior Twilio Consultant, Telphi Consulting
June 22, 2026
7 min read
Twilio
Integration
Payments
How to Integrate Twilio with QuickBooks: Step-by-Step Guide

QuickBooks Online and Twilio integrate through the QuickBooks Online API and Twilio Messages API to automate SMS invoice reminders, payment received confirmations, and overdue payment alerts, reducing the time your accounts receivable team spends manually chasing unpaid invoices via email and phone calls. This integration is used by professional services firms, contractors, and small businesses that issue invoices through QuickBooks and want to reach clients by SMS for payment nudges on invoices approaching or past their due date. The connection uses QuickBooks webhooks to detect invoice and payment events in real time and triggers Twilio SMS to the customer's stored mobile phone with relevant invoice details and payment links.

What You Need Before You Start

Create a QuickBooks Online developer app at developer.intuit.com under My Apps, select OAuth 2.0 as the authentication type, add the redirect URI for your middleware OAuth callback, and note the Client ID and Client Secret for generating access tokens. Complete the OAuth 2.0 authorization flow to obtain a QuickBooks access token and refresh token by directing your QuickBooks company admin to the authorization URL constructed with your Client ID, redirect URI, scope set to com.intuit.quickbooks.accounting, and response_type set to code, then exchange the returned authorization code for tokens at POST https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer. Register a QuickBooks webhook subscription by calling POST https://developer.api.intuit.com/v2/webhooks with the Authorization header containing your access token and a body listing the entities Invoice and Payment under the dataChangeEvent subscriptions, entering your middleware endpoint URL and a webhook verifier token that QuickBooks will include in every delivery. From Twilio, collect your Account SID, Auth Token, and an SMS-capable phone number, and ensure your QuickBooks customer records include a mobile phone in the PrimaryPhone or Mobile fields of each Customer entity.

Step-by-Step Integration Guide

When a QuickBooks webhook arrives at your middleware, validate it by checking the intuit-signature header against the HMAC-SHA256 of the raw payload using your verifier token as the key, then parse the event payload to extract the entity type (Invoice or Payment), the entity ID, and the operation type (Create, Update, Delete). For Invoice Create events, fetch the full invoice by calling GET https://quickbooks.api.intuit.com/v3/company/{realmId}/invoice/{invoiceId} with the Authorization header set to Bearer {accessToken} and the Accept header set to application/json, then extract the CustomerRef.value to get the customer ID. Fetch the customer record at GET https://quickbooks.api.intuit.com/v3/company/{realmId}/customer/{customerId} to retrieve the Mobile.FreeFormNumber or PrimaryPhone.FreeFormNumber field, normalize it to E.164, and send a Twilio SMS announcing the new invoice number, total amount from TotalAmt, and due date from DueDate. For overdue invoice detection, run a daily scheduled job that queries QuickBooks invoices using POST https://quickbooks.api.intuit.com/v3/company/{realmId}/query with the query body SELECT * FROM Invoice WHERE Balance > '0' AND DueDate < '{today}', iterate over each result, fetch the customer phone, and send a Twilio overdue reminder SMS including the invoice number, balance due, and a call to action to visit your payment portal.

Common Issues and How to Fix Them

QuickBooks access tokens expire after one hour and the refresh token must be used to obtain a new access token via POST https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer with grant_type=refresh_token and the stored refresh token, and failing to implement token refresh causes all QuickBooks API calls to return 401 after the first hour. Implement automatic token refresh in your middleware by wrapping every QuickBooks API call in a retry handler that catches 401 responses, calls the token refresh endpoint, stores the new access and refresh tokens, and retries the original request with the new access token. QuickBooks webhooks deliver events in batches up to 30 seconds after the triggering action, and a batch may contain multiple events for the same entity requiring your middleware to process events in the order they appear in the batch array rather than fetching the entity state at arrival time. Process the full event batch in order provided and use the lastUpdated timestamp in each event to determine whether the entity state has changed since the event was queued before dispatching SMS. Customer phone fields in QuickBooks are free-form FreeFormNumber strings that may contain extensions in formats like 555-867-5309 ext 101, which break E.164 normalization. Strip the extension using a regex that removes everything from ext, x, or the hash character onward before running the remaining digits through your E.164 formatter.

How to Get More from This Integration

Build a payment confirmation SMS flow by listening to the QuickBooks Payment Create webhook event, fetching the Payment entity to get the CustomerRef and TotalAmt, retrieving the customer phone, and sending a Twilio SMS receipt confirming the payment amount and the invoice numbers it was applied to using the Line array from the Payment object, giving customers immediate confirmation without needing to log into the QuickBooks payment portal. Create a configurable reminder schedule by storing per-customer SMS preferences in a separate database table keyed by QuickBooks customer ID, allowing the business owner to set custom reminder intervals per client such as 7 days before due, 1 day before due, and 3 days overdue, and using those intervals in your daily scheduled job rather than hardcoded values. Add internal payment alert SMS by sending a separate Twilio SMS to the business owner's phone on every Payment Create QuickBooks event, formatted as a concise string stating the customer name, amount paid, and invoice number, giving the owner a real-time cash flow update without opening QuickBooks. Integrate the QuickBooks payment link into the reminder SMS by fetching the invoice's InvoiceLink field from the QuickBooks invoice response if the QuickBooks Payments feature is enabled on the account, embedding the link in the Twilio SMS body so customers can pay directly from the text message with a single tap.

Conclusion

QuickBooks and Twilio together automate your entire accounts receivable SMS communication from invoice creation through payment confirmation, reducing your team's manual collection workload significantly. Contact Telphi Consulting to build and configure this integration for your QuickBooks Online account.

Share this article:
0 views

Ready to Transform Your Business Communications?

Get a free consultation with our VoIP experts and discover how we can help you save costs, improve efficiency, and scale your business.

Comments (0)

Join the discussion and share your thoughts (AI-moderated for quality)

Protected by AI moderation

Be the first to comment

No comments yet. Share your thoughts below.