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

Plan createdTriggered when a new plan is generated.
Plan updatedTriggered when an existing plan undergoes updates.
Subscription activatedTriggered when a new subscription is initiated.
Subscription cancelledTriggered when a subscription is terminated.
Subscription approaching capped amountTriggered 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 amountTriggered when the charge for a subscription surpasses the amount merchants have previously agreed upon.
Subscription capped amount updatedTriggered when the merchant updates the capped amount, through the Shopify Admin interface or the Mantle API.
Invoice createdTriggered when an invoice is created. Mantle creates invoices to wrap pending charges during each subscription billing cycle.

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.