In this article, we will learn how to set up webhooks on your ChartMogul account.
Webhooks send short JSON payloads to destination URLs of your choice whenever an MRR movement is generated in your ChartMogul account. This allows you to keep external systems updated with data generated in ChartMogul.
How to setup a webhook
- Click the data platform icon on the left menu and navigate to the Webhooks section (you must be an admin on your ChartMogul account). Alternatively, you can click the link below to go there directly: https://app.chartmogul.com/#/data-platform/data-output/webhooks
- Add an endpoint by clicking the + ADD NEW ENDPOINT button
- In the modal window, specify the details for the endpoint and click Save
- The endpoint will be created and will be shown in the Endpoints table. You can edit or delete endpoint by clicking on the ✏️ and 🗑 icons.
Monitoring the status of the endpoints
You can find a list of webhooks that have been created for every endpoint in the Webhooks table. Every webhook has a status. A green dot means that the endpoint returned the status OK (HTTP code 2xx), while a red dot means that endpoint returned something different from an OK status (HTTP code 1xx, 3xx, 4xx or 5xx).
If the endpoint responded with HTTP code (1xx, 3xx, 4xx or 5xx) then sending will retry automatically. Retry will happen 17 times and if the endpoint continues returning a HTTP code different from 2xx, the system will stop retrying. You can also retry webhooks manually from Webhooks details modal (see section below).
Details about every generated webhook are available in the Webhook modal. You can access it by clicking on any row in the Webhooks table. In the webhooks details modal, you can retry sending the webhook at any time.
There are currently a few known limitations with MRR webhooks:
- There’s no option to specify HTTP basic auth credentials to go with your endpoint URL.
- Only subscription events that cause a change in MRR will trigger a webhook to be sent. For example, if a customer moves from one plan to another at the same price point and their MRR doesn’t change then a webhook won’t be sent.
- If you use the merge customers, MRR editing, or connect subscriptions features then this can cause a customer’s MRR history to change. However, these changes won’t trigger a webhook to be sent.
- Changes in Data platform tables are not triggering webhooks events, and therefore webhooks are not going to be sent for manual entries.
- If there is a failed invoice, the Customer is reimported to prevent false MRR value. MRR movement that happens during reimport will not trigger webhook to be sent.
- Plan change - when a customer changes their plan, ChartMogul waits for the successful transaction to create the MRR movement. Once the successful invoice is received, MRR movement is created on the date when the customer switched plans. If more than 2 days pass since the plan switch, then webhooks will not be triggered as it is not considered real-time anymore.
- When there are multiple failed transactions, ChartMogul reimports the customer automatically. In cases like this, webhooks are not triggered.
- MRR movements are not generated for iTunes integration.
- These webhooks are just for MRR movements, it might be useful to have additional types of webhooks covering more events, e.g. transactions, trial-signups, etc. please let us know what you’d like to see added to this feature.