Example scenarios

To get a better understanding of how to use the webhooks from Magine Pro it can be useful with some example scenarios.

New user start their first subscription

In this scenario we have a user that registers their account and then do their first purchase of a subscription.

These are the events that would be triggered:

  1. On registration -> user.created
  2. When the purchase is successful -> monetisation.purchased

To extend on this scenario, we can also say that the offer the user purchased had a free trial for 7 days and that the user keep their subscription and converts to a paying subscriber. Then we would also see this event:

  1. Seven days after the subscription was started -> monetisation.subscription.renewed

Paying subscriber upgrades their subscription

In this scenario we have a user that already have a subscription, let's say it's a Monthly subscription, and the user will upgrade to a Yearly subscription.

These are the events that would be triggered:

  1. When the upgrade is successfully done -> monetisation.subscription.upgraded for the new Offer
  2. At the same time -> monetisation.subscription.removed for the old Offer. The payload will also include "reason": "SubscriptionUpgrade"

Paying subscriber have a non-working payment method

This is a scenario when the user have a registered payment method for which payments fails when the subscription is up for renewal. Let's say that the payment fail during two renewal attempts before the user update the payment method to one that works.

These are the events that would be triggered:

  1. First time the renewal fails -> monetisation.subscription.renewal_failed
  2. Second time the renewal fails -> monetisation.subscription.renewal_failed
  3. After the user have updated the payment method and money can be withdrawn -> monetisation.subscription.renewed

Paying subscriber cancels their subscription and delete their account

In this scenario we have a paying subscriber that cancels their subscription. After the subscription have been downgraded, the user also decide to delete the account.

These are the events that would be triggered:

  1. User cancels the subscription -> monetisation.subscription.canceled
  2. When the billing period ends for the canceled subscription -> monetisation.subscription.removed The payload will also include "reason": "SoftCancel"
  3. When the user delete their account -> user.deleted