My Products
Help

Credit Note does not return PaymentLines from API

by Thomas Adrian - Consili (Updated ‎01-10-2020 14:06 by Thomas Adrian - Consili )

I have a credit notes that does not return payment lines from the API

what can be the cause of this?

 

I also noticed that ScreenID AR302000 show no paymentlines but AR301000 do, why?

I need to get the paymentlines, what should I do?

 

I am using the endpoint 
https://integration.visma.net/API/controller/api/v1/customerPayment?paymentType=CreditNote&customer=...

 

2020-10-01 13_46_17.jpg

 

 

 

 

[
    {
        "type""CreditNote",
        "refNbr""116698",
        "status""Open",
        "hold"false,
        "applicationDate""2020-06-01T00:00:00",
        "applicationPeriod""202006",
        "customer": {
            "number""50510",
            "name""HIDDEN"
        },
        "location": {
            "countryId""SE",
            "id""Primär",
            "name""Primärplats"
        },
        "currency""SEK",
        "paymentAmount"578.0000,
        "appliedToDocuments"0.0,
        "appliedToOrders"0.0,
        "availableBalance"578.00,
        "writeOffAmount"0.0,
        "financeCharges"0.0000,
        "deductedCharges"0.0000,
        "branch""1",
        "lastModifiedDateTime""2020-07-01T11:55:15.21",
        "paymentLines": [],
        "ordersToApply": [],
        "metadata": {
            "totalCount"1,
            "maxPageSize"500
        }
    }
]
4 REPLIES 4

by Magnus Johnsen (Updated ‎01-10-2020 14:59 by Magnus Johnsen VISMA )

Could you please explain the workflow from the start to the current result?

 

Where and how did you create the creditNote?

Where and how did you apply the paymentLine?

 

First a CreditNote needs to be created via customerCreditNote and then be released before it appears in the customerPayment module.

The items that are added in the customerCreditNote are not linked to any invoices, however, when the customerCreditNote has been released and then created in the customerPayment. The payment amount of the creditNote is applied to the payment.

After this, you apply the payment to an invoice.

 

CustomerCreditNote list(note that 000059 is not yet released):

2020-10-01 14_49_12-Sales invoices.png

Trying to add the creditNote to payment(note that 000059 is not available):

2020-10-01 14_49_30-Customer payments.png

Releasing the creditNote:

2020-10-01 14_49_55-Sales invoices.png

It is now available to create a customer payment from:

2020-10-01 14_50_30-Customer payments.png

thanks

 

I have not created the credit notes and do not know how/where they work in the system. 

My job is simply to read read all the credit notes into another system. 

 

what endpoint do you suggest I should use then?

 

thanks

Thomas

 

 

 

 

Accepted solution
Magnus Johnsen
VISMA

If you are looking for the items on the creditNote you should use customerCreditNote, if you are looking for what invoice it has been applied as a payment to you should use customerPayment. 

by Magnus Johnsen

Hi,

 

As per Swagger, the endpoint you are using represents SceenId=AR302000 in the UI, please have a look at it there and compare.

 

For the creditNote in Customer Invoice, you want to use the endpoint customerCreditNote.

 

Please check the Customer Payment in the UI and compare to your results and try a call to the customerCreditNote endpoint and see if you get the lines that are applied.

 

Please let us know the results and we'll investigate.

Thank you.