Webhooks

Mantle currently provides a range of webhooks to deliver important notifications regarding activity within your app.

webhooks
EventDescription
Plan created
plans/create
Triggered when a new plan is generated.
Plan updated
plans/update
Triggered when an existing plan undergoes updates.
Subscription activated
subscriptions/activate
Triggered when a new subscription is initiated.
Subscription cancelled
subscriptions/cancel
Triggered when a subscription is terminated.
Subscription approaching capped amount
subscriptions/approaching_capped_amount
Triggered when the customer reaches 90% of their usage cap. Shopify sends an email to the merchant at this point to notify them.
Subscription usage charge exceeds capped amount
subscriptions/usage_charge_exceeds_limit
Triggered when the charge for a subscription surpasses the amount merchants have previously agreed upon.
Subscription capped amount updated
subscriptions/capped_amount_updated
Triggered when the merchant updates the capped amount, through the Shopify Admin interface or the Mantle API.
One-time charge activated
one_time_charges/activate
Triggered when a one-time charge is activated.
Customer installed app
customers/installed
Triggered when a customer installs this app for the first time.
Customer uninstalled app
customers/uninstalled
Triggered when a customer uninstalls this app.
Customer reinstalled app
customers/reinstalled
Triggered when a customer reinstalls this app.
Customer deactivated app
customers/deactivated
Triggered when a customer has their account deactivated on the platform.
Customer reactivated app
customers/reactivated
Triggered when a customer has their account reactivated on the platform
Customer trial expired
customers/trial_expired
Triggered when a customer has their trial expired with the app or subscription
Customer first-time identify
customers/first_identify
Triggered the first time the customer is identified with the Mantle App API

To subscribe to a webhook:

  1. Click on the app you’d like to use from Mantle’s left navigation.
  2. Navigate to Settings in the top right-hand corner.
  3. Select API keys.
  4. Click on Add webhook.
  5. Choose the webhook you’d like and enter the URL where you’d like to receive it.

The webhooks are signed using HMAC SHA256 in the X-Mantle-Hmac-SHA256 header. The signing data consists of the X-Timestamp header concatenated with the stringified JSON payload: timestamp.payload.