Expense management companies expect to POST payments, invoices, bills, and expenses to their customer’s accounting system of choice. With Merge, that entire flow is possible with a single API.

Here are two different workflows you can achieve with our Accounting Unified API. We’ll use Quickbooks Online as an example integration your customer would use.

Pre-Work

Make sure you have Merge up and running with either a Test or Production Linked Account created. You can follow our Get Started Guide to access the best sandbox Accounts for Accounting.

Record Credit Card Purchases

Overall Goal: Record Credit Card purchases to your customer’s accounting system, whether or not an invoice exists for that payment.

Scenario: Your app allows your user to record payments made via a credit card into their accounting platform.

Overall Approach: Maintain an accurate record of invoices with our GET /Invoices endpoint. Use our POST /Payments and POST /Invoices endpoints to record payments back into the accounting system, whether or not an invoice already exists.

STEP 1: Know Available Invoices

  • Goal: In your own app, maintain an accurate record of active invoices from your user's accounting system.

  • Approach: Periodically pull invoices from your users’ accounting system using our GET /Invoices endpoint.

STEP 2a: Record Payment if Invoice Exists

  • Goal: When your user records a credit card payment in your app for an existing payment, send back the payment and the amount into their account

  • Approach: Once the payment is made, populate a payload to our POST /Payments objects with the record of the transaction.

    • TIP: Don’t worry about matching up invoice IDs in your own code. If the invoice exists in the remote system, we automatically match our merge_id to the accounting systems ID for the invoice.

STEP 2b: Record a Payment if the Invoice Doesn’t Exist

  • Goal: Allow your user to both create a new invoice, and attach a payment to that existing invoice.

  • Approach:

    • First, record the Invoice back into your user's accounting platform using our POST /Invoice endpoint.

    • Then, simply follow the steps from Step 2a, only use the merge_id of the invoice that you just created.

Transfer Money

Overall Goal: Allow users to transfer money between accounts and have a record of the transaction.

Scenario: An employee transfers money from one account within your app to another.

Overall Approach: Your app will then automate a recording of this information as a journal entry, using the following steps:

Step 1. Create transfer record

  • Goal: Create a record of the transfer for both the sending account and the receiving account.

  • Approach: Using POST /journal-entries, create two objects within the lines array, to record both the transfer out of the sending account, as well as the transfer to the receiving account.

    • Tips:

      • Within the ‘lines’ array of the Journal Entries object, the ‘account’ field specifies where the transfer is going to / from. You can extract the Accounts ID from the Accounts model.

      • For the net_amount field, use either + or - along with the amount to specify the direction of the transfer. For example, if you are crediting an account, assign - to the net_amount. If you are debiting an account, assign a + to net_amount.

Step 2: GET /Journal-Entries to see reflections of all transactions

Did this answer your question?