Skip to main content

Overview

A QuickBooks connection in Flexprice stores encrypted credentials that allow the system to interact with your QuickBooks Online account for:
  • Syncing invoices from Flexprice to QuickBooks
  • Creating customers in QuickBooks automatically
  • Creating items (products/services) for invoice line items
  • Inbound Payment sync

Understanding Sync Configuration

Invoice Sync (Outbound Only)

When enabled, invoices created in Flexprice are automatically synced to QuickBooks:
  • Outbound: true - Sync invoices from Flexprice to QuickBooks
  • Inbound: Always false - QuickBooks invoices are NOT imported to Flexprice

Payment Sync (Inbound Only)

When enabled, payment notifications from QuickBooks update invoice status in Flexprice:
  • Inbound: true - Receive payment notifications from QuickBooks webhooks
  • Outbound: Always false - Payments are NOT sent from Flexprice to QuickBooks
Important: Payments are recorded in QuickBooks by you or your accounting team. Flexprice only receives notifications when payments are marked as complete.

Prerequisites

Before setting up your QuickBooks connection, ensure you have:
  1. Intuit Developer Account - Create an app at developer.intuit.com
  2. OAuth 2.0 Credentials - Client ID and Client Secret from your app
  3. Income Account in QuickBooks - At least one active Income account (for creating items)

Step 1: Create a QuickBooks App

Create App in Intuit Developer Portal

  1. Go to Intuit Developer Portal
  2. Click Create an app
  3. Select QuickBooks Online and Payments
  4. Fill in app details:
    • App Name: “Flexprice Connection” (or your preferred name) following the naming quickbooks’ naming conventions. Go to View naming guidelines
  5. Define the authorization scope of your app
  6. Click Create app

Configure OAuth Settings

  1. In your app dashboard, go to Settings
  2. Configure redirect URIs:
    • Add flexprice resource https://admin.flexprice.io/tools/integrations/oauth/callback as one of your redirect uri
  3. Go to Keys & Credentials and copy your credentials:
    • Client ID
    • Client Secret
Webhooks allow Flexprice to receive real-time payment notifications from QuickBooks.

Webhook URL Format

https://api.cloud.flexprice.io/v1/webhooks/quickbooks/{tenant_id}/{environment_id}

Setting Up Webhooks

  1. Go to Intuit Developer Portal → Your App → Webhooks
  2. Set up your webhook endpoint to receive live events.
    • Enter the webhook URL you were provided with from flexprice
  3. Subscribe to these events:
    • Payment entity (Create)
  4. Copy the Webhook Verifier Token
  5. Click Save
Note: Webhook verifier token is used to verify webhook signatures for security.

Step 3: Create QuickBooks Connection

Using Flexprice Dashboard

You can create a QuickBooks connection through OAuth flow in the Flexprice dashboard:
1

Navigate to Integrations

Go to SettingsIntegrationsQuickBooks
QuickBooks Connection Setup
2

Enter Connection Details

Fill in the connection form:
  • Connection Name: “QuickBooks Production” (or your preferred name)
  • Client ID: From Intuit Developer Portal
  • Client Secret: From Intuit Developer Portal
  • Environment: Select “Production” or “Sandbox”
  • Webhook Verifier Token: From webhook configuration (optional)
  • Income Account ID: Provide any custom income account id that you may have created to track your revenue, by default it is set to 79 (used for creating items)
3

Configure Sync Settings

Enable sync options:
  • Invoice Sync: Enable to automatically sync invoices to QuickBooks
  • Payment Sync: Enable to sync payments from QuickBooks
4

Authorize with QuickBooks

Click Connect to QuickBooks to start OAuth flow:
  1. You’ll be redirected to QuickBooks login
  2. Sign in to your QuickBooks account
  3. Select the company to connect
  4. Authorize Flexprice to access your account
  5. You’ll be redirected back to Flexprice
5

Verify Connection

After authorization, verify the connection is active and working

Security Best Practices

Credential Management

  1. Environment Separation: Use sandbox for development, production for live data
  2. Token Refresh: Access tokens expire after 1 hour - Flexprice automatically refreshes them
  3. Access Control: Limit OAuth app permissions in QuickBooks
  4. Encryption: All credentials are encrypted at rest in Flexprice

Webhook Security

  1. HTTPS Only: Always use HTTPS for webhook endpoints in production
  2. Signature Verification: Configure webhook verifier token for signature validation
  3. Idempotency: Flexprice handles duplicate webhook events automatically
  4. Rate Limiting: Webhooks are rate-limited to prevent abuse

OAuth Token Management

Access Token Expiration:
  • Access tokens expire after 1 hour of inactivity
  • Flexprice automatically refreshes tokens using refresh tokens
  • No manual intervention required
Refresh Token Expiration:
  • Refresh tokens expire after 100 days of inactivity
  • If both tokens expire, you’ll need to re-authorize the connection

Troubleshooting

Common Issues

IssueCauseSolution
Connection test failsInvalid credentialsVerify Client ID and Secret in Intuit Developer Portal
OAuth authorization failsIncorrect redirect URICheck redirect URI matches in app settings
Invoice sync failsMissing Income AccountEnsure Income Account ID is configured
Webhook not receivedIncorrect webhook URLVerify webhook URL format and subscription
Token expired1 hourRe-authorize the connection

Debug Steps

  1. Check Intuit Developer Portal: Verify OAuth credentials and webhook configuration
  2. Verify Realm ID: Ensure Realm ID matches your QuickBooks company
  3. Test Income Account: Query QuickBooks to ensure Income Account exists and is active
  4. Monitor Webhooks: Check webhook delivery logs in Intuit Developer Portal
  5. Review Logs: Check Flexprice application logs for sync errors

Income Account Configuration

QuickBooks requires all service items to have an Income Account reference. This is where revenue is tracked in your books.

Finding Your Income Account ID

  1. Go to QuickBooks → Chart of Accounts
  2. Look for accounts with type Income
  3. Click on an account to view details

Setting Default Income Account

During connection setup, you may provide an Income Account ID. This account will be used as the default for all items created from Flexprice line items.

Next Steps

After setting up your QuickBooks connection:
  1. Test Invoice Sync: Create a test invoice in Flexprice and verify it appears in QuickBooks
  2. Verify Customer Creation: Ensure customers are automatically created when needed
  3. Check Item Creation: Verify line items are creating service items in QuickBooks
  4. Configure Webhooks: Set up payment webhooks for automated reconciliation
  5. Monitor Sync Status: Check integration logs for any sync errors

Additional Resources