With Monite, entities can set up recurring invoices to bill their customers the same amount every month (or other period). This is useful, for example, when implementing subscriptions or regular service bills.
Monite provides flexible date- and interval-based scheduling options for recurring invoices. Invoices can be created as drafts or configured to be automatically issued and sent to the predefined recipients.
Start by creating the base invoice that will be used as the template for recurring invoices. You will need the invoice id for use in subsequent API calls. Keep this invoice in the draft status.
Verify the invoice data to make sure the invoice can be issued successfully.
Each invoice can have only one recurrence schedule associated with it.
Next, configure the recurrence schedule for the base invoice. To do this, call POST /recurrences and specify the start date, frequency, end date or maximum number of invoices, and other settings. For a list of available settings, see Recurring invoice configuration.
After a recurrence schedule is created, the status of the base invoice is changed from draft to recurring.
Monite also calculates the scheduled creation dates for all instances of the recurring invoice, and returns these dates in the iterations list in the response from POST /recurrences:
The iterations array contains a list of all scheduled invoice iterations, both pending and past.
issue_at is the scheduled date when an invoice will be created or was created.issued_invoice_id is the ID of the created invoice. Initially the value is null because those invoices are not created yet. The value will be populated as soon as each invoice is created.status is one of:
pending - invoice is scheduled to be created.canceled - when a recurrence in canceled, the remaining future iteractions get this status.completed - invoice has been successfully created according to automation_level.issue_failed - when using automation_level = issue or issue_and_send, this status indicates that a draft invoice could not be issued.
See How recurring invoices are generated for details.skipped - indicates iterations that were skipped while the recurrence is paused.send_failed - when using automation_level = issue_and_send, this status indicates that an invoice could not be automatically sent.
See How recurring invoices are generated for details.The following fields are used in the request body for POST /recurrences and PATCH /recurrences/{recurrence_id}.
Monite offers flexible date- and interval-based scheduling options for recurring invoices. Schedule parameters include:
start_date - Required. The date when the first invoice is to be created. Can be the current or future date.
This date also defines the day of month/week/year when invoices will be created.end_date or max_occurrences (total number of invoices to create) is required to define the end condition for the recurrence.
frequency - Can be monthly (default), weekly, daily, quarterly, or yearly.
start_date must fall on that day.interval - How often invoices will be created based on the frequency, for example:
To send weekly or bi-weekly invoices on a specific day of week, start_date must fall on that day of week.
Invoices will be created on January 31, April 30, July 31, and so on.
Currently, Monite’s scheduler generates recurring invoices twice a day: at 0:00 UTC and 12:00 UTC.
Recurrences created between 0:00 UTC and 11:59 UTC will create invoices at 12:00 UTC on the scheduled day.
Recurrences created between 12:00 UTC and 23:59 UTC will create invoices at 0:00 UTC on the scheduled day.
Monite lets you customize how recurring invoices are created and, optionally, sent out.
This is controlled by the automation_level value in the recurrence configuration, and can be configured for each recurring invoice separately.
You can change the automation_level setting at any time, even for existing recurrences.
automation_level = draft
Individual invoices are created in the draft status and are not issued or sent to the counterpart.
Use this mode if the users may need to review or modify recurring invoices before sending them (for example, add an extra line item or an external payment link).
Users will need to mark invoices as issued and send them manually.
automation_level = issue
Individual invoices will have the issued status (that is, finalized and read-only) but will not be automatically sent to the counterpart.
This is useful if:
POST /receivables/{invoice_id}/send or through other means),automation_level = issue_and_send
Individual invoices will have the issued status and will be automatically sent to the counterpart.
To use this mode, you must provide the following values in the recurrence configuration:
subject_text - email subject text.
body_text - the text inserted in the email body. If you use custom email templates, this text substitutes the {{body_template}} variable in the receivables_invoice email template.
(Optional.) recipients - the list of invoice recipients (To, CC, BCC).
Can be omitted if the base invoice has the counterpart contact email specified in the counterpart_contact.email field.
recipients and the invoice’s counterpart_contact.email are defined, recurring invoices will be sent to all of these email addresses.When the date and time of a recurring invoice arrives, Monite creates a copy of the base invoice with the following additional values:
based_on is set to the ID of the base invoice.status starts as “draft”.automation_level is issue or issue_and_send:
status is immediatey changed from “draft” to “issued”.document_id is assigned an auto-generated invoice document number based on the entity’s document customization settings.issue_date is set to the current date.due_date field on the invoice response object.
For example, if the issue date is 2024-08-01 and the payment terms are Net 10, the due_date is set to 2024-08-11.automation_level is issue_and_send, Monite then automatically sends the invoice to the specified recipients.The ID of the created invoice is saved to the iterations[].issued_invoice_id field in the Recurrence object.
The status of the corresponding recurrence iteration is set to one of the following:
"completed" - the invoice was successfully created and sent to the recipients (if auto-sending is configured).
"send_failed" - the invoice was issued but could not be sent to the recipients. You can call GET /receivables/{invoice_id}/mails to check for email sending errors and then resend this invoice.
"issue_failed" - the invoice could not be moved from the draft to issued status.
The receivable.failed webhook is also triggered in this case.
Normally this should not happen. You can verify the invoice data to see if there are any errors, then update invalid or missing data and re-issue the invoice. If the base invoice’s data is no longer valid or sufficient, update the base invoice to resolve the issue for future invoices.
interations[].status) in the recurrence configuration.The current_iteration in the recurrence configuration is then incremented to reflect the next pending invoice.
The response from GET /recurrence/{recurrence_id} will then look like this:
If the created invoice is the last one according to the schedule, the recurrence status is changed from "active" to "completed" to indicate that no future invoices will be created:
Use GET /recurrences to get a list of base invoice IDs and their recurrence schedules.
The invoice_id fields in the response specify the base invoice IDs, and the iterations[i] fields contain the IDs of the existing recurring invoices that have been generated from the base invoices:
You can then use GET /receivable/{receivable_id} to fetch the details for a specific invoice ID, such as the total amount, line items, and so on.
There are two ways to update invoice data for a recurring invoice:
recurring status). The changes will be reflected in future invoices, but already created invoices are not affected.automation_level = draft, individual invoices are created as drafts and users can edit them before sending out.In any case, you can update any data in an invoice - line items, prices, payment terms, and so on.
To update the invoice number format, use the entity’s document number customizaton options.
To update the base invoice:
Call GET /recurrences/{recurrence_id} to get the ID of the base invoice for that recurrence:
Alternatively, call GET /receivables?status=recurring (optionally with other filters) and find the ID of the needed invoice template among the results.
Edit the base invoice by calling PATCH /receivables and providing the new values.
You can change the frequency, interval, end condition, and other parameters of existing recurrences at any time.
If the recurrence has not begun yet, you can also change the start_date to another non-past date.
Changing the invoice schedule affects the creation date of future invoices only, it does not affect already created invoices.
To update the recurrence configuration, send the new values in a PATCH /recurrences request:
The response reflects the updated pending iterations and their scheduled dates. If the recurrence has been extended, additional iterations are added. If the end date has been moved ealier, excess pending iterations are removed.
To temporarily pause a recurring invoice sequence, call POST /recurrences.
New invoices are not created while the recurrence is paused.
However, the corresponding scheduled invoice dates remain in the iterations array returned by GET /recurrences.
When the next scheduled invoice date is reached while the recurrence is paused, that iteration gets the "skipped" status to indicate that no invoice was created.
Skipped iterations still count towards the invoice limit for recurrences configured with max_occurrences.
To extend a paused recurrence, edit it and increase the max_occurrences value accordingly.
The recurrence stays in the "paused" status until either it is resumed or its end date or invoice limit is reached.
In the latter case, the recurrence status will be automatically changed from "paused" to "completed" once the end condition is met.
To resume a paused recurrence, call POST /recurrences.
This changes the recurrence’s status back to "active", and the remaining invoices will be created based on the configured schedule.
Skipped invoices will not be created retroactively.
You may want to cancel a recurring invoice, for example, if an entity’s customer cancels their order or subscription. To do this, call POST /recurrences/{recurrence_id}/cancel.
This prevents future invoices from being created, but already created invoices are not affected.
The status of the recurrence and any pending invoices in the iterations array becomes "canceled".
Only active and paused recurrences can be canceled.
Canceled recurring invoices cannot be reactivated or otherwise updated. The invoice and its recurrence schedule will have to be recreated anew.