Hello,
to be able to add PaymentMethod & Cash account combinations, those assets should be registered in the Company > Branch you're working with.
For example, checking the availability of the desired Payment Method and the Cash Account in the Sales Order > Payment settings tab.
Please see the transactions below for POST Sales Order with PaymentMethod & Cash Account, then creating a payment via API for that Sales Order.
1) POST Sales Order <https://integration.visma.net/API/controller/api/v2/salesorder>
{
"lines": [
{
"operation": "Insert",
"inventoryNumber": {
"value": "1"
},
"quantity": {
"value": 2.0
},
"unitPrice": {
"value": 39.00
},
"lineDescription": {
"value": "test"
}
}
],
"orderType": {
"value": "SO"
},
"hold": {
"value": false
},
"date": {
"value": "2023-01-16"
},
"customer": {
"value": "01235"
},
"currency": {
"value": "NOK"
},
"description": {
"value": "test"
},
"paymentMethod": {
"value": "4"
},
"cashaccount": {
"value": "1900"
}
}
Financials ERP UI Output
2) POST Customer Payment for the recently created Sales Order
{
"type": {
"value": "Payment"
},
"hold": {
"value": false
},
"paymentRef": {
"value": "123456"
},
"customer": {
"value": "01235"
},
"paymentMethod": {
"value": "4"
},
"cashAccount": {
"value": "1900"
},
"currency": {
"value": "NOK"
},
"paymentAmount": {
"value": 78
},
"ordersToApply": [
{
"operation": "Insert",
"orderType": {
"value": "SO"
},
"orderNumber": {
"value": "000536"
},
"appliedToOrder": {
"value": 0
}
}
]
}
Financials ERP UI Output
... View more