Get an invoice with its installments
Returns one invoice including its installments (ordered by sequence). Use an installment's id to create a payment link. Returns not_found for ids outside your tenant.
Available to admin and readonly API keys (no side effects).
Request
- Base URL: https://api.getfinero.com/functions/v1/api
- URL: https://api.getfinero.com/functions/v1/api/v1/invoices/{invoiceId}
- Auth: HTTP bearer
Path parameters
Invoice id.
Response
Success
Collect from the invoice header or its real installment schedule.
INVOICE MODE ONLY (collection_mode: invoice), where the invoice itself is what Finero collects and there are no installments to carry this: WHY it is not collectible, as stable codes — empty when nothing blocks it. The same codes, and the same derivation, as an installment's block_reasons; in installment mode read them there instead. Meanings: https://app.getfinero.com/guide.
Invoice id (stable Finero identifier).
Human-readable local or ERP invoice number.
Invoice currency. ISO 4217 alphabetic code, e.g. "USD".
Invoice total. Null while the ERP has none yet (a draft). Exact decimal string at the CURRENCY'S own scale — USD "1250.00", JPY "1250", BHD "1250.000". Never parse as float for arithmetic.
Invoice date (YYYY-MM-DD).
Invoice due date (YYYY-MM-DD).
The invoice's payment terms exactly as your ERP names them (for example NET30). Informational: due dates come from due_date and collection_due_date, never from the terms. Null when the ERP sent none, when the connection does not collect them, and for local invoices.
Due date for collectible invoice worklists: the invoice header date in invoice mode, or the earliest collectible installment date in installment mode. Null if nothing is collectible or no due date is available. Use Aging operations for the full dated balance report. Filter with due_before / due_after.
When Finero last read this invoice FROM the ERP. Use it to ask whether a row is still current with your ERP — updated_at cannot answer that, because Finero's own writes to the invoice move it too (marking an invoice no longer present; recording a payment on an invoice created in Finero), so a row can look freshly updated while the ERP has not been heard from in weeks. Finero's collection state alone does not move updated_at. Null for invoices created in Finero, which have no ERP to read from, and for a few rows that predate the field. (ISO 8601 UTC).
What Finero still has to collect on this invoice, as an exact decimal string. Null while the ERP has no amount yet (a draft): unknown, never zero. THIS IS THE FIELD THAT ACCOUNTS FOR PAYMENTS FINERO HAS ALREADY TAKEN, including before your ERP has been told about them; payments and changes made in your ERP arrive with the next sync. Zero for an invoice no longer present in your ERP. Sum this for what is owed: the summary's totals are this sum.
How much Finero has confirmed collected on this invoice, as an exact decimal string. Money taken through a Finero payment link only - a payment made directly to you, or settled in your ERP, is not counted here and leaves this at zero.
How far the money Finero collected has got into your ERP, or null when Finero has collected nothing on this invoice. held means the connection pushes receipts manually and an admin has not released this one yet; pending means the push is queued and processing that it is in flight - under all three, the ERP has not been told yet. posted means the ERP accepted the receipt - Finero's part ends there, and what the ERP does with it afterwards (allocating it, or reversing it) is the ERP's business. failed means the receipt never reached the ERP, so your ERP still shows that money as owed until someone acts. Finero retries a failed push every 15 minutes for 24 hours when the ERP was simply unreachable; any other cause waits for a person, because retrying cannot fix it. The WORST state across the invoice's pushes is reported, because this field exists to surface a problem and a majority would hide one. NOT TO BE CONFUSED WITH a payment's erp_push_status: that one is a SINGLE payment's own push, while this rolls up every push on the invoice.
ANSWER "HAS THIS INVOICE BEEN PAID?" FROM THIS FIELD. paid MEANS THE INVOICE IS PAID - nothing is left to collect on it - and it is the most current answer available: Finero knows the moment it collects, and your ERP finds out afterwards. paid REQUIRES TWO THINGS: Finero collected on it, AND no collection target has a balance outstanding. An invoice where Finero collected part and the remainder is excluded or otherwise blocked reads inactive, not paid — so paid can never hide money that is still owed. open means the invoice or a real installment is COLLECTIBLE by Finero — that, and nothing more. Whether a payment link or reminder actually goes out is a SEPARATE question, decided by which workflows this workspace has switched on, and no status on this invoice answers it. inactive is everything else. THE CONVERSE DOES NOT HOLD, and this is the one trap: NOT-paid does not mean unpaid. An invoice the customer settled directly with you, outside Finero, reads inactive - Finero did not take that money, so it cannot report having collected it. paid is conclusive; anything else means find out why. paid ALSO DOES NOT SAY HOW MUCH FINERO COLLECTED: an invoice settled by mixed paths - one installment direct to you, the rest through Finero - is still paid. Compare amount_collected against total_amount to attribute it. YOUR ERP LAGS THIS FIELD: it may still show a balance on a paid invoice until it applies Finero's receipt - NOT a reason to doubt the status. Read erp_push_state to tell ordinary lag from a push that will stay unreflected until someone acts. An invoice finalised with a balance still reads inactive when nothing on it can be collected - every installment excluded from collections, closed in your ERP, or the invoice has no billing email or a currency no connected payment provider can charge - and THE MONEY IS NOT WRITTEN OFF: collection_outstanding still carries it. Sum collection_outstanding for what is OWED - but it is populated on invoices nothing can be collected from, so filter to collection_status=open for what can actually be collected, and read each installment's collectible to see which parts. Invoice status blocks collection only when enabled on the connection; re-enabling requires fresh status. Other safeguards still apply. Inactive may also mean no balance outstanding, the ERP no longer has the invoice, or no payment schedule in installment mode. Invoice-only mode needs no schedule. A removed invoice can resume collection if a later sync finds it.
Whether a Finero payment link is currently active on any installment of this invoice. false on an open invoice is the worklist: something is owed and nothing has been sent to collect it. Filter on it rather than joining against the payment-link list.
Provenance / system of record: local = the invoice exists only in Finero; erp = an ERP connection owns (or will own) the record.
The exact ERP connection associated with this invoice.
Creation time (ISO 8601 UTC).
Last update time (ISO 8601 UTC).
Changes
No recorded changes to this operation across all 1 revision of this API.