Error creating invoices through Lexo office module

I am reaching out regarding an issue I am experiencing with creating invoices through the Lexo Office module to create invoice. Despite passing all the required fields, I continue to receive the following error message:
The operation failed with an error. 406 Invalid taxRatePercentage or does not match booking date or country code.

I have tried all possible solutions, including testing without the array aggregator, but the issue persists. Interestingly, when I created an invoice manually on the platform with the same details, it worked without any errors.

I have checked the API and confirmed that all required fields are being passed, including the correct country code (IT) in current case .

I have already taken the following steps to troubleshoot the issue by checking API doc of their all the required fields are passed , I tried to create invoice without aggregator still the same issue

this is the invoice Id created maually with same details ,it works


this is using th module

Any help will be much appericated

Hi @Hamza_Irshad,

Any luck with this?

1 Like

not yet, still same , facing same error

Ok, Can you download the input bundle of the Lexo Office and share that here?

I want to review the full payload that is being sent to Lexo, and since the taxRates as per their documents are closely linked with Country Code and Booking/Voucher Date, I just want to review your payload and see if I can figure out the issue you re getting.

1 Like

{
“address”: {
“zip”: “46100”,
“name”: " Tommaso Virgili",
“contactId”: “c59d12ed-6921-4b9a-ad55-131448e66129”,
“countryCode”: “IT”
},
“finalize”: true,
“lineItems”: [
{
“name”: “1 × Toolbox (at €99.00 / every 30 days)”,
“type”: “custom”,
“quantity”: 1,
“unitName”: “Stück”,
“unitPrice”: {
“currency”: “EUR”,
“netAmount”: 99,
“grossAmount”: 120.78,
“taxRatePercentage”: 22
},
“discountPercentage”: 0
}
],
“xRechnung”: {},
“totalPrice”: {
“currency”: “EUR”
},
“voucherDate”: “2023-04-30T18:42:26.093Z”,
“taxConditions”: {
“taxType”: “net”
},
“paymentConditions”: {
“paymentDiscountConditions”: {}
},
“shippingConditions”: {
“shippingDate”: “2023-04-30T18:42:26.094Z”,
“shippingType”: “service”
}
}

Hi @Hamza_Irshad,

I actually set up the Lexo Office on my end to test it thoroughly, During which what I found at least on my account/dashboard was for Italy, the available tax percentage was,

Invoice-lexoffice

And, When I tried to use 22 then I was getting the same error. Can you check your account and under Invoice/ Rechnung, see if you have those Tax percentage available?

From your initial screenshot, you were passing Contact ID, which is believe is created for separate company as it won’t work with 22% for Italy. Let me know once you get a chance to test this out, to verify you can change the value to 19 and see if that works for you.

1 Like


See this I am seeing the option of 22%

{
“id”: “7dfd3a23-6cb1-4d8e-a1b9-d82a78c69e4c”,
“organizationId”: “36e2260d-3820-4f06-9420-153fe735a3b8”,
“createdDate”: “2023-04-29T11:24:11.433Z”,
“updatedDate”: “2023-04-29T11:25:29.662Z”,
“version”: 3,
“language”: “de”,
“archived”: false,
“voucherStatus”: “draft”,
“voucherNumber”: “RE0070”,
“voucherDate”: “2023-04-28T22:00:00.000Z”,
“address”: {
“contactId”: “c59d12ed-6921-4b9a-ad55-131448e66129”,
“name”: “null Tommaso Virgili”,
“supplement”: “Via Bartolomeo Stefani 7”,
“city”: “Mantova”,
“zip”: “46100”,
“countryCode”: “IT”
},
“lineItems”: [
{
“type”: “custom”,
“name”: “Gamma”,
“quantity”: 1,
“unitName”: “Stück”,
“unitPrice”: {
“currency”: “EUR”,
“netAmount”: 99,
“grossAmount”: 120.78,
“taxRatePercentage”: 22
},
“discountPercentage”: 0,
“lineItemAmount”: 99
}
],
“totalPrice”: {
“currency”: “EUR”,
“totalNetAmount”: 99,
“totalGrossAmount”: 120.78,
“totalTaxAmount”: 21.78
},
“taxAmounts”: [
{
“taxRatePercentage”: 22,
“taxAmount”: 21.78,
“netAmount”: 99
}
],
“taxConditions”: {
“taxType”: “net”,
“taxSubType”: “distanceSales”
},
“paymentConditions”: {
“paymentTermLabel”: “Zahlbar sofort, rein netto”,
“paymentTermLabelTemplate”: “Zahlbar sofort, rein netto”,
“paymentTermDuration”: 0
},
“shippingConditions”: {
“shippingDate”: “2023-04-29T00:00:00.000+02:00”,
“shippingType”: “service”
},
“closingInvoice”: false,
“relatedVouchers”: ,
“introduction”: “Thank you for choosing Project Gamma!”,
“remark”: “Vielen Dank für die gute Zusammenarbeit.”,
“title”: “Rechnung”
}

you can see this JSON I created invoice manually , I am attaching the reference as well with pic

I found this too
One-Stop-Shop / EU-Regelung: Belege an Privatpersonen im EU-Ausland | lexoffice Help Center

Can you use Get a Contact and see which country this contactID is associated with,

“contactId”: “c59d12ed-6921-4b9a-ad55-131448e66129”,

1 Like

{
“id”: “c59d12ed-6921-4b9a-ad55-131448e66129”,
“organizationId”: “36e2260d-3820-4f06-9420-153fe735a3b8”,
“version”: 1,
“roles”: {
“customer”: {
“number”: 10146
}
},
“person”: {
“salutation”: “”,
“lastName”: “Tommaso Virgili”
},
“addresses”: {
“billing”: [
{
“supplement”: “Via Bartolomeo Stefani 7”,
“zip”: “46100”,
“city”: “Mantova”,
“countryCode”: “IT”
}
]
},
“emailAddresses”: {
“business”: [
sognandoleaway@gmail.com
]
},
“archived”: false
}