ChargebeeAPI
Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now

Create a webhook endpoint

Idempotency Supported
Try in API Explorer

Create a new webhook API endpoint on your Chargebee Site.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/webhook_endpoints

Input Parameters

name
required, string, max chars=50

A name to identify the webhook endpoint.

api_version
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 Enum Values
v1

If selected, the payload includes only attributes from API v1 resources.

v2

If selected, the payload includes only attributes from API v2 resources.

url
required, string, max chars=512

The target URL where webhook notifications will be sent.

Note Only URL ports 80, 443, 8080, or 8443 are allowed.

primary_url
optional, boolean, default=false

Indicates whether this webhook is marked as the primary endpoint. If only one exists, it is primary by default.

disabled
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.

basic_auth_password
optional, string, max chars=250

The password used for basic authentication to secure webhook delivery.

basic_auth_username
optional, string, max chars=250

Username for basic authentication used to secure webhook delivery.

send_card_resource
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.

Possible Enum Values
plans_addons

The webhook payload follows the Product Catalog 1.0 schema and uses the Plans and Addons model.

items

The webhook payload follows the Product Catalog 2.0 schema and uses the Items API model .

compat

The webhook payload uses a schema compatible with both Product Catalog 1.0 and 2.0. This is applicable only to sites automatically upgraded to Product Catalog 2.0.

enabled_events
optional, enumerated 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.

Possible Enum Values
coupon_created
coupon_updated
coupon_deleted
coupon_set_created
coupon_set_updated

Returns

webhook_endpointWebhook endpoint object
Resource object representing webhook_endpoint