> This page is for Unified.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Customer (AR) payment reconciliation

> How to reconcile accounts receivable invoices and payments with customer accounting systems using the Merge Accounting API.

---

#### User authorizes access

Your user authorizes your application to access their accounting service (e.g., QuickBooks Online, NetSuite) via an OAuth or similar authorization flow through Merge Link.

#### Retrieve your user's accounting configuration data

The following steps will cover the business logic you will need to configure in your backend to interact with Merge's Unified API.
"Settings" data refers to all information related to customers, accounts, items, and tracking categories. To do this, we will access four endpoints:

* Sync your customer's chart of accounts by using the [**GET** /accounts](https://docs.merge.dev/accounting/accounts/#accounts_list) endpoint.
* You can use the `classification` and `parent_account` fields to compile account types and hierarchy!
* Follow the steps outlined in the ["Sync Customers or Suppliers" use case](/merge-unified/use-cases/sync-customers-or-suppliers) to sync your customers in your system with the third party.
* If your customer has classes, locations, or departments configured, you can retrieve them from the accounting platform with [**GET** /Tracking Categories](https://docs.merge.dev/accounting/tracking-categories/#tracking_categories_list).
* Utilize the [**GET** /items](https://docs.merge.dev/accounting/items/#items_list) endpoint to pull in your customer's products, goods, and services.

#### Retrieve customer invoices

Retrieve all invoices for all customers:

* Use the [**GET** /Invoices](https://docs.merge.dev/accounting/invoices/#invoices_list) endpoint to access all invoices, and set the `type` query param = `ACCOUNTS_RECEIVABLE` to filter to only AR invoices.
* Look at the `balance` and `status` fields to find invoices that are not fully paid.

#### Reconcile invoices and payments

Based on the reconciliation process that occurs within your platform, you'll programmatically create payments and/or invoices.

* If an Invoice does not exist for a receipt of money, create an Invoice using the [**POST** /invoice](https://docs.merge.dev/accounting/invoices/#invoices_create) endpoint and corresponding Payment using the [**POST** /payment](https://docs.merge.dev/accounting/payments/#payments_create) endpoint.
* If an Invoice is not yet paid, create a Payment against the Invoice using the [**POST** /payment](https://docs.merge.dev/accounting/payments/#payments_create) endpoint.
* If you need to update an Invoice or Payment in the accounting platform, you can use [**PATCH** /invoice](https://docs.merge.dev/accounting/invoices/#invoices_partial_update) or [**PATCH** /payment](https://docs.merge.dev/accounting/payments/#payments_partial_update) endpoints.

#### Make it easy to make sense of spend with Merge

Integrate today or talk to our sales team to learn how Merge unlocks hundreds of integrations in days - not years.

\


Get a demo **

\
\