HomeGuidesRecipesAPI ExplorerForumSupport
Partner Portal
Partner Portal

Discounts

Learn how to add discounts to outgoing invoices and quotes.

Overview

A discount is a reduction in the price of a product or service that is offered by the seller. Discounts can apply either to the entire purchase, or to individual line items in an invoice or quote. Line item discounts are applied before overall discounts, and both are applied before VAT is added in.

πŸ“˜

To offer invoice discounts for early payments, use payment terms instead.

Discount types

Discounts can be specified as a percentage (such as 10.5%) or as a flat amount (such as € 12.5).

For example, a percentage discount of 10.5% is specified as follows:

"discount": {
  "type": "percentage",
  "amount": 1050  // 10.5%
},

A flat amount discount of € 12.5 is specified as follows, where the amount is represented in minor units:

"discount": {
  "type": "amount",
  "amount": 1250  // € 12.5
},

If the discount object is set to null, it means no discount.

Add a discount

When creating a new invoice or quote or when editing an existing draft one, use the discount field on the document level or line item level to specify the discount:

curl -X POST 'https://api.sandbox.monite.com/v1/receivables' \
     -H 'X-Monite-Version: 2023-09-01' \
     -H 'X-Monite-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{
       "type": "invoice",
       "currency": "EUR",
       ...
       "discount": {
         "type": "amount",
         "amount": 1250
       }
     }'
curl -X POST 'https://api.sandbox.monite.com/v1/receivables' \
     -H 'X-Monite-Version: 2023-09-01' \
     -H 'X-Monite-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{
       "type": "invoice",
       "currency": "EUR",
       ...
       "line_items": [
         {
           "quantity": 1,
           "product_id": "8755c86a-d630-4920-b6fd-fd2917d87dfb",
           "vat_rate_id": "479155c3-0995-4689-a3cf-7482ea5132a9",
           "discount": {
             "type": "percentage",
             "amount": 200
           }
         }
       ]
     }'

πŸ“˜

Note

Line item discounts apply to line item as a whole rather than the price of a single product unit. In other words, a line item's subtotal is calculated as (price * quantity) - discount.

Update a discount

While the invoice or quote is still in the draft status, you can update or remove the discounts if needed. To do this, call PATCH /receivables/{receivable_id} and provide the new discount object:

curl -X PATCH 'https://api.sandbox.monite.com/v1/receivables/411dc6eb...6289b3' \
     -H 'X-Monite-Version: 2023-09-01' \
     -H 'X-Monite-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{
      "invoice": {
        "discount": {
          "type": "amount",
          "amount": 1500
        }
      }
    }'
curl -X PATCH 'https://api.sandbox.monite.com/v1/receivables/b21c80...8ad9' \
     -H 'X-Monite-Version: 2023-09-01' \
     -H 'X-Monite-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{
      "quote": {
        "discount": {
          "type": "amount",
          "amount": 1500
        }
      }
    }'

πŸ“˜

Note

Invoices and quotes in the issued status can no longer be edited, but there are other ways to amend their discount.

For invoices:

  • To increase the discount, you can create a credit note for the difference amount.
  • To reduce or remove the discount, you can issue a new invoice for the difference amount.

For quotes:

  • To update or remove the discount, you can decline the existing quote and create a new one.

Remove a discount

To remove a discount from a draft invoice, draft quote, or an individual line item, call PATCH /receivables/{receivable_id} and set the corresponding document-level discount or line item discount to null. For example:

curl -X PATCH 'https://api.sandbox.monite.com/v1/receivables/411dc6eb...6289b3' \
     -H 'X-Monite-Version: 2023-09-01' \
     -H 'X-Monite-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{
      "invoice": {
        "discount": null
      }
    }'
curl -X PATCH 'https://api.sandbox.monite.com/v1/receivables/b21c80...8ad9' \
     -H 'X-Monite-Version: 2023-09-01' \
     -H 'X-Monite-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer ACCESS_TOKEN' \
     -H 'Content-Type: application/json' \
     -d '{
      "quote": {
        "discount": null
      }
    }'

Alternatively, you can set discount.amount to 0.