The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Hypermedia API looks cool...... but how do I do simple things?

Hi FC,

Excited about FoxyCart's Hypermedia API - what a tremendous effort, congratulations!

I just hope I can use it correctly :-) In my opinion, HAPI doc needs a bit of work - specifically, on WHAT you can do with your FoxyCart Client.

Here's the situation I found myself in. I admit, I may have interpreted instructions incorrectly, but here it is...

So, I started here: I created server-side workflow to validate purchases, add items to cart with JSONP and send user to checkout page.

Next, I thought I'd work on webhook to parse transaction results:

And I saw the deprecation notice. My immediate thought was - great, I don't need to build the Transaction Webhook endpoint and won't have to deal with the nasty XML structures. I hoped I'd be able to somehow connect to my store and see occurred transactions and fetch the result in a nice JSON object.

But then, looking at HAPI cheat sheet or HAPI resources I do not immediately see the method of handing transaction results.

Some of my questions:

1. Can HAPI replace JSONP - can I use Foxy Client to work with orders on the backend?
2. Do I still need to use Transaction Webhook?
3. How does the deprecation of current API affect webhooks and whether they will all continue to work with XML format?

Would be great if you added a couple of HOW-TOs to the doc.

Once again, thanks a lot for your great work!

  • fc_adamfc_adam FoxyCart Team

    Thanks for your comments! We're really excited about what the hAPI will mean for our users as well. The documentation does need work - and we're discussing amongst the team some steps to improve that to make it easier to get started and understand how it pieces together.

    1) You could use the hAPI to create a cart and add products to it. Depending on your use case, JSONP may be the easier approach to use - but it is possible with the hAPI.

    2) For running tasks after each successful transaction, the webhook is still what you're after: As a heads up - we have a new webhooks system coming soon that will be JSON based - so you won't have to use XML with that. No hard timeframe for release - but it's on its way. It will still support the XML format for backwards compatibility too

    3) The legacy API doesn't have any direct relation to the existing webhook functionality, they're two separate pieces of functionality. The webhooks system (both the current and the new one upcoming) will continue to be the best way to perform actions on each successful transaction as it happens.
Sign In or Register to comment.