ml-connector
QuickBooks OnlinePayPal

QuickBooks Online and PayPal integration

QuickBooks Online holds your accounting records. PayPal holds your payment transactions. Connecting the two keeps your expense accounts and vendor transactions in agreement. Invoice and refund records from PayPal flow into QuickBooks Online as bills or expense transactions, sorted by vendor and line item, and the transaction IDs stay linked so you can trace any payment back to the source. ml-connector bridges the very different OAuth flows and reconciles payment state as PayPal orders move through captures and refunds.

How QuickBooks Online works

QuickBooks Online exposes vendors, customers, employees, bills, invoices, payments, journal entries, accounts, departments, and classes through the QuickBooks Online Accounting API v3. The API uses a REST transport with a SQL-like query language over HTTPS and authenticates with OAuth 2.0 Authorization Code flow. Access tokens expire in 1 hour and refresh tokens rotate every 24-26 hours. Webhooks fire on Create/Update/Delete/Merge/Void for most entities but contain only entity ID and operation, requiring a full fetch to get all fields. A CDC endpoint is also available for polling at /v3/company/{realmId}/cdc with 30-day history. QuickBooks Online requires exact object representation with SyncToken for concurrency control on all creates and updates, and does not hard-delete vendors, customers, or accounts - they are marked inactive instead.

How PayPal works

PayPal exposes orders, authorizations, captures, refunds, invoices, transactions, subscriptions, and payouts through REST APIs with OAuth 2.0 Client Credentials grant. A Bearer token is cached and reused with a default lifetime of approximately 8 hours, though some scopes expire in 15 minutes. PayPal pushes events via HTTPS webhooks to a registered endpoint and retries up to 25 times over 3 days on non-2xx response. Webhook signatures use RSA-SHA256 verification, not HMAC. PayPal does not expose native GL account objects, so transaction reconciliation must happen via transaction search API. Transaction search is limited to a 31-day window and returns a maximum of 500 results per page. Refunds must be issued against captures, not orders directly.

What moves between them

The primary flow moves from PayPal into QuickBooks Online. Capture and refund records from PayPal flow into QuickBooks Online as expense transactions or vendor bills, mapped to a default expense account and optional department for categorization. Transaction IDs are stored in both systems for audit trail and reconciliation. Invoice objects in PayPal can also be synced to QuickBooks Online as vendor invoices or customer invoices depending on direction. Reference data such as account mappings are configured once per customer and applied to every sync cycle. Because PayPal transaction search is limited to 31 days, ml-connector maintains a state table of processed transaction IDs to avoid re-syncing old payments.

How ml-connector handles it

ml-connector stores both credential sets encrypted and handles the difference between PayPal's Client Credentials flow (which uses a cached Bearer token with ~8 hour lifetime) and QuickBooks Online's Authorization Code flow (which requires a 1-hour token refresh and rotating 24-26 hour refresh token). On the QuickBooks Online side, ml-connector tracks the refresh token chain and rotates the access token before expiry, stopping any mid-flight authentication error. On the PayPal side, the bearer token is cached and reused until a 401 response signals token expiry. PayPal captures and refunds are read via transaction search or webhook payloads and queued for creation in QuickBooks Online. Each PayPal transaction ID is stored as a memo or custom field in the QuickBooks Online bill or expense record so future queries can find the original PayPal order. Because QuickBooks Online webhook payloads contain only entity ID and operation type, ml-connector must fetch the full record via GET to extract amounts and dates. For refunds, ml-connector creates a vendor credit or negative bill in QuickBooks Online, since QuickBooks Online does not have a native refund-from-bill operation like some ERP systems. The 31-day transaction search window in PayPal is bridged by maintaining a state table of synced transaction IDs, so only new transactions are polled on each cycle. All records carry a full audit trail and can be replayed if a downstream write to QuickBooks Online fails.

A real-world example

A small-to-mid-market software company uses QuickBooks Online for accounting and PayPal for subscription billing and payment processing. Before the integration, finance reconciled PayPal monthly by exporting transaction reports and manually entering refunds and subscription captures into QuickBooks Online as vendor bills, a slow process that often ran behind by a week. With PayPal and QuickBooks Online connected, each PayPal capture posts to the expense account automatically, and refunds create credit memos so the expense account is always current with payment activity. Monthly reconciliation starts with accurate transaction lists already in the ledger, and the manual entry step is eliminated.

What you can do

  • Move PayPal captures and refunds into QuickBooks Online as bills, expense transactions, or vendor credits, mapped to the correct account and department.
  • Link PayPal transaction IDs to QuickBooks Online records so you can trace every payment to its source in both systems.
  • Bridge PayPal OAuth 2.0 Client Credentials flow with QuickBooks Online Authorization Code flow, managing token refresh and rotation automatically.
  • Handle PayPal webhook pushes or poll the transaction search API on a configurable schedule, with retries and full audit trail on every record.
  • Maintain transaction state so only new PayPal records sync even though PayPal transaction search is limited to 31 days.

Questions

Does PayPal invoice data sync into QuickBooks Online?
Yes. PayPal invoices can be synced to QuickBooks Online as vendor invoices or customer invoices depending on direction and configuration. An invoice sent in PayPal can become a bill in QuickBooks Online, and vice versa. The direction and frequency are configured per customer.
How does ml-connector handle PayPal's 31-day transaction search limit?
ml-connector maintains a state table of processed PayPal transaction IDs. Even though the PayPal transaction search API is limited to 31 days, only new transactions are queued for sync on each cycle. Old transactions are never re-processed, and the audit trail in QuickBooks Online shows the full history.
Which OAuth flow does ml-connector use for each system?
PayPal uses OAuth 2.0 Client Credentials, which yields a Bearer token cached for approximately 8 hours. QuickBooks Online uses OAuth 2.0 Authorization Code flow, which requires a 1-hour access token refresh and a rotating 24-26 hour refresh token. ml-connector manages both lifecycles automatically and stops any mid-flight auth error.

Related integrations

Connect QuickBooks Online and PayPal

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started