Create and send invoices

Learn how to create an invoice to collect payment.

This page is about outgoing invoices sent by an to its clients. For the accounts payable invoices received by an entity from its vendors, see Payables.

An invoice is a document given to the buyer by the seller to collect payment. It includes the cost of the products purchased or services rendered to the buyer.

Invoices serve as legal records if they contain the names of the seller and client, the description and price of goods or services, and the payment terms.

⚠️ Considerations

Monite provides the ability to enable invoice issuers from supported countries to meet legal and tax requirements for issuing valid invoices. To enable invoice issuers outside of supported countries to create invoices, Monite provides default non-customized templates for non-supported countries that meet internationally recognized invoice standards, which can be utilized if the invoice issuer provides the applicable VAT rates via the tax_rate_value field in the invoice line item object. For a full list of supported countries, see Regulatory compliance.

Prerequisite: Specify the required entity information

To be able to create and issue invoices, an entity must have the following information specified.

Tax ID and/or VAT ID

An invoice must specify the tax ID and VAT ID of the entity that has issued this invoice. Depending on an entity’s jurisdiction, it may have both tax ID and VAT ID, or only one of them.

If an entity was initially created without a tax ID and VAT IDs, make sure to update entity information to add these values:

  • Tax ID is specified by the tax_id field in the Entity object.
  • VAT IDs can be added by using POST /entities/{entity_id}/vat_ids. For details, see Manage entity VAT IDs. You will need to specify the relevant VAT ID in the entity_vat_id_id field when creating an invoice.

Bank account

An invoice must also specify the entity bank account to which the payment should be made. This bank account must be able to accept the currency reflected on the invoice.

To learn how to add entity bank accounts, see Manage bank accounts. You will need to provide the ID of the appropriate bank account in the entity_bank_account_id field when creating an invoice.

Create an invoice

To create an outgoing invoice, complete the following steps:

  1. Create a counterpart that represents the customer.
  2. Create one or more products to be listed in the invoice.
  3. Get the applicable VAT rates based on the entity’s country and the counterpart’s country, and choose the rates for the products that will be listed in the invoice.
  4. Create payment terms for the invoice.
  5. Configure payment reminders and overdue reminders for the invoice. (Optional)
  6. Create the invoice.

Create an invoice based on a quote

You can also create an invoice based on an issued quote. For more information, see Create an invoice based on a quote.

1. Create a counterpart

The counterpart represents the customer purchasing your product or service. It is required for creating an invoice.

Learn how to create counterparts.

2. Create a product

The products or services to be listed in the invoice also must be created in advance. Depending on the entity’s country, measure units may be required for products before the invoice can be issued.

Learn how to create products and measure units.

Product currencies on invoices

Currencies of products added as line items on an invoice must always match the invoice’s base currency. You can create products in multiple currencies to match the invoice’s base currency. For more information, see Create a product.

3. Get VAT rates

Exception for non-supported countries, US, and Pakistan

Invoice issuers in certain non-supported countries, US, and Pakistan, do not need to display applicable VAT rates vis-à-vis their counterparties when creating an invoice. However, Monite enables such invoice issuers to provide the applicable VAT rates directly to the recipient by using the tax_rate_value field in the invoice line item object. For a full list of supported countries, see Regulatory compliance.

An invoice must specify VAT rates for its line items, even if the VAT is 0%. You can call GET /vat_rates?counterpart_id={id} to get the possible VAT rates for sales to the given counterpart:

1curl -X GET 'https://api.sandbox.monite.com/v1/vat_rates?counterpart_id=0414f...5435' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

The response includes the possible VAT rates (as a percentage multiplied by 100) and their IDs. Store the IDs somewhere as you will need them later.

1{
2 "data": [
3 {
4 "id": "a39a2ec3-765d-4f75-9a17-585a5d22509d",
5 ...
6 "value": 0,
7 "country": "DE"
8 },
9 {
10 "id": "51cefc6c-9f82-484e-ae6a-a3a89b507bea",
11 ...
12 "value": 700,
13 "country": "DE"
14 },
15 ...
16 ]
17}

The GET /vat_rates endpoint returns all VAT rates applicable to the entity’s VAT IDs. If the entity VAT ID is not present, the request will return only a 0% VAT rate for the entity’s country in the response.

If a counterpart is exempt from paying VAT, you can provide the reason for exemption via the optional vat_exemption_rationale field on the invoice object. For example, depending on the location, counterparts in healthcare and education services may be exempt from paying VATs. You can assign a 0% VAT rate on the invoice line item and provide the reason for exemption via the vat_exemption_rationale field. The reason provided will also be displayed on the invoice PDF.

Learn more about VAT rates.

4. Create payment terms

Payment terms define when the invoice is due to be paid. A common payment term is Net 30, which means the full payment is expected within 30 days. Payment terms can also include early payment discounts to encourage customers to pay upfront.

Learn how to create payment terms.

5. Create the invoice

Once the required counterpart, products, and payment terms are created, you can create the invoice for a given counterpart by calling POST /receivables endpoint with the type field in the payload set to invoice:

1curl -X POST 'https://api.sandbox.monite.com/v1/receivables' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "type": "invoice",
8 "currency": "EUR",
9 "counterpart_id": "0414f84c-b039-4203-b09b-e42b49245435",
10 "payment_page_url": "https://example.com/"
11 "line_items": [
12 {
13 "quantity": 1,
14 "product_id": "8755c86a-d630-4920-b6fd-fd2917d87dfb",
15 "vat_rate_id": "479155c3-0995-4689-a3cf-7482ea5132a9"
16 }
17 ],
18 "payment_terms_id": "e2cbbb5f-15e6-4b22-a942-8f51b7a81118",
19 "vat_exempt": false,
20 "counterpart_billing_address_id": "7482ea513-4689-d630-782b6f0fs3",
21 "entity_vat_id_id": "cb6c1c38-fdae-48f8-8e51-2d50d116b882",
22 "counterpart_vat_id_id": "782b6f0f-0177-475c-b1e4-98dc160a656f",
23 "entity_bank_account_id": "5624cca65c3e-8f18-4021-bdd1-3f548c1b"
24 }'

The request above is a minimal example. The request body can also include many other details about the invoice, such as a custom memo note, fulfillment_date (if different from the invoice date), discount, and other fields as necessary.

Notes

  • US entities cannot use the vat_rate_id on the line_items object when creating invoices. US entities must provide custom VAT rate values using the tax_rate_value field on the line_item object.
  • When UK entities create invoices that fall under the Northern Ireland Protocol, the entity_vat_id_id field must point to a VAT ID object with type="eu_vat". Learn how to configure VAT IDs for UK entities that operate under the NI Protocol.
  • If the entity has invoice payment reminders enabled (that is, entity setting reminder.enabled is true), the invoice payload MUST include payment_reminder_id.

The response contains the id assigned to the created invoice, along with the calculated total (total_amount), subtotal (subtotal), VAT (total_vat_amount), and other information. The invoice’s due date is automatically calculated based on the creation date and payment terms, and is returned in the due_date field on the invoice response object.

1{
2 "type": "invoice",
3 "id": "411dcb25-ec2c-49fc-bb2d-a72adac289b3",
4 "created_at": "2022-09-08T11:45:39.048015+00:00",
5 "updated_at": "2022-09-08T11:45:39.066711+00:00",
6 "document_id": null,
7 "currency": "EUR",
8 "subtotal": 5000,
9 "payment_page_url": "https://example.com/"
10 "line_items": [
11 {
12 "quantity": 5,
13 "product": {
14 ...
15 },
16 "total_before_vat": 5000
17 }
18 ],
19 "total_amount": 5950,
20 "total_vat_amount": 950,
21 ...
22 "memo": null,
23 "issue_date": null,
24 "total_vat_amounts": [
25 {
26 "id": "479155c3-0995-4689-a3cf-7482ea5132a9",
27 "value": 1900,
28 "amount": 950,
29 }
30 ],
31 "due_date": "2024-06-03",
32 "total_amount_with_credit_notes": 5950,
33 "amount_due": 5950,
34 "amount_paid": 0,
35 "payment_terms": {
36 ...
37 },
38 "status": "draft",
39 ...
40}

For a complete list of request and response fields, refer to the description of the POST /receivables endpoint.

Auto-calculated amounts

Monite automatically calculates the subtotal, total, and VAT amounts for the entire invoice and individual line items. These amounts are included in responses from the /receivables* endpoints. You can display these amounts in your application and use them in your business logic.

  • line_items[i].total_before_vat - line item amount including the discount but excluding VAT.
  • subtotal - invoice subtotal as a sum of line item subtotals. VAT and invoice-level discount are not included, but line item discounts are included.
  • discounted_subtotal - invoice subtotal after invoice-level discount. VAT is not included.
  • total_vat_amount - total VAT amount for the entire invoice.
  • total_vat_amounts - a list of VAT rates used in the invoice, along with the calculated total VAT amounts for each rate.
  • total_withholding_tax - if withholding_tax_rate is provided, the total withholding tax is calculated as the specified percentage of the discounted_subtotal.
  • total_amount - total invoice amount including VAT and all discounts (except payment term discounts). It’s the sum of discounted_subtotal and total_vat_amount, minus total_withholding_tax (if any).
  • total_amount_with_credit_notes - this is total_amount minus the amounts of all credit notes issued for this invoice. The value is updated whenever a new credit note is issued for this invoice.
  • amount_due - the remaining amount to be paid for this invoice. Initially, it equals the total_amount_with_credit_notes value and is automatically adjusted with each payment made towards the invoice. After the invoice is fully paid, the amount_due becomes 0.
  • amount_paid - the total amount paid towards an invoice. The initial value starts at 0 and can be continually updated for partially paid invoices. For more information, see Record payments on an invoice.
  • amount_to_pay - this is amount_due adjusted to reflect the currently effective discount (if any) defined by the payment terms. Payment terms discounts take effect once the invoice has been issued.

Notes

After creating invoices, you can download the invoice as a PDF or send it to the customer via email.

Download the invoice as PDF

Monite automatically generates PDFs for invoices and provides several built-in PDF templates. The counterpart’s PDF is returned in the file_url field in the invoice response:

1{
2 "type": "invoice",
3 ...
4 "file_language": "de"
5 "file_url": "https://bucketname.s3.amazonaws.com/<random_UUID_1>/<random_UUID_2>.pdf",
6}

The file_url field returns the invoice PDF in the counterpart’s language—file_language. Monite also provides a copy of the invoice PDF in the entity’s language—original_file_language. This can be accessed using the original_file_url field on the invoice object. The PDF’s language on the original_file_url field depends on the entity’s defined language in the entity settings.

If file_url or original_file_url field is returned as null, retry the request to GET /receivables/{invoice_id} after some time.

You can also retrieve only the invoice’s entity and counterpart PDFs by making a GET request to the /receivables/{invoice_id}/pdf_link endpoint as shown:

1curl -X GET 'https://api.sandbox.monite.com/v1/receivables/411dc6eb...6289b3/pdf_link' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

It returns the following response:

1{
2 "file_url": "https://bucketname.s3.amazonaws.com/<random_UUID_1>/<random_UUID_2>.pdf",
3 "original_file_url": "https://bucketname.s3.amazonaws.com/<random_UUID_1>/<random_UUID_2>.pdf"
4}

Here’s how the PDF looks like:

A PDF invoice
A PDF invoice

The PDF file is updated automatically if the invoice is changed (for example, if new line items are added to a draft invoice, or if the counterpart address is changed).

Invoice customization

Monite allows entities to modify specific entity information on an invoice. This includes providing a different entity logo, website, and contact information on the invoice object. You can only do this after creating the invoice by updating the invoice using the PATCH /receivables/{receivable_id} endpoint.

Modifying the entity information on the Invoice object only affects the entity information on that specific invoice. The entity’s existing or newly created invoices will retain the original entity information.

PDF localization

Monite provides several built-in PDF templates for receivables. The language on the invoice’s PDF depends on the language of the invoice’s counterpart. If the counterpart language is absent, the invoice’s PDF will be created in the entity’s language. Updating the invoice’s counterpart language or changing the invoice’s counterpart to a counterpart with a different language will also update the invoice’s PDF translation. For more information, see PDF localization.

Monite formats delimiters and decimal separators on amounts displayed on the PDFs based on the entity’s country. Entities can change their default template or customize their chosen templates anytime. For more information, see PDF templates.

Verify the invoice

Before a newly created invoice can be issued to a counterpart, certain required information must be present on the invoice. This includes information about the entity, counterpart, line items, and VAT rates. To trigger regulatory checks for an invoice and check that an invoice contains all required information, call POST /receivables/{receivable_id}/verify:

1curl -X POST 'https://api.sandbox.monite.com/v1/receivables/411dcb...289b3/verify' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

The errors object in the response shows all the missing information required on the invoice. If the invoice has all required information filled in, all response fields have the null value. The warnings object in the response represents possible faulty configurations on the invoice. For example, a mismatch between payment terms and payment reminders:

1{
2 "errors": {
3 "counterpart": null,
4 "entity": null,
5 "products": null,
6 "receivable": null,
7 "vat_rates": null
8 },
9 "warnings": {
10 "payment_reminders": "The due date on one or more of the invoice's payment term's tier comes before the scheduled reminder date for the corresponding tier. Review the reminders configuration for the invoice."
11 }
12}

If some of the required invoice fields are missing, the response contains a list of the missing fields. For example, the following response means that the entity tax ID, the counterpart tax ID, and measure unit ID on the invoice’s second line item are missing. To make the invoice valid, you will need to update the corresponding entity and counterpart objects and provide their tax_id.

1{
2 "errors": {
3 "counterpart": ["tax_id"],
4 "entity": ["tax_id"],
5 "products": [
6 {
7 "line_item_number": 2,
8 "missing_fields": ["measure_unit_id"]
9 }
10 ],
11 "receivable": null,
12 "vat_rates": null
13 },
14 "warnings": {
15 "payment_reminders": null
16 }
17}

Send the invoice via email

Once a draft invoice has been finalized, you can send it to the counterpart via email. The invoice will be attached as a PDF file to the email. You can also preview the invoice’s email before sending it; for more information, see Preview an invoice’s email.

To send an invoice, call POST /receivables/{receivable_id}/send and provide the subject_text and body_text. The language field determines the language of the email template used to send the invoice. If a value is not provided, it defaults to en.

Aside from the counterpart’s default email address, Monite also allows you to provide a list of email addresses to send the invoice using the recipients field. If the recipients field is not provided, the invoice email is sent only to the counterpart’s email address.

1curl -X POST 'https://api.sandbox.monite.com/v1/receivables/411dcb...289b3/send' \
2 -H 'X-Monite-Version: 2024-01-31' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "subject_text": "New invoice #{invoice_number}",
8 "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!",
9 "language": "en",
10 "recipients": {
11 "to": ["dana@example.com"],
12 "cc": ["support@example.com", "sales@example.com"],
13 "bcc": ["exec@example.com"]
14 }
15 }'

Notes

  • The values of the subject_text and body_text fields will replace the subject_text and body_template variables if they were used when creating your custom templates. For more information, see Create and manage email templates and Variables list. Both the subject and body texts can include variables as placeholders for invoice-specific and counterpart-specific data.
  • You can opt to attach the invoice’s PDF to the email sent to the counterpart. To do this, you must update the value of the mail.attach_documents_as_pdf field to true in your Monite partner settings. For more information, see Update partner settings.

The To email address is taken from the Counterpart object associated with the invoice. This address is also returned in the counterpart_contact.email field of the Receivable object that represents the invoice.

All invoice emails are sent from the noreply@monite.com email address by default. You can customize the email domain name—@exampleCompany.com— by configuring a mailbox for the entity. You can also customize the email sender name and username by updating your Monite partner settings. For more information, see Update partner settings.

A 200 OK response from POST /receivables/{receivable_id}/send means the email was successfully sent from the Monite email server.

Notes

  • Sending a draft invoice changes its status to issued, and the issued_date field is automatically set to the current date and time. Issued invoices can no longer be edited.
  • Invoices in the uncollectible status cannot be sent via email. All other statuses can be sent.

Resend an invoice

To resend an already issued invoice, you can call POST /receivables/{receivable_id}/send again, optionally with different subject_text and body_text templates.

Monite also automatically sends payment reminders to the counterpart before the invoice due date and each payment term.

Resending an invoice does not change its status or issued_date.