<!-- Markdown rendering of https://accountingkit.dev/use-cases/invoice-sync/ -->

> Create invoices in Xero, QuickBooks Online, NetSuite, Sage Intacct, FreshBooks, and Wave with one request shape, and get paid status back as signed events.

Use case 01 · Invoice sync

# Send your product’s invoices into your customers’ books

When your product bills an order or a subscription, AccountingKit writes the invoice into the accounting system that customer already uses and tells you when it is paid. One request shape covers all six systems, and the connection decides the provider. Every write is idempotent, so a retry never creates a second invoice.

[Start free](https://app.accountingkit.dev/auth/login) [Quickstart](https://docs.accountingkit.dev/docs/quickstart) [Talk to us](https://accountingkit.dev/contact/?topic=integration)

Facts checked 27 November 2026

## How it works

1.  Connect
    
    ### Your customer connects their accounting system
    
    Create a connect session and send the customer to the hosted flow. They authorize and pick their organization, and you receive connection.created with the connection ID.
    
    `POST /v1/connect-sessions`
    
2.  Match
    
    ### Find or create the contact
    
    Search the customer’s ledger for the contact you are billing, or create it. Contact writes work on all six systems.
    
    `POST /v1/connections/{id}/contacts/search`
    
3.  Write
    
    ### Create the invoice
    
    Send the invoice with your own order ID as external\_reference and an Idempotency-Key. The response is the normalized invoice, with the provider’s ID.
    
    `POST /v1/connections/{id}/invoices`
    
4.  Listen
    
    ### React when it is paid
    
    AccountingKit reads the live invoice after each provider change and sends you a signed event when the amount paid, amount due, or status moves.
    
    `invoice.paid`
    

## Who builds this

-   Billing and subscription products that issue invoices on a schedule.
-   Vertical SaaS for field service, bookings, or practice management, where a completed job becomes an invoice.
-   Marketplaces and order platforms that invoice on behalf of the businesses using them.

## The request

The same body works for every provider. A few systems need one extra identifier, set under provider\_options: QuickBooks Online requires an item\_id and Wave requires a product\_id for invoice lines.

```

```

## Events you receive

Events are signed. Verify the `AccountingKit-Signature` header against the raw body before you parse it, and deduplicate on the event ID.

| Event | When it is sent |
| --- | --- |
| invoice.paid | The invoice moved from any unpaid state to paid. |
| invoice.payment_changed | The amount paid, amount due, or status differs from the last known state. |
| invoice.due_soon | Sent once when an unpaid invoice is within 3 days of its due date. |
| invoice.overdue | Sent once after the due date passes unpaid. |

## Coverage by accounting system

Xero, QuickBooks Online, FreshBooks, and Wave push changes through provider webhooks. NetSuite and Sage Intacct have no provider webhooks here, so their changes arrive through scheduled reconciliation.

| Capability | Xero | QuickBooks | NetSuite | Sage Intacct | FreshBooks | Wave |
| --- | --- | --- | --- | --- | --- | --- |
| Contacts | Read and write | Read and write | Read and write | Read and write | Read and write | Read and write |
| Invoices | Read and write | Read and write | Read and write | Read and write | Read and write | Read and write |
| Provider webhooks | Yes | Yes | Not available | Not available | Yes | Yes |
| Invoice PDF | Yes | Yes | Not available | Not available | Not available | Yes |

## When something goes wrong

### Your request times out

Retry with the same Idempotency-Key. You get the original result back with Idempotent-Replayed: true, and the provider is not called twice.

### The same key arrives with a different body

The API answers 409 CONFLICT instead of guessing which invoice you meant. Keys are kept for 30 days.

### The provider rate limit is hit

You get 429 RATE\_LIMITED with retry\_after\_seconds. The budget is per connection, so one busy customer cannot use up another customer’s allowance.

### A provider webhook never arrives

Hourly invoice reconciliation compares live payment state and sends the same events, so a missed notification is caught on the next pass.

## Limits to know first

-   This covers customer invoices. Supplier bills, expenses, and bank transactions are not part of the API.
-   Writes and synchronization need a cached connection. Zero-retention connections support live reads only, so they cannot create records or send payment and due-date events.
-   Each connection runs through an OAuth app you register with the provider, on every plan.

## Common questions

Do I need a different payload for each accounting system?

No. The invoice body is the same for all six systems. Where a provider needs an identifier that has no equivalent elsewhere, you set it under provider\_options for that provider. QuickBooks Online requires an item\_id and Wave requires a product\_id for invoice lines.

How do I find out that an invoice was paid?

Register a webhook endpoint for invoice.paid and invoice.payment\_changed. AccountingKit reads the live invoice after each provider change and sends a signed event when the payment state moves. Hourly reconciliation sends the same events for anything a provider webhook missed.

What stops a retry from creating a duplicate invoice?

Every write requires an Idempotency-Key. Repeating a request with the same key returns the original result and marks it Idempotent-Replayed: true. A retry that arrives while the first request is still running is rejected instead of writing twice.

Can I fetch the invoice PDF the accounting system renders?

Yes on Xero, QuickBooks Online, and Wave, through the invoice.download\_pdf provider action. Invoice events tell you when a cached PDF should be refreshed, because an invoice can change after it is issued.

## Keep reading

[**Quickstart**Documentation](https://docs.accountingkit.dev/docs/quickstart) [**API reference: resources**Documentation](https://docs.accountingkit.dev/docs/api-reference) [**Webhooks**Documentation](https://docs.accountingkit.dev/docs/webhooks) [**Quote to invoice**Accept a quote, raise the linked invoice, and create one purchase order per supplier as a single resumable workflow.](https://accountingkit.dev/use-cases/quote-to-invoice/) [**Payment sync**Apply payments to open invoices and react when an invoice is paid, due soon, or overdue.](https://accountingkit.dev/use-cases/payment-sync/) [**All six accounting integrations**Resources, webhooks, and limits for each system.](https://accountingkit.dev/integrations/)

## Build it against a sandbox company today.

The test environment is free. Or tell us which accounting systems your customers run and we will map the coverage with you.

[Start free](https://app.accountingkit.dev/auth/login) [Talk to us](https://accountingkit.dev/contact/?topic=integration)
