I want to update a customer payment of type Refund to connect it to a credit note invoice.
I can do this using the Web UI. Under Betalningsrader (paymentlines) click the + and fill in the Type to Kreditfaktura (Creditnote) and Fakturanr (invoicenr). After that it automatically fetches the amount from the specified invoice and shows other information from the invoice on that paymentline. It also updates the payment's head on "Matchat/faktura" and "Tillgängligt belopp". After this the payment balances and I can unpark it and release it.
Before the information about the credit note is fetched:
After information about the credit note is fetched and populated into the paymentline:
I want to be able to do the same by using the endpoint:
I've tried many combinations of the posted body, for example:
I receive 204 No Content back, but the payment line wasn't added to the customer payment.
What to do to be able to add a payement line for a credit note to a customer payment (type: Refund) so the customer payment balances and can be released?
Hope someone can please help me out.
Solved! Go to Solution.
Sorry for the delay.
We are able to post the payment on our end:
Created payment of type refund in UI(Only customer set):
Json sent to CustomerPayment:
Copyright © 2022 Visma.com. All rights reserved.