This is a staging build of the docs
We've reorganized our products to make building with Codat easier than ever
Skip to main content

Reconciling payments

Reconcile payments to the SMB's accounting software

When the user has completed their mapping and makes a payment from your application, this can then be reconciled back to the users accounting platform. A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to:

  • A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment.
  • An allocation of a supplier's credit note to a bill or perhaps a refund.
  • A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account.

Depending on the bill payments which are allowed by the underlying accounting package, some of these types may be combined.

Ways to Pay a bill

Using bill payments

Paying a single bill with a billPayment

If the scenario is a company making a payment to pay off a bill in full, then it should have the following properties:

  • A totalAmount indicating the amount of the bill that was paid. This is always positive.
  • A lines array containing one element with the following properties:
    • An amount equal to the totalAmount above.
    • A links array containing one element with the following properties:
      • A type indicating the type of link, in this case a Bill.
      • An id containing the ID of the bill that was paid.
      • An amount of -totalAmount (negative totalAmount), indicating that the entirety of the paid amount is allocated to the bill.
Create bill payment
POST https://api.codat.io/companies/{companyId}/connections/{connectionId}/push/billPayments

Payments of multiple bills

In some cases a company may make a single payment to a supplier that covers multiple invoices.

Create bill payment
POST https://api.codat.io/companies/{companyId}/connections/{connectionId}/push/billPayments

Using a bill credit notes

If a company receives a credit note from their supplier, the company could use this to offset the balance of any outstanding invoices from the same supplier.

With the billPayment API, you can partially or fully offset the balance of an invoice by adding the credit note in the lines array.

  1. The first step is to create a billCreditNote
  2. Once this is successfully created you can create a billPayment and include the billCreditNote and the bill to credit in the links array

Creating a Credit Note

Request URL
POST https://api.codat.io/companies/{companyId}/connections/{connectionId}/push/billCreditNotes

Once the credit note has been created, you can offset the balance of the credit note against any outstanding invoices by creating a billPayment.

For some accounting platforms, you can also use a combination of a billCreditNote and partial payment to pay off the full balance of a bill.

Allocating a Credit note against a bill
Request URL
POST https://api.codat.io/companies/{companyId}/connections/{connectionId}/push/billPayments

Was this page useful?
❤️
👍
🤔
👎
😭