Stripe to QuickBooks Automated Revenue & Fee Reconciliation (n8n)
Seamlessly sync payments, handle fee accounting, and automate customer creation using n8n's visual workflow engine.
Tools: Stripe → QuickBooks
Platform: n8n
Short Answer
A fully automated pipeline where every Stripe charge triggers a customer search/creation in QuickBooks, generates a Sales Receipt with correct decimal formatting, and logs Stripe fees as separate expenses for 1:1 bank reconciliation.
The Problem
Manual entry of Stripe transactions into QuickBooks lead to accounting errors and delayed financial reporting. Specifically, reconciling Stripe's 'Gross' payments against 'Net' bank deposits while accounting for processing fees is a manual nightmare for bookkeepers.
The Outcome
A fully automated pipeline where every Stripe charge triggers a customer search/creation in QuickBooks, generates a Sales Receipt with correct decimal formatting, and logs Stripe fees as separate expenses for 1:1 bank reconciliation.
Step-by-Step Guide
1. **Create Webhook Trigger**: Add a 'Stripe Trigger' node. Select the `charge.succeeded` event. In Stripe Dashboard, point the webhook to your n8n production URL.
2. **Configure Credentials**: In n8n, add 'Stripe API' and 'QuickBooks Online OAuth2' credentials. Ensure the QBO app has 'Accounting' scopes enabled.
3. **Search Customer**: Add a 'QuickBooks Online' node. Set Resource to `Customer` and Operation to `Get All`. Use the 'Filters' parameter to search by email: `PrimaryEmailAddr = '{{ $json.customer_email }}'`.
4. **Handle Logic (IF Node)**: Add an 'IF' node to check if the search returned a result. If empty, add a QuickBooks node to 'Create' a customer using Stripe's metadata.
5. **Transform Metadata (Edit Fields)**: Use an 'Edit Fields' (formerly Set) node to handle Stripe's integer format. Use expressions: `Gross: {{ $json.amount / 100 }}` and `Fee: {{ $json.fee / 100 }}`.
6. **Create Sales Receipt**: Add a QuickBooks node. Select 'Sales Receipt'. Map the 'Line Items' to the Gross amount. Crucially, set the 'DepositToAccountRef' to a 'Stripe Clearing' asset account, not your checking account.
7. **Log Processing Fee**: Add another QuickBooks node for 'Expense'. Map the Stripe Fee amount. Set the 'AccountRef' to 'Bank Service Charges' and the 'PaymentAccountRef' to your 'Stripe Clearing' account.
8. **Error Handling**: Create a separate workflow with an 'Error Trigger' node. Connect it to a 'Discord' or 'Slack' node to alert you if a QuickBooks sync fails due to a locked accounting period.
Data Mapping
| Stripe Field | QuickBooks Field | n8n Expression / Transformation |
| :--- | :--- | :--- |
| `customer_details.email` | `PrimaryEmailAddr` | `{{ $json.customer_email }}` |
| `amount` | `Line.Amount` (Gross) | `{{ $json.amount / 100 }}` |
| `balance_transaction.fee`| `TotalAmount` (Expense) | `{{ $json.fee / 100 }}` |
| `currency` | `CurrencyRef` | `{{ $json.currency.toUpperCase() }}` |
| `id` (Charge ID) | `PrivateNote` | `Stripe Ref: {{ $json.id }}` |
| n/a (Static) | `DepositToAccount` | `Stripe Clearing Account ID` |
Gotchas & Failure Modes
• **Integer vs Float**: Stripe sends $10.00 as `1000`. You MUST divide by 100 in n8n expressions or your books will be inflated by 100x.
• **The Clearing Account**: Never sync directly to 'Checking'. Stripe payouts are bundled; syncing individual charges to 'Checking' makes bank reconciliation impossible. Use an intermediary 'Clearing' account.
• **Rate Limiting**: QuickBooks API is sensitive to bursts. If processing bulk historical data, use the 'Wait' node or 'Split in Batches' set to 1 or 2 items per second.
• **Naming Collisions**: If creating customers, Stripe names might be 'John Doe' while QBO requires unique Display Names. Append the Stripe ID to the name if you encounter duplicates.
Verification Checklist
- [ ] Trigger the workflow using 'Test Step' in n8n with a real Stripe Test Mode webhook.
- [ ] Verify the 'IF' node correctly branches between existing and new customers.
- [ ] Confirm the QuickBooks Sales Receipt shows the decimal amount (e.g., 10.50) and not the integer (1050).
- [ ] Check the 'Stripe Clearing' account in QuickBooks to ensure the Balance = (Gross - Fees).
- [ ] Inspect the n8n 'Execution Log' to ensure no nodes are retrying indefinitely.
Ready to Automate?
Build this automation with n8n in minutes.