Sync Stripe Payments to QuickBooks Online (n8n)

Automate financial reconciliation by syncing Stripe transactions to QuickBooks using n8n's visual node-based workflows.

Tools: StripeQuickBooks Online

Platform: n8n

Short Answer

A fully automated pipeline that detects Stripe payments, calculates net income vs. fees using n8n expressions, ensures customer records are synced, and creates a Sales Receipt in QuickBooks instantly.

The Problem

Businesses using Stripe often struggle with 'broken' reconciliation because Stripe payouts are minus fees, making it hard to match bank deposits to Gross sales. Manually entering every transaction leads to human error and delayed financial reporting.

The Outcome

A fully automated pipeline that detects Stripe payments, calculates net income vs. fees using n8n expressions, ensures customer records are synced, and creates a Sales Receipt in QuickBooks instantly.

Step-by-Step Guide

1. **Create Workflow & Webhook**: In n8n, add a 'Stripe Trigger' node. Set the event to `payment_intent.succeeded`. Copy the Webhook URL and paste it into your Stripe Dashboard. 2. **Configure Credentials**: For Stripe, use your Secret API Key. For QuickBooks Online, use the n8n OAuth2 credential type to authorize access to your sandbox or production company. 3. **Search for Existing Customer**: Add a 'QuickBooks Online' node. Set Resource to `Customer` and Operation to `Get All`. Use a filter expression: `{{ $json.customer_email }}` to see if the user already exists. 4. **Handle Logic (If Node)**: Use an 'If' node to check if the search returned a result. If length is `0`, route to a QuickBooks 'Create Customer' node. 5. **Format Stripe Data**: Stripe provides amounts in cents (e.g., 1000 for $10). Add a 'Set' or 'Code' node. Use the expression `{{ $json.amount / 100 }}` to convert to decimals. 6. **Map Line Items**: In the QuickBooks 'Create Sales Receipt' node, map the total amount and link it to your specific 'Service/Product' ID from QBO. 7. **Handle Stripe Fees**: To ensure reconciliation, create a second line item in the Sales Receipt with a negative value using `{{ ($json.fee / 100) * -1 }}` mapped to a 'Bank Fees' expense account. 8. **Implement Error Handling**: Create an 'Error Trigger' node. Connect it to a Slack or Email node so you are notified if a QuickBooks API limit is hit or if a tax code is missing. 9. **Deploy**: Set the workflow to 'Active' to start processing live webhooks.