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.
It is particularly usefull to unlock a feature on your server when a user purchase a product such as a consumable or a subscription.
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.
The request will be sent from one of the following IPs:
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:
|A product has been purchased (triggered for subscriptions as well if it isn't a renewal)
|A purchase has been refunded
|The data of a transaction has been updated
|A user id has been updated
|A subscription has been renewed
|A subscription renewal has failed but will be retried
|A subscription grace period has ended
|A subscription product has been changed (will be replaced at the next renewal date)
|A subscription has been replaced by a new subscription with a different product
|A subscription auto-renewal has been cancelled (but is still active)
|The auto-renewal of a subscription previously cancelled is now active
|A subscription has expired
|A subscription has been paused (Android only)
|A subscription pause has been enabled (Android only)
|A subscription pause has been disabled (Android only)
The latest version available is 1.8.0, you must update your settings to upgrade your webhooks format to a MAJOR version.