to get a personalized navigation.
to get a personalized navigation.
Hi,
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:
PUT /controller/api/v1/customerPayment/{paymentNumber}
I've tried many combinations of the posted body, for example:
{
"type": {
"value": "Refund"
},
"paymentRef": {
"value": "0000000070"
},
"paymentLines": [
{
"cashDiscountTaken": {
"value": 0.0000
},
"operation": {
"value": "Insert"
},
"documentType": {
"value": "CreditNote"
},
"refNbr": {
"value": "100036"
},
"amountPaid": {
"value": 6125.0000
}
}
]
}
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.
Hi,
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:
Thanks, it works now! We accidently sent "operation": "Insert" as "operation": { "value": "Insert" }
Easy oversight, I did not notice that you had written the field that way either.
Glad that it works.
Hi,
We are looking in to this and will get back to you.
I can't see any issues with your JSON straight away.
Copyright © 2022 Visma.com. All rights reserved.