My Products
Help
Stefan Hult
PARTNER

Visma Connect authentication and use of restrictions

by Stefan Hult

Hi, We have an integration that create payments of customer invoices. With the old login, it works as it should. The integration user is part of the restriction management and has full authorisation.
The integration has now been switched to Visma Connect authentication and has therefore stopped working with following error message. 
Error: Inserting 'Customer payment' record raised at least one error. Please review the errors.\r\nError: Cash account '15492' cannot found in the system. Check whether you have access rights to this object.\r\n
We have the same error on all brances and with different cash account. The common denominator seems to be the restriction/access rights.
The invoices can be paid via GUI.
Is there a user we can add to the restriction? 

We use the customerPayment endpoint and this is an example of what we send:

{
    "type": {"value": "Payment"},
    "hold": {"value": false},
    "customer": {"value": "KONTANT"},
    "paymentMethod": {"value": "09"},
    "cashAccount": {"value": "1910 13"},
    "paymentAmount": {"value": 750.0000},
    "invoiceText": {"value": "Tacdis"},
    "branch": {"value": "113"},
    "ordersToApply": [],    
    "paymentLines": [{
            "operation": "Insert",
            "documentType": {"value": "Invoice"},
            "refNbr": {"value": "39001245"},
            "amountPaid": {"value": 750.0000}
        }
    ]
}
 
2 REPLIES 2

by Magnus Johnsen

Hi Stefan,

Ok, thank you!

Stefan Hult
PARTNER

by Stefan Hult

We have found the Error. It has nothing to do with the new authentication.
It was just a coincidence that at the same time as we changed the integration, the consultant switched on the "Inter Branch Transactions". 

Consider this a bug report, that "CustomerPayment" stops working when you switch on "Inter Branch Transactions".

StefanHult_1-1697726853846.png