Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Partner Program >

Application that allows our customers to create invoices when using the service

Started by Paul Quinn -   in Partner Program

We are creating an application whereby our customers (who have Xero accounts) subscribe to our service and complete forms to arrange events on behalf of their own clients. As part of the event organisation process they capture fees which they will charge their clients. We would like our service to send these fees captured to the customers' Xero accounts, to formulate an invoice that they can send to their clients.

We are a little unclear on how to make this work in the Xero environment and would appreciate any assistance. We have created a public app in our Xero developers console and started to build the integration. Some questions we have currently are as follows:

- Do we need to authorise in xero/oAuth center?
- Authorisation seems to expire after 30 mins, is there an alternate way of doing this to have ongoing auth?
- We are a little unclear whether or not this should be a partner or public application? Our initial enquiries suggested public was sufficient
- If a public application is sufficient how can we skip required step to authorize as xero logged user, or what is alternative?
- How can we switch our application between many organisations who will be linked to their own unique Xero accounts whilst using our service

If we are missing the mark completely please advise. Thanks in advance.

Cheers,

Paul
Hi Paul,

This is a common misconception amongst new developers. Public is a unapproved application type used for testing to serve as a xero addon at the production stage. The 30 min token expiry can only be refreshed using the partner application. Partner application is a public application that went through a approval process at xero to make sure there is no malicious intent in the application before posting it as an addon.

Customers can link to multiple Xero companies. For instance you might want the customer to be connected to his own xero while also being connected to yours. That way your customer can raise their own invoice and also get billed at the same time.

This scenario is achieved by storing tokens. These tokens is a series of numbers and letters that is added to the HEAD of your request to authenticate each request without user loggin in. If you have a one to one relationship between users and xero companies you will need to store the tokens on user level. If you have a one to many relationship you need additional tables to handle the token storage. If you have a many to many relationship you might need to consider implementing some kind on site grouping into you application.

This is quite a complicated explanation let me know if we can skype it's easier to show you than typing long winded paragraphs.

Kind Regards

Remember I consult on a per hour basis. Contact me if your need me to fix the problem. $35 per hour.

We can do a 30 min free consultation via Skype.

Henzard Kruger
Certified Advisor and Full Stack developer
Picahoo cc - 0711304241 - henzard@picahoo.co.za
Skype: henzard, Gtalk: henzardkruger@gmail.com
Quality is remembered long after the price is forgotten

I abide by the 3 message rule. After 3 messages we skype.
 

Henzard Kruger  

Thanks for your help Henzard. I will let you know if we need any further help. I am always on the hunt for developers, is there anywhere I can look to check out your specialisations?
 

Paul Quinn  

Well it's basically microsoft fullstack and linux fullstack. Let's setup a skype chat.
 

Henzard Kruger  

cool, will do. one further question for you.. where should we set the digital token which is to display after authorization in xero?
 

Paul Quinn  

As I said it's easier to show you the communication between my application and Xero using a proxy than explaining it. Let's Skype.
 

Henzard Kruger  

cool have added you on Skype
 

Paul Quinn