Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Partner Program >

Xero Invoice Integration

Started by bilin baby -   in Partner Program

Hi,

we are try to integrate xero in our products invoice section, its works but

1.. ISSUE ONE

ItemCode is not displayed in xero. we check the documentation its
ItemCode See Items(https://developer.xero.com/documentation/api/Items/)

<ItemCode> testdeal5 this one is not supported
so we use
<Items>
<Item>
<Code> testdeal5
its supported but the invoice don't show the code

2.
In our system (product) take extra shipping amount for some products how to pass shipping amount
in xero invoice


we are use : https://github.com/XeroAPI/PHP-Xero this api code

Thanks
Bilin
1. Make sure the item exists by first doing a update on https://api.xero.com/api.xro/2.0/Items then create Invoice. Items are not automatically created. So when adding
<LineItems>
<LineItem>
<ItemCode>001</ItemCode>
<Description>Monthly rental for property at 56a Wilkins Avenue</Description>
<Quantity>4.3400</Quantity>
<UnitAmount>395.00</UnitAmount>
<AccountCode>200</AccountCode>
</LineItem>
</LineItems>

<Message>Item code '001' is not valid</Message>

but after I add 001 the invoice commits perfectly.

2. Additional invoice line with no item code.

Kind Regards
Henzard Kruger
Certified Advisor and API developer
Picahoo cc - 0711304241 - henzard@picahoo.co.za
Skype: henzard, Gtalk: henzardkruger@gmail.com
 

Henzard Kruger  

Hi ,
Thanks For your replay,

1. we pass item code but its give some validation errors
we get : "Item code 'wk5-mandm-choco-45g' is not valid" message

User Agent: Response Code: 400 BadRequest

2. How we add an extra amount (shippingAmount )
eg : item unit price : 100
quantity : 2
sub total : 200
tax : 20
shippingAount : 200
Total Order Amount is 420

but xero show 220
how we pass shippingAmount 200

Thanks,
Bilin
 

bilin baby  

1. Make sure 'wk5-mandm-choco-45g' exists.
2. 2 invoice lines
item price 100
quantity 2
tax 20
subtotal 220
item price 200 <- shipping
quantity 1
tax 0
subtotal 200
total 420
 

Henzard Kruger  

Hi,

1. Make sure 'wk5-mandm-choco-45g' exists
U mean one item code is unique in one invoice right?

2, Shipping Amount
"LineItems"=> array(
"LineItem" => array(
array(
"Description" => "test item",
"Quantity" => "1",
"UnitAmount" => "200",
"AccountCode" => "200"
"TaxType" => "NONE",
),
array(
"Description" => "SHipping",
"Quantity" => "1",
"UnitAmount" => "200",
"AccountCode" => "200"
),
)
)
Right?
 

bilin baby  

No add "TaxType" => "NONE", to "Description" => "SHipping", TaxType is not optional.
The item code needs to be active in xero before you add invoice. Please let's skype if you don't understand.
 

Henzard Kruger  

HI,

SHipping Amount setup is ok, We understand.

But the ItemCode is Not clear(The item code needs to be active in xero before you add invoice.) please give some example code Like https://github.com/XeroAPI/PHP-Xero

Thanks,
Bilin
 

bilin baby  

Hi Team,

Give Your skype details for discussion about the ItemCode.

Thanks,
Bilin
 

bilin baby  

skype: henzard
 

Henzard Kruger  

Hello,

WE Get more than one people from this skype contact, how we find You, Please Give some extra details

Thanks,
Bilin
 

bilin baby  

Henzard Kruger, Bloemfontein South Afrcia
 

Henzard Kruger  

HI Henzard Kruger,

Please accept our skype, we just send a contact request

Thanks,
Bilin
 

bilin baby