Docs

Log in to read the version of docs relevant to your site, or use the dropdown versions

Events and Webhooks

Events

Any change that happens to the system is captured as an event. These include changes relating to customers, subscriptions, plans, addons and coupons.

Event logs relating to your customers and subscriptions can be found on the UI under Logs > Events. Events related to plans, coupons and addons, on the other hand, are logged in their respective details pages.

You can also refer to the API for more information on the events.

Webhooks

For a better integration between Chargebee and your application, Chargebee provides you with webhooks. When configured, a webhook is used to send out an event notification to your service.

Once you've configured the URL, Chargebee will post the event as a JSON to your webhook URL. For example, if a "subscription_activated" event occurs, then a notification is sent to the specified URL. You can configure webhook alerts to keep track of any events relating to your subscriptions, plans, addons and coupons.

Why should I use webhooks?

When your application needs to know and act upon certain events when they occur in your Chargebee account such as an account being canceled or a payment that failed, you can use webhooks to notify your application. Webhook notifications are usually posted asynchronously and so are not recommended for time-critical applications. When time is critical, it is better to use the Chargebee API to check for events.

Here's a list of event types that currently generates webhooks.

Handling Webhooks

Chargebee needs to get a status code 2XX reply from the configured URL to confirm that the notification sent via HTTP POST has been successfully delivered. If any webhook times out, Chargebee will cancel and retry. Up to 7 retries happen for every webhook that fails and at exponential time intervals.

Information

Chargebee supports multiple API versions. Hence, while creating webhooks, you need to specify the API version used for the webhook. Learn more.

Configuring Webhooks

To know how to configure your webhooks, click here.

FAQ

1. Does Chargebee Support HMAC Headers for Webhooks?

Currently, Chargebee's webhook setup only supports basic authentication. HMAC (Hash-based Message Authentication Code) signing for webhook authentication is not supported at this time.

Details

HMAC signing provides enhanced security and ensures message integrity by allowing you to verify the authenticity of incoming webhook requests. We understand the value it offers in securing your integrations.

At present, Chargebee supports only basic authentication for webhooks. While this method provides a foundational level of security, it lacks the request verification that HMAC can offer.

Future Scope

HMAC signing is a recognized enhancement, and we are evaluating its inclusion in a future release. Your feedback helps prioritize such improvements.

If you have security concerns or need assistance with current webhook setup, please contact support@chargebee.com.

Was this article helpful?