Building Accounting Integrations for Expense Management Platforms
This guide provides a complete blueprint for expense management platforms, corporate card providers, neobanks, and vertical SaaS companies looking to integrate with accounting systems through Apideck. It covers the full journey — from initial connection to payment reconciliation — with a focus on user experience and production readiness.
Why Accounting Integrations Matter
Over half of SMEs choose their expense management solution based on the quality of its accounting integrations. For your users, the integration isn't a nice-to-have — it's how they close their books.
A great accounting integration:
- Eliminates manual data entry — Expenses flow automatically into the accounting system
- Reduces errors — Proper account mapping means transactions land in the right place
- Saves time — Accountants spend less time reconciling and reclassifying
- Increases retention — Users who connect their accounting system are significantly less likely to churn
Integration Architecture Overview
The integration has three layers:
- Your application — Expense tracking, mapping settings, and export engine
- Apideck Unified API — Vault (auth), Accounting (CRUD), Webhooks (sync)
- Downstream providers — QuickBooks, Xero, Exact Online, NetSuite, Sage, Business Central
Your app talks only to Apideck. Apideck handles provider-specific differences, auth token management, and data mapping.
Phase 1: Connection Setup
Embed Apideck Vault
Vault handles the OAuth flow with each accounting provider. Embed it in your application's settings or onboarding flow:
Monitor Connection State
Use webhooks to track when connections become active or need re-authorization:
See the Connection States guide for the full state machine.
Phase 2: Account Mapping
This is the most critical UX step. Your users need to map their expense categories to the correct ledger accounts in their accounting system.
What to Map
| Your Side | Accounting Side | API |
|---|---|---|
| Expense categories | Ledger accounts (type: expense) | GET /accounting/ledger-accounts |
| Payment methods / cards | Bank accounts (type: bank) | GET /accounting/ledger-accounts |
| Merchants / counterparties | Suppliers / Vendors | GET /accounting/suppliers |
| Tax categories | Tax rates | GET /accounting/tax-rates |
| Departments / cost centers | Tracking categories | GET /accounting/tracking-categories |
Building the Mapping UI
Present a two-column interface where users match their categories to accounting accounts:
| Your Category | Accounting Account |
|---|---|
| Travel | 6200 - Travel & Entertainment |
| Office Supplies | 6100 - Office Expenses |
| Software | 6350 - IT Costs |
| Meals | 6200 - Travel & Entertainment |
| Default bank account | 1100 - Business Account |
| Default tax rate | 21% VAT |
For detailed implementation guidance, see the Ledger Account Mapping guide.
Phase 3: Exporting Expenses
Choose the Right Resource
| Scenario | Resource | Why |
|---|---|---|
| Expense already paid (card transaction) | Expense | Records the payment and categorization in one step |
| Expense awaiting reimbursement/approval | Bill | Creates an AP entry that can be paid later |
| Exact Online (any scenario) | Bill | Expenses not supported — use Bills with due_date = bill_date |
| Need full debit/credit control | Journal Entry | For complex multi-account transactions |
See When to Use Bills vs. Expenses for the detailed decision matrix.
Create an Expense (for QuickBooks, Xero, NetSuite)
Create a Bill (for Exact Online and reimbursements)
Phase 4: Payment Reconciliation
After creating bills, you need to record the payment to mark them as paid. This is the reconciliation step.
Create a Bill Payment
The accounting system automatically updates the bill status to paid once the full amount is allocated.
For more details, see the Mark Invoices as Paid guide.
Note
Bill Payments for Exact Online use the XML API under the hood. This is handled transparently by Apideck — your API calls remain the same REST format.
Phase 5: Attachments & Receipts
Attach receipt images to expenses or bills for audit compliance:
Phase 6: Error Handling & Monitoring
Handle Common Errors
Monitor with Webhooks
Development Strategy
Start Simple, Expand Later
- Week 1-2: Implement Vault connection + basic bill creation against QuickBooks sandbox
- Week 3: Add ledger account mapping UI
- Week 4: Add bill payments for reconciliation
- Week 5: Test against your target provider (e.g., Exact Online)
- Week 6: Add attachments, webhooks, and error handling
Start with QuickBooks or Xero
Even if your primary market uses Exact Online, start development with QuickBooks or Xero:
- Free sandbox accounts with sample data
- Best developer documentation
- Since Apideck provides a unified API, 95% of your code is the same across providers
- Each connector has setup docs — e.g., Exact Online setup
Test the Remaining 5% Per Provider
Each provider has small differences:
- Exact Online: Only Bills (no Expenses), XML-based bill payments
- QuickBooks: Expenses map to Purchases, Classes for tracking
- Xero: Expenses map to Bank Transactions, Tracking Categories for dimensions
- NetSuite: Supports Subsidiaries and multi-dimensional tracking
Complete Integration Checklist
| Area | Requirement |
|---|---|
| Connection | Embed Vault for OAuth connection flow |
| Handle connection state webhooks (callable, invalid, revoked) | |
| Support multiple accounting connections per user | |
| Mapping | Fetch and display ledger accounts for mapping |
| Map expense categories → expense ledger accounts | |
| Map payment methods → bank/card ledger accounts | |
| Map merchants → suppliers (with option to create new) | |
| Map tax categories → tax rates | |
| Optional: Map departments → tracking categories | |
| Implement auto-match by label similarity | |
| Persist mappings per user per connection | |
| Export | Create Bills for AP / reimbursement expenses |
| Create Expenses for already-paid transactions (where supported) | |
| Handle line items with correct account, tax, and tracking references | |
| Support multi-currency with exchange rates | |
| Upload receipt attachments | |
| Reconciliation | Create Bill Payments to mark bills as paid |
| Handle partial payments and overpayments via allocations | |
| Verify bill status updates after payment creation | |
| Production | Error handling for auth failures, validation errors, rate limits |
| Webhook monitoring for connection health | |
| Retry logic with exponential backoff | |
| Logging for debugging sync failures | |
| User-facing sync status UI |
AI Agent Prompt
Use this prompt with your AI coding assistant (Claude, Cursor, Copilot, etc.) to scaffold the integration.
Related Guides
- Ledger Account Mapping — Building the mapping UI
- Integrating Expenses and Bills — Detailed Bills vs. Expenses guide
- Mark Invoices as Paid — Payment allocation
- Accounting Data Model — Entity relationships
- Vault — Embedding the connection UI
- Webhooks — Real-time event monitoring
- Tracking Dimensions — Departments and locations