Recording and Viewing Invoice Payments

Last updated: July 8, 2026

Molecule can group your invoice line items into invoice documents and track payments against them. This article explains how payments are recorded and where you can view payment status.

How Invoices Group Line Items

An invoice in Molecule is a header record scoped to a single agreement and billing period. Every invoice line item that belongs to that agreement and period is linked to the invoice, so one invoice document can represent many underlying line items — for example, a month of sub-hourly settlement lines rolled into a single document.

Each invoice line item carries an invoice_id field identifying the invoice it belongs to, so you can always trace from a line item up to its document and from a document down to its member lines.

How Payments Work

Payments are tracked on the invoice itself, not on individual line items:

  • Each invoice carries a total amount and a paid amount, along with the payment date and a payment reference (for example, a wire confirmation or check number).

  • Partial payments are supported. The paid amount accumulates against the total, so the outstanding balance is simply the total amount minus the paid amount.

  • There is no separate payment "status" field to maintain — an invoice is unpaid, partially paid, or fully paid based on the comparison of paid amount to total amount.

  • If you previously recorded paid amounts on individual invoice line items, note that line-item-level payment tracking is deprecated. Record payments at the invoice level going forward.

Recording a Payment via the API

To record a payment, send a PATCH request to the invoice, updating the paid amount, payment date, and payment reference.

A typical flow:

  1. GET the invoice to confirm its current total and paid amounts.

  2. PATCH the invoice with the new paid amount (cumulative), the payment date, and your payment reference.

  3. GET the invoice again to verify the updated balance.

Invoice responses include the member line items nested in the payload, so a single request returns both the header (totals, payment fields) and the lines behind it.

For authentication and general API conventions, see the API documentation at developer.molecule.io.

Viewing Payment Status

You have two ways to see where invoices stand:

  • Via the APIGET invoices to retrieve totals, paid amounts, payment dates, and references, with member line items nested in the response. This is well suited to feeding your own AR tracking or reconciliation processes.

  • Via report — a standard report lists invoice headers with total vs. paid amounts, payment date and reference, and the agreement and period each invoice covers.

Invoices and Your ERP

If your Molecule instance is integrated with an ERP, invoice records can also carry ERP document references (such as the corresponding ERP document ID and billing status) written back by the integration. These appear alongside the payment fields, so the invoice record shows both what was sent to your ERP and what has been paid.

Questions?

If you'd like help setting up payment recording against your invoices, or want to know whether the invoice report is enabled for your instance, contact support@molecule.io.