IAPHUB can send a notification to your server when an event occurs.
You can enable webhooks by providing in the settings the endpoint of your server that should be reached.
The webhook will be sent as a POST request to your server, you should check the X-Auth-Token header to validate that the request comes from IAPHUB. Your server must return a 200 status code.
If the request fails, we'll send you an alert and retry directly one more time and then again in 1 minute, 10 minutes, 1 hour and 24 hours. You can retry sending a request directly from the dashboard as well.
The body of the request will contain a JSON object with some properties common to any event:
|purchase||A product has been purchased (triggered for subscriptions as well if it isn't a renewal)|
|refund||A purchase has been refunded|
|user_id_update||A user id has been updated|
|subscription_renewal||A subscription has been renewed|
|subscription_renewal_retry||A subscription renewal has failed but will be retried|
|subscription_grace_period_expire||A subscription grace period has ended|
|subscription_product_change||A subscription product has been changed (will be replaced at the next renewal date)|
|subscription_replace||A subscription has been replaced by a new subscription with a different product|
|subscription_cancel||A subscription auto-renewal has been cancelled (but is still active)|
|subscription_uncancel||The auto-renewal of a subscription previously cancelled is now active|
|subscription_expire||A subscription has expired|
|subscription_pause||A subscription has been paused (Android only)|
|subscription_pause_enabled||A subscription pause has been enabled (Android only)|
|subscription_pause_disabled||A subscription pause has been disabled (Android only)|
The latest version available is 1.3.0, you must update your settings to upgrade your webhooks format to a MAJOR version.