Notify URL When Stuff Changes in Xero - Webhooks
I'm requesting "web hooks" for the Xero API.
Here's how they work: Customer provides a URL (http://myserver.com/xero/changed) to Xero, and when something is changed, Xero notifies that URL, perhaps indicating which records have changed.
The Xero API provides methods that you can query and compare with previous results to see what has changed. However, this is not performant for large data sets, and detecting changes involves a lot of code.
The competition has it - web hooks are supported by QuickBooks. Let's get them in Xero - it's a superior product in every other way.
We’re happy to announce that the invoice webhooks work has been completed! We now support both invoice and contact events.
We know there are lots of other events in Xero that would be useful to you as webhooks. To help us prioritise which ones to focus on next, please create separate suggestions and vote on the ones you’d like to see us implement.
-
Sam Sehnert commented
Definitely, an application I've been working on polls >100 invoices every day to see if they've been paid. If Xero sent data to a URL I controlled instead, there wouldn't be nearly as much pressure on BOTH ends, and the systems users would have a much more up to date representation of their invoices in the system.
-
Wayne Robinson commented
Actually, being able to connect to a RabbitMQ (or other AMQ-compatible), ActiveMQ (or other JMS/Stomp-compatible) messaging server for consistent, durable delivery of messages would be my preferred way to receive these notifications.
Even if the notifications were just pushed to an Amazon SQS account (either mine or Xero's, there are features to setup shared or anonymous access now) about changes happening (e.g. Invoice ID=xxx updated) so we could then retrieve the changes using the existing API.
-
Wayne Robinson commented
Actually, being able to connect to a RabbitMQ (or other AMQ-compatible), ActiveMQ (or other JMS/Stomp-compatible) messaging server for consistent, durable delivery of messages would be my preferred way to receive these notifications.
Even if the notifications were just pushed to an Amazon SQS account (either mine or Xero's, there are features to setup shared or anonymous access now) about changes happening (e.g. Invoice ID=xxx updated) so we could then retrieve the changes using the existing API.
-
damon commented
These http notification events are becoming known as webhooks. See webhooks.org. Freshbooks already has a great example of this. I need something similar for Xero.
http://developers.freshbooks.com/docs/callbacks/#events -
Adrian Edwards commented
-
Hamish commented
yeah like Paypal does with its IPN notify. its great!
-
Brad McNay commented
I think this would work for our situation as well. We are a hosting company and would love to be able to have when an invoice is paid, it automatically goes out to the hosting server and creates the account. In this case we would just have a page that Xero would post data to and it would take it from there, but I think this would work in that scenario.
-
Duy commented
it would be nice to have this kind of callback url
-
mdonseif commented
This would also allow to lighten the load on the xero.com servers because currently we do a lot of polling to see invoice status.
See http://www.webhooks.org/ for the general idea.
-
pdelaurentis commented
Here's an idea for how to implement this:
As you make changes to payments, invoices, etc, you can push a note about which object / account changed to a message queue (i.e. RabbitMQ). Then you have 1 or more servers that pull items from this message queue + send them to the URL associated with the customer's account.
This way, there's almost zero speed impact on your core system.
-
Dan Rucci commented
Agree this would be useful so that my ordering system automatically marked orders to 'processing' once the payment came in an was confirmed once reconciled in xero.
-
bumperbox commented
i have run out of votes, but if i did have votes i would vote for this.