Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Woocommerce-xero intergration: Request failed due OAuth error

Started by Keshni Morar -   in API Authentication

I have been intergrating Woocommerce and Xero, in my code I have changed all the xml that create Invoices to create a credit note instead. I use the normal woocommerce order form for entry but now when I place an order I get the error below:

Request failed due OAuth error: signature_invalid | Failed to validate signature.

I followed the API template below:

<CreditNotes>
<CreditNote>
<Type>ACCPAYCREDIT</Type>
<Contact>
<ContactNumber>0006841301</ContactNumber>
<Name>Ariki Properties</Name>
<ContactStatus>ACTIVE</ContactStatus>
<EmailAddress>emailaddress@yourdomain.com</EmailAddress>
<SkypeUserName>Skype Name/Number</SkypeUserName>
<BankAccountDetails>Bank Account Details</BankAccountDetails>
<TaxNumber>Tax ID Number</TaxNumber>
<AccountsReceivableTaxType>OUTPUT</AccountsReceivableTaxType>
<AccountsPayableTaxType>INPUT</AccountsPayableTaxType>
<FirstName>Simon</FirstName>
<LastName>Greenville</LastName>
<DefaultCurrency>USD</DefaultCurrency>
<Addresses>
<Address>
<AddressType>STREET</AddressType>
<AttentionTo>Simon G.</AttentionTo>
<AddressLine1>Level 71</AddressLine1>
<AddressLine2>30 Rockefeller plaza</AddressLine2>
<AddressLine3></AddressLine3>
<AddressLine4></AddressLine4>
<City>New York</City>
<Region>New York State</Region>
<PostalCode>10112</PostalCode>
<Country>USA</Country>
</Address>
<Address>
<AddressType>POBOX</AddressType>
<AttentionTo>Simon G.</AttentionTo>
<AddressLine1>PO Box 10112</AddressLine1>
<AddressLine2></AddressLine2>
<AddressLine3></AddressLine3>
<AddressLine4></AddressLine4>
<City>New York</City>
<Region>New York State</Region>
<PostalCode>10112</PostalCode>
<Country>USA</Country>
</Address>
</Addresses>
<Phones>
<Phone>
<PhoneType>DEFAULT</PhoneType>
<PhoneNumber>5996999</PhoneNumber>
<PhoneAreaCode>877</PhoneAreaCode>
<PhoneCountryCode>0001</PhoneCountryCode>
</Phone>
<Phone>
<PhoneType>DDI</PhoneType>
<PhoneNumber>1234567</PhoneNumber>
<PhoneAreaCode>877</PhoneAreaCode>
<PhoneCountryCode>0001</PhoneCountryCode>
</Phone>
<Phone>
<PhoneType>FAX</PhoneType>
<PhoneNumber>7654321</PhoneNumber>
<PhoneAreaCode>877</PhoneAreaCode>
<PhoneCountryCode>0001</PhoneCountryCode>
</Phone>
<Phone>
<PhoneType>MOBILE</PhoneType>
<PhoneNumber>5555555</PhoneNumber>
<PhoneAreaCode>877</PhoneAreaCode>
<PhoneCountryCode>0001</PhoneCountryCode>
</Phone>
</Phones>
</Contact>
<Date>2018-03-28T00:00:00</Date>
<CreditNoteNumber>CN-0153</CreditNoteNumber>
<Reference>{reference}</Reference>
<CurrencyCode>NZD</CurrencyCode>
<Status>SUBMITTED</Status>
<LineAmountTypes>Inclusive</LineAmountTypes>
<SubTotal>396.00</SubTotal>
<TotalTax>0.00</TotalTax>
<Total>396.00</Total>
<BrandingThemeID>3b148ee0-adfa-442c-a98b-9059a73e8ef5</BrandingThemeID>
<LineItems>
<LineItem>
<Description>Credit on overcharge last month as discussed</Description>
<Quantity>2.0000</Quantity>
<UnitAmount>180.00</UnitAmount>
<TaxType>NONE</TaxType>
<TaxAmount>0.00</TaxAmount>
<LineAmount>360.00</LineAmount>
<AccountCode>200</AccountCode>
</LineItem>
<LineItem>
<Description>Distounct on credit on overcharge last month as discussed</Description>
<Quantity>0.2000</Quantity>
<UnitAmount>180.00</UnitAmount>
<TaxType>NONE</TaxType>
<TaxAmount>0.00</TaxAmount>
<LineAmount>36.00</LineAmount>
<AccountCode>200</AccountCode>
</LineItem>
</LineItems>
</CreditNote>
</CreditNotes>

And my Xero setting are okay.

Does anyone have an idea what might be causing this?