Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > SDKs >

BADDEBTRELIEF report tax type issue

Started by Alan Whitby -   in SDKs

It looks like the Xero sdk is hitting an internal validation error when fetching tax rates for one of our customers. The ReportTaxType is 'BADDEBTRELIEF' and the Xero library says that it's an invalid option.

I've updated to the latest version of the library, 2.12.1 and it hasn't resolved the issue. Details below

xeroapi/xero-php-oauth2 2.12.1

#0 vendor/xeroapi/xero-php-oauth2/lib/AccountingObjectSerializer.php(358): XeroAPI\XeroPHP\Models\Accounting\TaxRate->setReportTaxType('BADDEBTRELIEF')


Invalid value for 'report_tax_type', must be one of 'AVALARA', 'BASEXCLUDED', 'CAPITALSALESOUTPUT', 'CAPITALEXPENSESINPUT', 'ECOUTPUT', 'ECOUTPUTSERVICES', 'ECINPUT', 'ECACQUISITIONS', 'EXEMPTEXPENSES', 'EXEMPTINPUT', 'EXEMPTOUTPUT', 'GSTONIMPORTS', 'INPUT', 'INPUTTAXED', 'MOSSSALES', 'NONE', 'NONEOUTPUT', 'OUTPUT', 'PURCHASESINPUT', 'SALESOUTPUT', 'EXEMPTCAPITAL', 'EXEMPTEXPORT', 'CAPITALEXINPUT', 'GSTONCAPIMPORTS', 'GSTONCAPITALIMPORTS', 'REVERSECHARGES', 'PAYMENTS', 'INVOICE', 'CASH', 'ACCRUAL', 'FLATRATECASH', 'FLATRATEACCRUAL', 'ACCRUALS', 'TXCA', 'SRCAS', 'DSOUTPUT', 'BLINPUT2', 'EPINPUT', 'IMINPUT2', 'MEINPUT', 'IGDSINPUT2', 'ESN33OUTPUT', 'OPINPUT', 'OSOUTPUT', 'TXN33INPUT', 'TXESSINPUT', 'TXREINPUT', 'TXPETINPUT', 'NRINPUT', 'ES33OUTPUT', 'ZERORATEDINPUT', 'ZERORATEDOUTPUT', 'DRCHARGESUPPLY', 'DRCHARGE', 'CAPINPUT', 'CAPIMPORTS', 'IMINPUT', 'INPUT2', 'CIUINPUT', 'SRINPUT', 'OUTPUT2', 'SROUTPUT', 'CAPOUTPUT', 'SROUTPUT2', 'CIUOUTPUT', 'ZROUTPUT', 'ZREXPORT', 'ACC28PLUS', 'ACCUPTO28', 'OTHEROUTPUT', 'SHOUTPUT', 'ZRINPUT', 'BADDEBT', 'OTHERINPUT'
Hi Alan,

Apologies for the confusion.

There are several new tax rates introduced to the Xero organisations/tenants from Singapore region. The Xero SDKs don't have the taxes yet thus the error that you received.

The Xero-OpenAPI spec just been updated with the new taxes and we are looking to generate new SDKs from it as soon as possible.

If you want to add the new tax rates/types manually to the SDK that you are currently using, they are:
- BADDEBTRELIEF
- IGDSINPUT3
- SROVR
- TOURISTREFUND
- TXRCN33INPUT
- TXRCREINPUT
- TXRCESSINPUT
 

Welli Abdullah (Xero Staff)  

Hi Welli,

That's unfortunate to hear that Xero have broken their own API like that, what is the timeframe on releasing the new SDK? And how do we get notification once the SDK has been updated?

Alan
 

Alan Whitby  

Hi Alan,

Xero-PHP-OAuth2 2.13.0 with the new types was released today. The remaining SDKs should see the updates built and released over the next week.

Rett
 

Rett Behrens (Xero Staff)  

Hi Rett,

We are getting the same error for Java SDK as well. Could you please prioritise and release it soon? Out customers are unable to use it.

Thanks
 

Keith Tan  

Hi Keith, The latest Xero-Java SDK release includes the new values
 

Rett Behrens (Xero Staff)