Using webhooks or API for instant handling of new subscriptions?

Dec 7, 2011 at 2:32 PM

I'm curious how you have solved using Chargify when it comes to webhooks. They are obviously the only way to get instant notifications of a new subscription, but the posted data is in a seemingly arbitrary format (not JSON, not XML) which cannot be converted to objects easily.

One idea is to just get the subscriber/payment IDs from the webhook post, and then make a regular API call for the proper objects. Seems kind of backwards, but it might be the best option as of now?

Hi,

Thanks a lot for the Chargify.NET project, it's awesome!

I was just curious how you use the library when it comes to webhooks. They are obviously the only way to get instant notifications of a new subscription, but the posted data is in a seemingly arbitrary format (not JSON, not XML) which cannot be converted to objects easily.

One idea is to just get the subscriber/payment IDs from the webhook post, and then make a regular API call for the proper objects. Seems kind of backwards, but it might be the best option as of now.

Thanks for your reply!
Coordinator
Apr 11, 2012 at 8:27 PM

I haven't dealt with the webhook body data at all. If you wanted to find a good way to parse it, then I'd be up to apply your patch to the source. I haven't needed (and not many people have asked) about webhook data parsing, so I haven't done it myself.

-- Kori