A webhook endpoint receives real-time notifications from your Chargebee site when specific events occur, such as invoice generation, payment failures, or subscription updates. It allows your application, server, or third-party service to automatically respond to these changes, eliminating the need for manual checks or polling the API.
Each webhook endpoint includes details such as a unique ID, target URL, list of subscribed events, and status. You can manage webhook endpoints using the Chargebee dashboard or the API.
Note You can create up to five webhook endpoints per site.
Sample webhook endpoint [ JSON ]
{
"id": "whv2_198PKVUX26UX9IvR",
"name": "Chargebee Notification",
"api_version": "v2",
"url": "https://{host}.com",
"primary_url": true,
"send_card_resource": false,
"disabled": false
}
API Index URL GET
https://{site}.chargebee.com/api/v2/webhook_endpoints
string, max chars=40 A unique identifier for the webhook.
string, max chars=50 The name assigned to the webhook.
string, max chars=250 The full URL of the webhook endpoint.
optional, boolean, default=false Controls whether card-related resources are included in the webhook payload. Card details are always masked.
boolean, default=false Indicates whether the webhook endpoint is disabled. If true
, the endpoint is disabled; if false
, it is enabled.
boolean, default=false Indicates whether this is the primary webhook endpoint. If only one endpoint exists, it is considered primary by default.
enumerated string, default=v2 Specifies the API version used to format the webhook payload. Make sure this version matches the client library version used by your webhook server. Possible values are
v1If selected, the webhook payload includes only attributes from API v1 resources.v2If selected, the webhook payload includes only attributes from API v2 resources.
Show all values[+] chargebee_response_schema_type
optional, enumerated string Indicates the response schema used in the webhook payload, based on the product catalog version configured for the site. Note This field is only applicable if the site is in compat
mode.
optional, list of string The types of events that trigger this webhook. For a complete list, see event types.
This is a list of the event types we currently support. We will continue
to add more events moving forward. All events follow a uniform pattern -
<resource>_<event_name>. The resources that will be
present in the event content are provided beneath each event type's
description.
Note: If consolidated invoicing is enabled, the
attributes invoice.subscription_id and
credit_note.subscription_id should not be used
(as it will not be present if the invoice / credit note has lines from
multiple subscriptions). Instead to know the related subscriptions,
their line_items' subscription_id attribute should be referred.
string, max chars=40 A unique identifier for the webhook.
string, max chars=50 The name assigned to the webhook.
string, max chars=250 The full URL of the webhook endpoint.
optional, boolean, default=false Controls whether card-related resources are included in the webhook payload. Card details are always masked.
boolean, default=false Indicates whether the webhook endpoint is disabled. If true
, the endpoint is disabled; if false
, it is enabled.
boolean, default=false Indicates whether this is the primary webhook endpoint. If only one endpoint exists, it is considered primary by default.
enumerated string, default=v2 Specifies the API version used to format the webhook payload. Make sure this version matches the client library version used by your webhook server. Possible values are
v1If selected, the webhook payload includes only attributes from API v1 resources.v2If selected, the webhook payload includes only attributes from API v2 resources.
Show all values[+]
optional, enumerated string Indicates the response schema used in the webhook payload, based on the product catalog version configured for the site. Note This field is only applicable if the site is in compat
mode.
optional, list of string The types of events that trigger this webhook. For a complete list, see event types. Create a new webhook endpoint on your Chargebee Site.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Creates a webhook endpoint.
Creates a webhook endpoint.
Sample Response [ JSON ]
Show more...
{
"webhook_endpoint": {
"id": "whv2_198PKVUX26UX9IvR",
"name": "Chargebee Notification",
"api_version": "v2",
"url": "https://{host}.com",
"primary_url": true,
"send_card_resource": false,
"disabled": false
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/webhook_endpoints
required, string, max chars=50 A name to identify the webhook endpoint.
optional, enumerated string, default=v2 The API version used to format the webhook payload. Ensure this version matches the client library used by your webhook server Possible values are
v1If selected, the payload includes only attributes from API v1 resources.v2If selected, the payload includes only attributes from API v2 resources.
Show all values[+]
required, string, max chars=250 The target URL where webhook notifications will be sent. Note Only URL ports 80
, 443
, 8080
, or 8443
are allowed.
optional, boolean, default=false Indicates whether this webhook is marked as the primary endpoint. If only one exists, it is primary by default.
optional, boolean, default=false Indicates whether the webhook endpoint is disabled. Set to true
to disable the endpoint, set to false
to enable the endpoint.
optional, string, max chars=250 The password used for basic authentication to secure webhook delivery.
optional, string, max chars=250 Username for basic authentication used to secure webhook delivery.
optional, boolean, default=false Controls whether card-related resources are included in the webhook payload. Card details are always masked. chargebee_response_schema_type[]
optional, enumerated string Indicates the response schema used in the webhook payload, based on the product catalog version configured for the site. Note This field is only applicable if the site is in compat
mode.
enabled_events[[0..n]][0..n]
optional, list of string A list of event types that trigger this webhook. Note If this field is left empty, the webhook will enable all event types by default.
always returned required
Resource object representing webhook_endpoint
Sample admin console URL
https://{site}.chargebee.com/admin-console/webhook_endpoints/123x
Updates the configuration of an existing webhook endpoint using its unique identifier. You can use this API to change properties such as the name, URL, subscribed events, authentication credentials, or API version. This is useful when rotating endpoints, updating destination URLs, or modifying which events your system listens to.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"webhook_endpoint": {
"id": "whv2_198PKVUX26UX9IvR",
"name": "Notify Subscription",
"api_version": "v2",
"enabled_events": [
"subscription_created",
{..}
],
"url": "https://{host}.com",
"primary_url": true,
"send_card_resource": false,
"disabled": false
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/webhook_endpoints/{webhook-endpoint-id}
optional, string, max chars=50 A name to identify the webhook endpoint.
optional, enumerated string, default=v2 The API version used to format the webhook payload. Ensure this version matches the client library used by your webhook server. Possible values are
v1If selected, the payload includes only attributes from API v1 resources.v2If selected, the payload includes only attributes from API v2 resources.
Show all values[+]
optional, string, max chars=250 The target URL where webhook notifications will be sent. Note Only URL ports 80
, 443
, 8080
, or 8443
are allowed.
optional, boolean, default=false Controls whether card-related resources are included in the webhook payload. Card details are always masked.
optional, boolean, default=false Specifies whether card-related resources should be included in the webhook payload.
optional, string, max chars=250 The password used for basic authentication to secure webhook delivery.
optional, string, max chars=250 Username for basic authentication used to secure webhook delivery.
optional, boolean, default=false Indicates whether the webhook endpoint is disabled. Set to true
to disable the endpoint, set to false
to enable the endpoint. enabled_events[[0..n]][0..n]
optional, list of string A list of event types that trigger this webhook. Note If this field is left empty, the webhook will enable all event types by default.
always returned required
Resource object representing webhook_endpoint
Sample admin console URL
https://{site}.chargebee.com/admin-console/webhook_endpoints/123x
Retrieves the details of a specific webhook endpoint using its unique identifier. Use this API to inspect an endpoint’s configuration, such as the target URL, subscribed events, and authentication settings.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Retrieve a webhook endpoint.
Retrieve a webhook endpoint.
Sample Response [ JSON ]
Show more...
{
"webhook_endpoint": {
"id": "whv2_198PKVUX26UX9IvR",
"name": "Notify Subscription",
"api_version": "v2",
"enabled_events": [
"subscription_created",
{..}
],
"url": "https://{host}.com",
"primary_url": true,
"send_card_resource": false,
"disabled": false
}
}
URL Format
GET
https://{site}.chargebee.com/api/v2/webhook_endpoints/{webhook-endpoint-id}
always returned required
Resource object representing webhook_endpoint
Sample admin console URL
https://{site}.chargebee.com/admin-console/webhook_endpoints/123x
Deletes a webhook endpoint using its unique identifier. Use this API to remove obsolete or inactive webhook endpoints from your Chargebee site. Deleting an endpoint ensures it no longer receives event notifications.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Delete a webhook endpoint.
Delete a webhook endpoint.
Sample Response [ JSON ]
Show more...
{
"webhook_endpoint": {
"id": "whv2_198PKVUX26UX9IvR",
"name": "Notify Subscription",
"api_version": "v2",
"enabled_events": [
"subscription_created",
{..}
],
"url": "https://{host}.com",
"primary_url": true,
"send_card_resource": false,
"disabled": false
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/webhook_endpoints/{webhook-endpoint-id}/delete
always returned required
Resource object representing webhook_endpoint
Sample admin console URL
https://{site}.chargebee.com/admin-console/webhook_endpoints/123x
Retrieves all webhook endpoints configured on your Chargebee site. The response includes each endpoint’s ID, name, and target URL. Use this API to view, audit, or manage the list of webhook endpoints currently active or configured in your site.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"list": [
{
"webhook_endpoint": {
"id": "whv2_198PKVUX26UX9IvR",
"name": "Notify Subscription",
"api_version": "v2",
"enabled_events": [
"subscription_created",
{..}
],
"url": "https://{host}.com",
"primary_url": true,
"send_card_resource": false,
"disabled": false
}
},
{..}
]
}
URL Format
GET
https://{site}.chargebee.com/api/v2/webhook_endpoints
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set 'offset' to the value of 'next_offset' obtained in the previous iteration of the API call.
always returned required
Resource object representing webhook_endpoint
always returned optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.
Sample admin console URL
https://{site}.chargebee.com/admin-console/webhook_endpoints/123x