My Products
Help
mlubera
CONTRIBUTOR *

Customer credit note with a reference to an invoice

by mlubera

Hi, We would like to create a customer credit note using the API and as far as we see we need to use applicationLines field in the payload for POST /controller/api/v2/customerCreditNote:

{
  "applicationLines": [
    {
      "operation": "Insert",
      "documentType": "Invoice",
      "refNbr": {
        "value": "<referenceNumber of the invoice>"
      },
      "amountPaid": {
        "value": "<amount>"
      }
    }
  ]
}

We're wondering what we should put as amountPaid in case the invoice contains multiple lines with different tax rates but we'd like to issue a credit note for 50% amount of an individual line. According to what we see for credit notes created in the Visma app, then fetched from API, "amountPaid" should include the amount plus taxes. Does it mean we need to calculate the tax ourselves? Can we provide net amount (without taxes) and let Visma calculate them? For example, if the invoice contains three lines:

  • amount: 2000, tax rate 5%
  • amount: 1000, tax rate 10%
  • amount: 3000, tax rate 20% So total amount excluding taxes is 6000, total amount including taxes is 2100 + 1100 + 3600 = 6800. If we would like to issue a credit note with 50% of the amount of the first line (50% * 2000 * 105% = 1050), can we provide just 50% * 2000 = 1000 and let Visma handle taxes or should we calculate taxes ourselves and provide the full amount including taxes?
1 REPLY 1

by Oskar Jansson

Hi, I'm not entirely sure I understand your question. You shouldn't need to calculate taxes yourself. The AmountPaid in applicationLines should include the total amount, taxes included.

If this doesn't answer your question, please describe step by step how you want to do this manually in Visma Net, and I can try to recreate it using the API.