Skip to main content

Webhooks v2 available!

ยท 2 min read

If you're using IAPHUB webhooks, a new major version (v2) is available.

This new version introduces the new transfer webhook.

The transfer webhook will be triggered when an active subscription (or non-consumable) is transferred to a different user ID.

This can occur when a user restores their purchases or replaces an active subscription using a different user ID, but only if the User transfer option on the IAPHUB dashboard is enabled, which is the default setting.

Our goal is to make things easier compared to the previous system (v1), which relied solely on the user_id_update webhook.

We recommend updating to the new version as soon as possible. Let's recapitulate the differences between the v1 and the v2:

Before (v1)โ€‹

The user_id_update webhook is triggered in the following scenarios:

  • When a user restores an active subscription (or non-consumable) using a different user ID.
  • When an active subscription is replaced using a different user ID.
  • When an anonymous user (not logged in) with purchases logs in.
  • When the user ID of a user with purchases is updated via the API.

Now (v2)โ€‹

The user_id_update webhook is triggered when user ID 1 becomes user ID 2.

It can happen in the following scenarios:

  • When an anonymous user (not logged in) with purchases logs in.
  • When the user ID of a user with purchases is updated via the API.

The transfer webhook is triggered when a subscription (or non-consumable) is transferred from user ID 1 to user ID 2.

It can happen in the following scenarios:

  • When a user restores an active subscription (or non-consumable) using a different user ID.
  • When an active subscription is replaced using a different user ID.

How to upgrade?โ€‹

Once your server can handle the transfer webhook properly, you can update the webhooks version from the Settings page of the IAPHUB dashboard.

Click on the Webhooks section, update the Webhook version input to version 2, and click on the Save button.

If any issue happens, you can still rollback to version 1.