Skip to content
Knowledge ERP Docs
API Reference ↗
Purchasing

Vendor Invoices & Payments

Track bills received from suppliers — with line items, tax, PO matching, and payments — from draft through to fully paid.

A vendor invoice is the bill a supplier sends you after they ship goods or provide a service. Knowledge ERP lets you record that bill, link it to the purchase order that generated it, verify every line matches what was actually received, apply payments, and track what you still owe — all in one place.

AP in a nutshell: a vendor invoice starts as a Draft, gets approved once the lines are verified against the PO, accumulates payments, and closes as Paid when the balance reaches zero.

Creating a vendor invoice #

New invoices are created from Purchasing → Vendor Invoices → New Vendor Invoice. The header captures:

  • Vendor — the supplier sending the bill. Required.
  • Purchase Order — the PO this invoice is billing against. Optional but recommended — it unlocks PO matching for three-way verification.
  • Invoice Number — the vendor's own reference number (e.g. INV-2024-0042). Optional but useful for finding the bill later.
  • Status — defaults to Draft (see Statuses).
  • Invoice Date and Due Date — the bill date and when payment is expected.
  • Tax Rate — an active tax rate applied to the subtotal. Changing the tax rate instantly recalculates amount_due.
  • Notes — any internal notes about the invoice.
  • Amount Due — computed from line items plus tax; shown as read-only on the form and kept in sync automatically.
  • Custom fields — any extra fields defined for vendor invoices appear at the bottom of the form. See Custom Fields.

Invoice statuses #

Every vendor invoice carries one of seven statuses, shown as a color-coded badge:

  • Draft — newly created, not yet submitted for approval.
  • Pending Approval — sent to a reviewer; still editable.
  • Approved — verified and ready to pay.
  • Partially Paid — one or more payments recorded; balance still outstanding.
  • Paidamount_paid equals amount_due; no balance remaining.
  • Disputed — flagged with a disagreement; immune to automatic status changes until resolved.
  • Overdue — past the due date and unpaid; can be set manually or by automation.

Status transitions to Partially Paid and Paid happen automatically when payments are recorded. A Disputed invoice is the only status that blocks automatic promotion — you must resolve the dispute first.

Line items #

The Items tab holds the individual lines of the invoice. Each line records:

  • Product — the Product being billed (optional; can leave blank and use a free-text description instead).
  • Description — a free-text label for the line; defaults to the Product's name.
  • Quantity — how many units are being invoiced (supports up to four decimal places for fractional amounts).
  • Unit Cost — the per-unit price billed, in dollars in the UI (stored and sent as cents over the API).
  • Notes — any per-line notes.

Adding or editing a line item automatically recalculates the invoice's subtotal, applies the selected tax rate, and updates amount_due.

PO matching #

When a vendor invoice is linked to a purchase order, the Match page (opened via the Match to PO action button on the invoice view page) lets you verify that what was invoiced aligns with what you actually received on the PO.

Each invoice line gets a match status against its linked PO line:

  • Matched — quantity and price both agree exactly with the received quantity and PO unit cost.
  • Qty Discrepancy — the invoiced quantity differs from what was received.
  • Price Discrepancy — the invoiced unit cost differs from the PO cost.
  • Discrepancy — both quantity and price differ.
  • Unlinked — the invoice line has no corresponding PO line yet.

From the Match page you can run Auto-Match to have the system link each invoice line to a PO line by Product automatically, or link and unlink lines manually. Once lines are reviewed you can Approve the invoice (moving it to Approved) or Mark Disputed if something looks wrong.

Recording payments #

Record each payment made against the invoice from its view page with the Record Payment action (the Payment History tab is a read-only log of them). The action is available on any invoice that is not in Draft or Paid status. It captures:

  • Amount — how much was paid, in dollars in the UI (cents over the API). The payment is capped at the remaining balance — you cannot overpay.
  • Payment Date — defaults to today.
  • Payment MethodCash, Check, Credit Card, Bank Transfer, or Other.
  • Reference Number — a check number, wire reference, or transaction ID.
  • Notes — any notes about the payment.

Each payment reduces amount_paid and the remaining balance, and the invoice status advances to Partially Paid or Paid automatically.

The vendor invoice list #

Purchasing → Vendor Invoices shows every invoice with its vendor, linked PO number, status badge, invoice date, due date, and amount due. Filter by status or use the Trashed toggle to include soft-deleted records. Search by invoice number or vendor name.

How vendor invoices connect to the rest of Purchasing #

  • Purchase Orders — link an invoice to a PO to unlock three-way PO matching and automatically scope the auto-match candidates to that PO's lines. See Purchase Orders.
  • Vendors — every invoice belongs to a vendor. Vendor contacts and payment terms live on the vendor record.
  • Tax Rates — invoices can reference any active tax rate to add tax to the subtotal automatically.
  • Attachments — attach the original PDF bill or supporting documents via the Attachments tab, which is powered by the shared media library.
  • Change History — every edit is logged on the Change History tab so there is a full audit trail of who changed what and when. See Change History & Undo.

Doing it from the API #

# Create a vendor invoice
curl -X POST "https://your-domain.com/api/v1/vendor-invoices" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vendor_id": "<vendor-id>",
    "purchase_order_id": "<po-id>",
    "invoice_number": "INV-2024-0042",
    "invoice_date": "2024-06-01",
    "due_date": "2024-07-01",
    "status": "draft"
  }'

# Add a line item (unit_cost in cents: 5000 = $50.00)
curl -X POST "https://your-domain.com/api/v1/vendor-invoice-items" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vendor_invoice_id": "<invoice-id>",
    "product_id": "<product-id>",
    "quantity": 10,
    "unit_cost": 5000
  }'

# Record a payment (amount in cents: 50000 = $500.00)
curl -X POST "https://your-domain.com/api/v1/vendor-payments" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vendor_invoice_id": "<invoice-id>",
    "amount": 50000,
    "payment_method": "bank_transfer",
    "reference_number": "WIRE-20240601"
  }'

All money fields — amount_due, amount_paid, tax_amount, unit_cost, and payment amount — are integers in cents over the API (5000 = $50.00). The UI displays dollars; the API always uses cents. Payments cannot exceed the invoice's remaining balance.