Xero - beautiful accounting software

Xero Business Community

Xero Business Community

Hi everyone, Come on over to the new discussions in Xero Central. It’s a more intuitive way to connect and chat all things business with one another. Ask questions, dish out answers, and get involved.

You can still view topics in the Xero Business Community to see all the useful knowledge that’s been shared there; and you can restart conversations you feel have been of huge value to you on Xero Central.

If you have brilliant ideas for innovations, you can keep on adding feature requests in the Xero Business Community, and voting on existing requests. There’s more in store, as we come up with the best way to take on your thoughts and share developments
Community > Using Xero Connected Apps >

WooCommerce plugin: Error creating Xero invoice - Validation Exception

Started by Jennifer Jeavons -   in Using Xero Connected Apps

We have been using the XERO Woocommerce plugin integration on our Woocommerce site successully for years now but in the last 2 months it has been throwing the following error when a discount code is used on an online sale from the website and it cannot create the invoice in Xero.

"ERROR creating Xero invoice: ErrorNumber: 10 ErrorType: ValidationException Message: A validation exception occurred Detail: The TaxType code ‘EXEMPTOUTPUT’ cannot be used with account code ‘403’."

We have tried the solution in the Woo documentation here but nothing works. https://docs.woocommerce.com/document/xero/#orders-that-contain-a-discount-give-validation-errors

Any ideas??
I have the Xero Woocommerce plugin setup on multiple websites for clients and my own business and been getting the same error as Jennifer mentioned above.

"ERROR creating Xero invoice: ErrorNumber: 10 ErrorType: ValidationException Message: A validation exception occurred Detail: The TaxType code ‘EXEMPTOUTPUT’ cannot be used with account code xxx"

I believe it started after the last Woocommerce update and only occurs when a discount is applied, which is nearly every second transaction in our case.

Will this issue be addressed in the next update of Xero for Woocommerce?

I'm not quite sure, if the issue lies with the plugin or a setting in Xero.

Any help or advice in fixing this would be highly appreciated.
 

David Schneider  

Ditto both @jennifer and @david - got the issue today - this is a BIG ISSUE for us as we use coupons to recruit new customers and need to export all sales to Xero for stock reconciliation - help us pls Xero!

ERROR creating Xero invoice: ErrorNumber: 10 ErrorType: ValidationException Message: A validation exception occurred Detail: The TaxType code ‘EXEMPTOUTPUT’ cannot be used with account code ‘400’

PS @Jennifer @David have you found a simple work-around to ex/import order from WooCommerce to Xero or do you manually load the invoice?

cheers,
DD
 

Dermott Dowling  

OK I managed to fix this.

The discount account in the Chart of Accounts needs to have no tax and be a SALES account. So by adjusting our discount account to be a SALES account with GST FREE INCOME as the tax type it works again.

I spoke with our accountants and apparently this is OK accounting wise and it has solved the issue for us.
 

Jennifer Jeavons  

Thanks @jennifer - your a star! Coded last order manually and wasted valuable time so have tried your remedy moving forward. cheers DD
 

Dermott Dowling  

Hey @Jennifer Jeavons how did you create the DISCOUNT account with a SALE Account as created a new discount account under Chart of Accounts but still getting the same error when trying to export from WooCommerce to Xero with a coupon code 10% offer cheers DD
 

Dermott Dowling  

The DISCOUNT account needs to be GST Free Income. It's the Tax that causes woo to error.

So Account Type = Sales
Tax = GST Free Income

Hope that helps!!

 

Jennifer Jeavons  

Thanks Jennifer,
Helps a lot - figured out my issue. Needed to change the account code from 400 = advertising in Xero fields on WooCommerce to 202 which I set up as code for Discount. All good and working now! Thanks again for your kind help.
 

Dermott Dowling  

I'm getting the same sort of error message:

ERROR creating Xero invoice: ErrorNumber: 10 ErrorType: ValidationException Message: A validation exception occurred Detail: The TaxType code ‘TAX002’ cannot be used with account code ‘290’.

But the latest update of the Xero plugin no longer has a code for Discount. The issue I have appears to be to do with the shipping account. I've set that up as 'Shipping Revenue' / Account type 'Sales' / Tax ' GST on Income.

Having trouble figuring out this one - appreciate some tips.
 

Richard Telford  

I'm getting the same error as above, regarding my shipping account. I changed it to GST Free Income as suggested above and still no go.

Like Richard, I would really appreciate some tips or suggestions on what to try next :)

Thanks in advance!
Crystal
 

Crystal Fieldhouse  

Hey @Richard @Crystal, not getting the same issue as you possibly as have not updated the plug in recently and now you are making me panic if we do! I created a new sales code for discount and made it GST free and then made sure that account number was matched in WooCommerce under the Xero plugin set up. That works for us. Not sure re: your needs.
cheers DD
 

Dermott Dowling  

Be warned - you may run into these issues DD if you update to 1.7.6. I don't want to change the GST setting, as shipping costs within Australia include GST and it is an income - not an expense, as we are charging extra for shipping.
 

Richard Telford  

I'm having the same issue. Have done the update. Argh!!. TAX002 error! Annoying the crap out of me!!
 

Jason Huxley  

Ok I will not be updating. Thanks for the heads up!
 

Jennifer Jeavons  

Hi, I have updated to 1.7.7 and notice settings in the WooCommerce>Xero there is a setting called 'Treat Shipping As'... i changed this to Sales (was Expense) and Orders went through... HOWEVER the API seems to be creating 2 new Tax Codes in Xero...
 

Philip Reid  

Hey Philip, did you have the same issues as I did before you upgraded? Are the new tax codes creating a problem?
 

Richard Telford  

Hi everyone,
I had the tax type code error, both with the shipping charges and discounts from offering coupon codes. I fixed the shipping charges error by following Philip's suggestion above of change the setting of 'treat shipping as' to income/revenue/sales and now orders invoices and payments are sending to xero. Now to tackle the discount code problem. Thanks for this discussion, this problem has been annoying me for a while.
 

Annalise Friend  

Hallelujah, Jennifer's fix above worked for the error when trying to export orders with coupon codes used. Discount account in chart of account Sales account, change to GST free income tax type (my default was actually BAS excluded because we aren't registered for GST). Thanks Jennifer:)
 

Annalise Friend  

Hi Richard, my issue was with shipping, and looks like Annalise has also fixed... mu problem now is the creation of a new Tax Type in Xero... why would it do that???
 

Philip Reid  

Hi Phillip - I'm now having the same issues since the update. I'm getting new tax rates 'GST (10.00%)' and 'Shipping (I) (10.00%)' that I didn't set up. It causes problems when trying to create BAS statements. Anyone else having these issues? Found a solution?
 

Richard Telford  

I'm getting the shipping error too. I don't have 1.7.7 yet; is there a fix prior to the update? (Ie don't have 'treat shipping as.... ' option)

ERROR creating Xero invoice: ErrorNumber: 10 ErrorType: ValidationException Message: A validation exception occurred Detail: The TaxType code ‘EXEMPTOUTPUT’ cannot be used with account code ‘425’.
 

Ryan Battye  

I think you really need the update.
Re the new tax settings that come in. I've found that this is an issue when doing my BAS. The work around for me was to 'Find & Recode' under the Advisor menu.
 

Richard Telford  

Hi All,
Any luck on being able to map Woo Commerce to the default Xero tax codes instead of creating its own new tax codes?
Thanks
 

Link Advisors  

Hey guys and gals,

Just updated Xero WooCommerce Plugin to latest version of plugin and got this error when trying to export an order from WooCommerce to Xero for invoicing. Think it refers to the freight line which I used to use code 201 in Xero (Freight Recharge). Anyone else had similar issues and worked out a quick fix or hack forward?

ERROR creating Xero invoice: ErrorNumber: 10 ErrorType: ValidationException Message: A validation exception occurred Detail: The TaxType code ‘EXEMPTEXPENSES’ cannot be used with account code ‘201’.

cheers,
Dermott @BeerCoAU
 

Dermott Dowling  

Hey Guys and Gals,
Just fixed the issue. Had incorrectly put shipping as an expense in set up. Make sure you treat it as revenue and I put shipping charges to a new account code in Xero called 201 Shipping Recharge Revenue or other revenue. All good now just sharing for those who are experiencing similar plugin update issues.
cheers,
Dermott
 

Dermott Dowling