Okey, I think I understand the scenario now. You will need to create it via the customerCreditNote endpoint, and then use that creditNote as a customerPayment against a customerInvoice.
{
"applicationDate": {
"value": "2024-01-25"
},
"applicationPeriod": {
"value": "202401"
},
"cashAccount": {
"value": "1930"
},
"customer": {
"value": "10015"
},
"currency": {
"value": "NOK"
},
"invoiceText": {
"value": "GRRRRRR"
},
"paymentAmount": {
"value": 1600
},
"paymentLines": [
{
"documentType": {
"value": "CreditNote"
},
"operation": "Insert",
"refNbr": {
"value": "000147"
}
},
{
"documentType": {
"value": "Invoice"
},
"operation": "Insert",
"refNbr": {
"value": "000148"
}
}
],
"paymentMethod": {
"value": "1"
},
"paymentRef": {
"value": "3416651"
},
"referenceNumber": {
"value": "28220162"
},
"type": {
"value": "payment"
}
}
I have tested this at my test-company and it works! 🙂👍
... View more