My Products
Help
SKAU AS
CONTRIBUTOR ***

Error creating payment - Last reference number customers

by SKAU AS

I started getting a error from 31.03.2023.  Any input why? and how to fix it?

 

 

 

{
"message": "VismaId: 254624cd-3f8c-4f93-a48d-bca8a3fe9033. Error creating payment Error: Inserting 'Customer payment' record raised at least one error. Please review the errors.\r\nLast reference number customers\r\n"
}

 

 

 

endpoint: https://integration.visma.net/API/controller/api/v1/customerpayment

 

request:

{
"hold": {
"value": false
},
"type": {
"value": "Prepayment"
},
"branch": {
"value": "1"
},
"currency": {
"value": "NOK"
},
"customer": {
"value": "22122"
},
"location": {
"value": "Main"
},
"paymentRef": {
"value": "014600006429c71cb0503767d850bf99"
},
"cashAccount": {
"value": "1501"
},
"invoiceText": {
"value": "Nettbutikk ordre: 36920"
},
"ordersToApply": [
{
"operation": "Insert",
"orderType": {
"value": "WE"
},
"orderNumber": {
"value": "36920"
},
"appliedToOrder": {
"value": 50
}
}
],
"paymentAmount": {
"value": 50
},
"paymentMethod": {
"value": "4"
},
"applicationDate": {
"value": "2023-04-09T08:06:54.939Z"
},
"referenceNumber": {},
"applicationPeriod": {
"value": "202304"
}
}

2 REPLIES 2
Quan Pham
PARTNER

by Quan Pham

Hi,
I'm getting the same error with this body and i can't see anything wrong with the customer number sequence.

It is possible to create the payment in the UI.

 

 "message""VismaId: 7e72a23f-5cb7-4853-895c-51c08010bc2b. Error creating payment Error: Inserting  'Customer payment' record raised at least one error. Please review the errors.\r\nLast reference number customers\r\n"

 

{
    "branch": {
        "Value""1"
    },
    "currency": {
        "Value""SEK"
    },
    "customer": {
        "Value""10089"
    },
    "type": {
        "Value""Payment"
    },
    "paymentRef": {
        "Value""Reglering"
    },
    "cashAccount": {
        "Value""1973"
    },
    "paymentMethod": {
        "Value""03"
    },
    "applicationDate": {
        "Value""2023-10-13T00:00:00.000Z"
    },
    "paymentAmount": {
        "Value"87603.75
    },
    "paymentLines": [{
            "refNbr": {
                "Value""1902396"
            },
            "documentType": {
                "Value""Invoice"
            },
            "amountPaid": {
                "Value"87603.75
            },
            "crossRate": {
                "Value"1.000000
            },
            "operation""Insert"
        }
    ]
}

by Magnus Johnsen

Hi,

You can check the last number available number under Enddate for either the numberSequence endpoint or the Number series window on the ui(ScreenId=CS201010&NumberingID=CUSTOMER):

2023-04-11 11_41_10-Visma.net Integrations Documentation - Brave.png2023-04-11 11_41_47-Number series - Brave.png