Docs
Search…
⌃K
Links

Invoices

Learn about invoice workflows and their lifecycle.

Workflow

Invoices move through a series of statues from being generated to getting paid.
Status
Description
draft
The starting point for all invoices. In this state it can be edited.
open
The invoice has been finalised and is awaiting payment. It can no longer be edited.
paid
The invoice has been paid. It cannot transition to another state.
void
The invoice was created by mistake and cancelled.
uncollectible
It is unlikely this invoice will be paid and should be treated as bad debt.
An open invoice may be flagged as pending_payment in the Dashboard, this occurs when the customer is using an asynchronous payment method such as Bacs Direct Debit. In this state the invoice will remain open until the payment outcome is known.

Lifecycle

Invoices are created with status=draft, in this state they are editable.

Finalising

When an invoice is ready to be paid it must be finalised. This will set status=open on the invoice. After an invoice is finalised it can no longer be edited or deleted.
Subscriptions automatically create invoices when they are due, and automatically finalise approximately 1-2 hours later.

Paying an invoice

When a successful payment occurs the invoice is moved into the paid status. If an invoice's collection_method is set to charge_automatically a payment will be automatically attempted.
If the invoice was paid outside Yorlet you can mark the invoice as paid by changing the invoice's status, you can also add some context like a bank transfer reference.

Asynchronous payments

Some payment methods can take up to several days to confirm success, when an invoice is paid using one of these methods the invoice will be flagged as pending_payment=true and you will have to wait for the outcome of the charge. We recommend you listen to the invoice webhooks to monitor the status.

Mark as uncollectible

Sometimes you may have customers that cannot pay their outstanding invoices. When an invoice is open you can decide to mark the invoice as unlikely to be paid by changing the invoice status to uncollectible. This allows you to track all amounts owed as part of your bad debt process.

Voiding

Voiding is like deleting an invoice when in draft, but it instead of removing it you can maintain a record of the invoice for reporting purposes. You can only void an invoice when it is either open or uncollectible.