Skip to main content
Docs menu

API reference

Client invoices

Read the invoices your workspace sends its clients, see what a record owes, record payments received outside Finn and link invoices to cases.

Beta. Two switches apply. Client invoices on the API must be on for your organization (403 invoices_off otherwise), and so must client invoicing itself (403 invoicing_off). Ask Finn support to turn them on.

Overview

These endpoints read the invoices your workspace sends to its own clients, record payments you receive outside Finn, and link an invoice to a CRM case. They are what the Billing pages in Finn show. They are the API behind the MCP server's list_invoices, get_invoice and get_contact_balance tools.

They are not Finn's invoices to you. Those are in Settings (/settings/finn_invoices).

Base URL: https://api.hirefinn.ai/api/v1. See authentication and scopes.

Credential and scopes

EndpointsScopeCredential
Readsbilling:readAn org API key, or a member token (a personal MCP key or an AI app's OAuth access token) of any role.
Writesbilling:writeAn org API key only. A member token gets 403 credential_not_supported.

Endpoints

MethodPathScopeWhat it does
GET/invoicesbilling:readList client invoices.
GET/invoices/{invoice_id}billing:readGet a client invoice.
POST/invoices/{invoice_id}/paymentsbilling:writeRecord a payment on a client invoice.
PUT/invoices/{invoice_id}/casebilling:writeLink a client invoice to a case.
GET/contacts/{contact_id}/balancebilling:readGet what a record owes.

GET /invoices lists newest first. It filters by status (draft, issued, part_paid, paid, void, open or overdue), contact_id, crm_case_id, overdue and q (a search term), and pages with limit and cursor. See pagination.

GET /invoices/{invoice_id} adds the invoice's lines, payments, credit notes and refunds. Answers carry the client's name, email, phone, GSTIN and country, never their address.

GET /contacts/{contact_id}/balance answers what a record owes in each currency: owed_minor, overdue_minor and the oldest_due date.

Amounts

<!-- price-lint-allow: minor-unit format example, not a price -->

All amounts are integers in the currency's minor unit, such as paise for INR: 500000 is ₹5,000.00.

Linking to a case

PUT /invoices/{invoice_id}/case takes { "crm_case_id": "..." }: one of the invoice client's CRM cases. Send null to unlink. The crm_case_id field and filter work only while invoice automations are on for your organization (403 invoice_automations_off otherwise).

Example: record a UPI payment

curl -X POST https://api.hirefinn.ai/api/v1/invoices/3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f/payments \
  -H "Authorization: Bearer $FINN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: pay-INV-0142-UTR4512XX" \
  -d '{
    "amount_minor": 500000,
    "method": "upi",
    "reference": "UTR4512XX",
    "received_at": "2026-11-18"
  }'

201 Created:

{
  "object": "invoice_payment_result",
  "payment": {
    "object": "invoice_payment",
    "id": "7b8c9d0e-1f2a-4b3c-9d4e-5f6a7b8c9d0e",
    "invoice_id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
    "amount_minor": 500000,
    "refunded_minor": 0,
    "currency": "INR",
    "method": "upi",
    "reference": "UTR4512XX",
    "receipt_number": "RCPT-0087",
    "source": "manual",
    "received_at": "2026-11-18T00:00:00.000Z",
    "created_at": "2026-11-27T10:05:00.000Z"
  },
  "invoice": {
    "object": "invoice",
    "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
    "number": "INV-0142",
    "status": "part_paid",
    "currency": "INR",
    "issue_date": "2026-11-10",
    "due_date": "2026-11-25",
    "contact_id": "6f1c2a0e-8d1b-4b7a-9f3e-2c4d5e6f7a8b",
    "contact_name": "Ravi Rao",
    "subtotal_minor": 1000000,
    "discount_minor": 0,
    "tax_minor": 180000,
    "total_minor": 1180000,
    "paid_minor": 500000,
    "credited_minor": 0,
    "balance_minor": 680000,
    "overdue": true,
    "days_overdue": 2,
    "plan_id": null,
    "share_url": null,
    "voided_at": null,
    "void_reason": null,
    "crm_case_id": null,
    "created_at": "2026-11-10T08:00:00.000Z",
    "updated_at": "2026-11-27T10:05:00.000Z"
  }
}
FieldTypeRequiredNotes
amount_minorintegerYesIn minor units. At most the balance due.
methodstringYesbank, upi, cash, cheque or other.
referencestringNoA UTR, cheque number or similar.
received_atstringNoThe date it was received (YYYY-MM-DD).
notesstringNo

A payment raises the invoice.paid or invoice.part_paid webhook event. Send an Idempotency-Key so a retry doesn't record the payment twice. See idempotency.

Rate limits

120 reads and 30 writes per minute per credential. See rate limits.

Errors

StatusCodeWhen
400invalid_requestA field or filter isn't valid. fields lists which.
400invalid_cursorThe cursor is malformed or from other filters.
401api_key_required, invalid_api_keyThe credential is missing, unknown or revoked.
403invoices_off, invoicing_offClient invoices on the API, or client invoicing, are off for your organization.
403invoice_automations_offLinking to a case, or the crm_case_id filter, while invoice automations are off.
403credential_not_supportedA write with a member token. Use an org key.
403insufficient_scopeThe credential lacks billing:read or billing:write.
404invoice_not_foundNo such invoice in your organization.
404case_not_foundThe case isn't one of this client's cases.
409invoice_not_issuedThe invoice is a draft. Issue it before recording a payment.
409overpaymentThe payment is more than the balance due.
409payment_duplicateThis payment is already recorded.
429rate_limitedOver the limit. Wait Retry-After seconds.
503unavailableThe organization's settings couldn't be read. Try again shortly.