Recurring invoices

Learn how to create and manage recurring invoices in Monite.

Overview

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.

Create a recurring invoice

1. Create a draft invoice template

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.

2. Set up the recurrence

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.

You can also change most of these settings later.
1curl -X POST 'https://api.sandbox.monite.com/v1/recurrences' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "invoice_id": "8beb7faa-6851-44c8-9fb9-24a94ca30343",
8
9 "start_date": "2025-01-20",
10 "end_date": "2025-12-20",
11 "frequency": "month",
12
13 "automation_level": "issue_and_send",
14
15 "recipients": {
16 "to": ["customer@example.org"],
17 "cc": ["support@entity.example.com", "sales@entity.example.com"],
18 "bcc": ["exec@entity.example.com"]
19 },
20 "subject_text": "New invoice #{invoice_number}",
21 "body_text": "Dear {contact_name},\n\nThank you for your business!\nPlease pay the balance of {amount_due} (invoice #{invoice_number}) by {due_date}.\n\nFor any questions or concerns, please don’t hesitate to get in touch with us at {entity_email}. We look forward to serving you again and wish you all the best!"
22 }'

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:

1{
2 "id": "b17d34e3-63c0-4c44-a39c-e09a162ef3b4",
3 ...
4 "current_iteration": 1,
5 "iterations": [
6 {
7 "issue_at": "2025-01-20",
8 "issued_invoice_id": null,
9 "status": "pending",
10 "iteration": 1
11 },
12 {
13 "issue_at": "2025-02-20",
14 "issued_invoice_id": null,
15 "status": "pending",
16 "iteration": 2
17 },
18 {
19 "issue_at": "2025-03-20",
20 "issued_invoice_id": null,
21 "status": "pending",
22 "iteration": 3
23 },
24 ...
25 ],
26 "status": "active"
27}

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.

Recurring invoice configuration

The following fields are used in the request body for POST /recurrences and PATCH /recurrences/{recurrence_id}.

Schedule

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.
  • Either end_date or max_occurrences (total number of invoices to create) is required to define the end condition for the recurrence.
    Currently, invoices cannot be indefinitely recurring. However, you can extend a recurrence when it is reaching its end date.
  • frequency - Can be monthly (default), weekly, daily, quarterly, or yearly.
    • When creating monthly or quarterly invoices on the 31st, 30th, or 29th, if a month does not have this day the invoice will be created on the last day of that month.
    • When using weekly frequency, if you want to send invoices on a specific day of week (e.g. Tuesday) the start_date must fall on that day.
  • interval - How often invoices will be created based on the frequency, for example:
    • 1 (default) means every month/week/day/etc.
    • 2 means every 2 months/weeks/days/etc.

Examples

POST /recurrences
1{
2 ...
3 "start_date": "2025-05-20",
4 "end_date": "2026-04-30",
5
6 // Default values, can be omitted
7 "frequency": "month",
8 "interval": 1
9}

To send weekly or bi-weekly invoices on a specific day of week, start_date must fall on that day of week.

POST /recurrences
1{
2 ...
3 "start_date": "2025-04-22", // April 22, 2025 is Tuesday
4 "end_date": "2025-12-31",
5 "frequency": "week",
6 "interval": 2
7}
POST /recurrences
1{
2 ...
3 "start_date": "2025-01-31",
4 "frequency": "quarter",
5 "max_occurrences": 5
6}

Invoices will be created on January 31, April 30, July 31, and so on.

Time of day

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.

Invoice creation modes

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.

Create invoices as drafts

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.

Create invoices without sending

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:

  • invoices may need to be sent to a different email address,
  • users want to manually trigger the sending of invoices (whether by using POST /receivables/{invoice_id}/send or through other means),
  • invoices are not emailed but instead get printed and sent via post.

Create and automatically send invoices

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.

    • If both the recurrence’s recipients and the invoice’s counterpart_contact.email are defined, recurring invoices will be sent to all of these email addresses.
1...
2"automation_level": "issue_and_send",
3"subject_text": "New invoice #{invoice_number}",
4"body_text": "Dear {contact_name},\n\nThank you for your business!\nPlease pay the balance of {amount_due} (invoice #{invoice_number}) by {due_date}.\n\nFor any questions or concerns, please don’t hesitate to get in touch with us at {entity_email}. We look forward to serving you again and wish you all the best!",
5"recipients": {
6 "to": ["customer@example.com"],
7 "cc": [],
8 "bcc": []
9},
10...

How recurring invoices are generated

When a recurring invoice date comes, 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”.
  • If 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.
    • Invoice due date is calculated automatically based on the payment terms of the base invoice, and is returned in the 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.
  • If 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.

Re-issuing or re-sending an invoice instance does not change the corresponding iteration status (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:

1{
2 "id": "b17d34e3-63c0-4c44-a39c-e09a162ef3b4",
3 "invoice_id": "<ID of the base invoice>",
4 "start_date": "2024-08-01",
5 "max_occurrences": 12,
6 "frequency": "month",
7 "interval": 1,
8 ...
9 "iterations": [
10 {
11 "issue_at": "2024-08-01",
12 "issued_invoice_id": "<ID of the created recurring invoice>",
13 "status": "completed",
14 "iteration": 1
15 },
16 {
17 "issue_at": "2024-09-01",
18 "issued_invoice_id": null,
19 "status": "pending",
20 "iteration": 2
21 },
22 ...
23 ],
24 "status": "active",
25 "current_iteration": 2
26}

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:

1{
2 ...
3 "id": "b17d34e3-63c0-4c44-a39c-e09a162ef3b4",
4 ...
5 "iterations": [ ... ],
6 "status": "completed",
7 ...
8}

Manage recurring invoices

View all recurring invoices

Use GET /recurrences to get a list of base invoice IDs and their recurrence schedules.

1curl -X GET 'https://api.sandbox.monite.com/v1/recurrences' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

The invoice_id fields in the response specify the base invoice IDs, and the iterations[i].issued_invoice_id fields contain the IDs of the existing recurring invoices that have been generated from the base invoices:

1{
2 "data": [
3 {
4 "invoice_id": "<base invoice ID>",
5 "start_date": "2024-08-01",
6 ...
7 "iterations": [
8 {
9 "issue_at": "2024-08-01",
10 "issued_invoice_id": "<ID of an already created recurring invoice>",
11 "status": "completed",
12 "iteration": 1
13 },
14 {
15 "issue_at": "2024-09-01",
16 "issued_invoice_id": null,
17 "status": "pending",
18 "iteration": 2
19 },
20 ...
21 ],
22 "status": "active",
23 "current_iteration": 2
24 },
25 ...
26 ]
27}

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.

Update invoice details

There are two ways to update invoice data for a recurring invoice:

  • Update the base invoice template (the invoice in the recurring status). The changes will be reflected in future invoices, but already created invoices are not affected.
  • With 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:

  1. Call GET /recurrences/{recurrence_id} to get the ID of the base invoice for that recurrence:

    1{
    2 "id": "b17d34e3-63c0-4c44-a39c-e09a162ef3b4",
    3 "invoice_id": "8beb7faa-6851-44c8-9fb9-24a94ca30343"
    4 ...
    5}

    Alternatively, call GET /receivables?status=recurring (optionally with other filters) and find the ID of the needed invoice template among the results.

  2. Edit the base invoice by calling PATCH /receivables/{receivable_id} and providing the new values.

Change the invoice schedule

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/{recurrence_id} request:

1curl -X PATCH 'https://api.sandbox.monite.com/v1/recurrences/b17d3...3b4' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "end_date": "2026-11-30"
8 }'

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.

Pause a recurring invoice

To temporarily pause a recurring invoice sequence, call POST /recurrences/{recurrence_id}/pause.

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/{recurrence_id}. 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.

GET /recurrences/{recurrence_id}
1{
2 ...
3 "iterations": [
4 {
5 "issue_at": "2025-02-20",
6 "issued_invoice_id": "<ID of the created invoice>",
7 "status": "completed",
8 "iteration": 1
9 },
10 {
11 "issue_at": "2024-03-20",
12 "issued_invoice_id": null,
13 "status": "skipped",
14 "iteration": 2
15 },
16 {
17 "issue_at": "2024-04-20",
18 "issued_invoice_id": null,
19 "status": "pending",
20 "iteration": 2
21 },
22 ...
23 ]
24}

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.

Resume a recurring invoice

To resume a paused recurrence, call POST /recurrences/{recurrence_id}/resume. 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.

Cancel a recurring invoice

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.