Invoices
Sync invoices individually or by CSV.
Retrieve an invoice
Returns an invoice and any advance against it. Invoice identifiers are unique per payee, so the path includes both.
advance is null until an advance is requested. Funding source and terms are not returned.
path Parameters
payeeExternalIdYour identifier for the business.
Your identifier for the business.
externalIdYour identifier for the invoice. Unique per payee.
Your identifier for the invoice. Unique per payee.
Retrieve an invoice › Responses
The invoice.
externalIdstatusStatus as last synced by you. Lunch does not change it. Collection status is reported separately in collected and collectionState. Values may be added. Existing values will not be removed or changed. Handle unknown values.
faceValueFace value in cents. Positive. Maximum 2147483647 ($21,474,836.47).
collectedAmount collected from the payor, in cents. Never exceeds faceValue.
collectionStateDerived from collected and faceValue. Values may be added. Existing values will not be removed or changed. Handle unknown values.
issueDatedueDateadvancefundableWhether an advance can be requested now. Uses the same checks as POST /v1/advances: the invoice is eligible, has no existing advance, the business has completed onboarding, and the advance is within its limit.
notFundableReasonReason fundable is false. null when true. Does not include limit amounts.
Create or update an invoice
Creates or updates an invoice under your identifier. Creates the payee and payor if they have not been synced. Invoice identifiers are unique per payee.
Once an advance is requested, only status can be updated. Changes to the amount or dates are ignored, and outcome returns statusOnly.
path Parameters
externalIdYour identifier for the invoice. Unique per payee.
Your identifier for the invoice. Unique per payee.
Create or update an invoice › Request Body
The business owed the money.
The party that owes the money.
statusAdvances can only be requested on ISSUED invoices.
faceValueFace value in cents. Positive. Maximum 2147483647 ($21,474,836.47).
issueDatedueDateCreate or update an invoice › Responses
The invoice.
externalIdoutcomestatusOnly: an advance exists, so only status was updated. Values may be added. Existing values will not be removed or changed. Handle unknown values.
reasonRetrieve an import
Returns the report for an import. Use it to check results after an interrupted upload.
path Parameters
externalIdYour identifier for the import.
Your identifier for the import.
Retrieve an import › Responses
The import and its rows.
externalIdrowCountfinishedImport invoices
Imports up to 1000 invoices from a CSV. Each row is processed like PUT /invoices/{externalId}. Invalid rows are reported without failing the import.
- Required columns:
externalId,payeeLegalName,payorLegalName,status,faceValue,issueDate,dueDate. Matched by name, in any order. - Optional columns:
payeeExternalId,payorExternalId, and the tax ID and contact fields from the single-invoice endpoint, prefixed withpayeeorpayor. - Business identifiers: provide your own where possible. If blank, Lunch derives one from the legal name. Identical names resolve to the same business.
- Retries: re-upload the same file with the same identifier to resume an interrupted import. Rows already processed are skipped.
path Parameters
externalIdYour identifier for the import.
Your identifier for the import.
Import invoices › Responses
Import processed. Each row includes an outcome.
externalIdrowCountfinished
