# Webhook endpoints

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


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
}
```

## Webhook endpoints attributes

## Input Parameters

- `id` (required, string, max chars=40)
  A unique identifier for the webhook.

- `name` (required, string, max chars=50)
  The name assigned to the webhook.

- `url` (required, string, max chars=512)
  The full URL of the webhook endpoint.

- `send_card_resource` (optional, boolean, default=false)
  Controls whether card-related resources are included in the webhook payload. Card details are always masked.

- `disabled` (required, boolean, default=false)
  Indicates whether the webhook endpoint is disabled. If `true` , the endpoint is disabled; if `false` , it is enabled.

- `primary_url` (required, boolean, default=false)
  Indicates whether this is the primary webhook endpoint. If only one endpoint exists, it is considered primary by default.

- `api_version` (required, 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 enum values:
    - `v1`
      If selected, the webhook payload includes only attributes from API v1 resources.
    - `v2`
      If selected, the webhook payload includes only attributes from API v2 resources.

- `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`](https://www.chargebee.com/docs/billing/1.0/product-catalog/product-catalog-coexistence-ui-changes) mode.
  Possible enum values:
    - `plans_addons`
      The webhook payload follows the [Product Catalog 1.0](https://www.chargebee.com/docs/billing/1.0/product-catalog/product-catalog) schema and uses the [Plans](/docs/api/v2/pcv-1/plans) and [Addons](/docs/api/v2/pcv-1/addons) model.
    - `items`
      The webhook payload follows the [Product Catalog 2.0](https://www.chargebee.com/docs/billing/2.0/product-catalog/product-catalog) schema and uses the [Items API model](/docs/api/items) .
    - `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)
  The types of events that trigger this webhook. For a complete list, see [event types](/docs/api/webhook_endpoints) .
  Possible enum values:
    - `coupon_created`
      Sent when a coupon is created.
    - `coupon_updated`
      Sent when a coupon is changed.
    - `coupon_deleted`
      Sent when a coupon is deleted.
    - `coupon_set_created`
      Sent when a coupon set is created.
    - `coupon_set_updated`
      Sent when a coupon set is changed.
    - `coupon_set_deleted`
      Sent when a coupon set is deleted.
    - `coupon_codes_added`
      Sent when coupon codes are added to a coupon set.
    - `coupon_codes_deleted`
      Sent when coupon codes are deleted from a coupon set.
    - `coupon_codes_updated`
      Sent when coupon codes are updated.
    - `customer_created`
      Sent when a customer is created. This event occurs when a new customer is created on its own, or when a customer is created automatically during subscription creation.
    - `customer_changed`
      Sent when a customer is changed.
    - `customer_deleted`
      Sent when a customer is deleted.
    - `customer_moved_out`
      Sent when a customer is copied to another site.
    - `customer_moved_in`
      Sent when a customer is copied from another site.
    - `promotional_credits_added`
      Sent when promotional credits are added for a customer.
    - `promotional_credits_deducted`
      Sent when promotional credits are deducted for a customer.
    - `subscription_created`
      Sent when a new subscription is created.
    - `subscription_created_with_backdating`
      Sent when a new subscription is created with backdating.
    - `subscription_started`
      Sent when a `future` subscription starts on the scheduled date.
    - `subscription_trial_end_reminder`
      Sent when the customer's trial period is about to end.
    - `subscription_activated`
      Sent after the subscription has been moved from the trial state to the active state.
    - `subscription_activated_with_backdating`
      Sent after the subscription changes to `active` from another `status`, while the change is backdated.
    - `subscription_changed`
      Sent after the subscription's recurring items have been changed.
    - `subscription_trial_extended`
      Sent when the trial period of a subscription is extended.
    - `mrr_updated`
      Sent when the MRR or CMRR of a subscription changes.
    - `subscription_changed_with_backdating`
      Sent after the subscription's recurring items have been changed, with the change backdated.
    - `subscription_cancellation_scheduled`
      Sent when a subscription is scheduled to be cancelled at the end of the current term.
    - `subscription_cancellation_reminder`
      Sent when the customer's subscription is nearing its scheduled cancellation date.
    - `subscription_cancelled`
      Sent when the subscription is cancelled. If it is cancelled due to non-payment or a missing card, the reason is available in `cancel_reason`.
    - `subscription_canceled_with_backdating`
      Sent when the subscription is cancelled, with the cancellation backdated. If it is cancelled due to non-payment or a missing card, the reason is available in `cancel_reason`.
    - `subscription_reactivated`
      Sent when the subscription is moved from the cancelled state to the active or in\_trial state.
    - `subscription_reactivated_with_backdating`
      Sent when the subscription is moved from the cancelled state to the active or in\_trial state, with a past date.
    - `subscription_renewed`
      Sent when the subscription is renewed from the current term.
    - `subscription_items_renewed`
      Sent when one or more subscription items are renewed.
    - `subscription_scheduled_cancellation_removed`
      Sent when a scheduled cancellation is removed for the subscription.
    - `subscription_changes_scheduled`
      Sent when subscription changes are scheduled for later. The changes are applied at the end of the current term.
    - `subscription_scheduled_changes_removed`
      Sent when a scheduled change for the subscription is removed.
    - `subscription_shipping_address_updated`
      Triggered when a shipping address is added or updated for a subscription.
    - `subscription_deleted`
      Sent when a subscription has been deleted.
    - `subscription_paused`
      Sent when the subscription is paused.
    - `subscription_pause_scheduled`
      Sent when the subscription is scheduled to pause.
    - `subscription_scheduled_pause_removed`
      Triggered when a scheduled pause is removed for the subscription.
    - `subscription_resumed`
      Sent when the subscription is moved from the paused state to the active state.
    - `subscription_resumption_scheduled`
      Triggered when the subscription resumption is scheduled.
    - `subscription_scheduled_resumption_removed`
      Triggered when a scheduled resumption is removed for the subscription.
    - `subscription_advance_invoice_schedule_added`
      Triggered when an advance invoice is scheduled for a subscription.
    - `subscription_advance_invoice_schedule_updated`
      Triggered when a scheduled advance invoice is updated for a subscription.
    - `subscription_advance_invoice_schedule_removed`
      Triggered when a scheduled advance invoice is removed for a subscription.
    - `pending_invoice_created`
      Event triggered (in the case of metered billing) when a "Pending" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the "Notify for Pending Invoices" option is enabled.
    - `pending_invoice_updated`
      Triggered when you make the following changes to a pending invoice: add a charge, add a non-recurring addon, or delete a line item.
    - `invoice_generated`
      Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a "Pending" invoice is closed.
    - `invoice_generated_with_backdating`
      Event triggered when a new invoice is generated with a past date as the invoice date.
    - `invoice_updated`
      Triggered when changes are made to a finalized invoice, including voiding, deletion, invoice address updates, status changes, and payment changes such as applying or removing a payment, applying or removing a credit, and credit note creation. `pending_invoice_updated` is triggered for changes specific to pending invoices; invoice\_updated covers all other invoice changes.
    - `invoice_deleted`
      Event triggered when an invoice is deleted.
    - `credit_note_created`
      Sent when a credit note is created.
    - `credit_note_created_with_backdating`
      Sent when a credit note is created with a past date as the credit note date.
    - `credit_note_updated`
      Sent when a credit note is updated.
    - `credit_note_deleted`
      Sent when a credit note is deleted.
    - `payment_schedules_created`
      Event triggered when new payment schedules are created for an invoice.
    - `payment_schedules_updated`
      Event triggered when payment schedules are updated for an invoice.
    - `payment_schedule_scheme_created`
      Event triggered when a new payment schedule scheme is created.
    - `payment_schedule_scheme_deleted`
      Event triggered when a payment schedule scheme is deleted.
    - `subscription_renewal_reminder`
      Sent before each subscription renewal, based on the plan's period.
    - `add_usages_reminder`
      Sent every month day before renewal date of plan's period
    - `payment_due_reminder`
      Sent after scheduled days of payment failure
    - `transaction_created`
      Triggered when a transaction is recorded.
    - `transaction_updated`
      Triggered when a transaction is updated. For example, when a transaction is removed, when an excess payment is applied to an invoice, or when `amount_capturable` is updated.
    - `transaction_deleted`
      Triggered when a transaction is deleted.
    - `payment_succeeded`
      Sent when the payment is successfully collected.
    - `payment_failed`
      Sent when an attempt to charge the customer's credit card fails.
    - `dunning_updated`
      Sent when dunning is paused for an invoice.
    - `payment_refunded`
      Sent when a payment refund is made.
    - `payment_initiated`
      Sent when a payment is initiated via direct debit.
    - `refund_initiated`
      Sent when a refund is initiated via direct debit.
    - `authorization_succeeded`
      Triggered when an authorization transaction is created.
    - `authorization_voided`
      Triggered when an authorization transaction is voided. An authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time.
    - `card_added`
      Sent when a card is added for a customer.
    - `card_updated`
      Sent when the card is updated for a customer.
    - `card_expiry_reminder`
      Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date.
    - `card_expired`
      Sent when a card for a customer expires.
    - `card_deleted`
      Sent when a card is deleted for a customer.
    - `payment_source_added`
      Sent when a payment source is added for a customer.
    - `payment_source_updated`
      Sent when the payment source is updated for a customer, or when a role is assigned to the payment source.
    - `payment_source_deleted`
      Sent when a payment source is deleted for a customer.
    - `payment_source_expiring`
      Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date.
    - `payment_source_expired`
      Sent when a payment source for a customer expires.
    - `payment_source_locally_deleted`
      Sent when a payment source for a customer is removed from Chargebee.
    - `virtual_bank_account_added`
      Sent when a virtual bank account is added for a customer.
    - `virtual_bank_account_updated`
      Sent when the virtual bank account is updated for a customer.
    - `virtual_bank_account_deleted`
      Sent when a virtual bank account is deleted for a customer.
    - `token_created`
      Sent when a token is created.
    - `token_consumed`
      Sent when a token is consumed.
    - `token_expired`
      Sent when a token expires.
    - `unbilled_charges_created`
      Triggered when unbilled charges are created.
    - `unbilled_charges_voided`
      Triggered when unbilled charges are voided.
    - `unbilled_charges_deleted`
      Triggered when unbilled charges are deleted.
    - `unbilled_charges_invoiced`
      Triggered when unbilled charges are invoiced.
    - `order_created`
      Triggered when an order is created.
    - `order_updated`
      Triggered when an order is updated.
    - `order_cancelled`
      Triggered when an order is cancelled.
    - `order_delivered`
      Triggered when an order is marked as delivered.
    - `order_returned`
      Triggered when an order is marked as returned.
    - `order_ready_to_process`
      Triggered when an order reaches its order date.
    - `order_ready_to_ship`
      Triggered when an order reaches its shipping date.
    - `order_deleted`
      Triggered when an order is deleted.
    - `order_resent`
      Triggered when an order is resent.
    - `quote_created`
      Triggered when a quote is created.
    - `quote_updated`
      Triggered when a quote is updated.
    - `quote_deleted`
      Triggered when a quote is deleted.
    - `tax_withheld_recorded`
      Triggered when a tax withheld is recorded for an invoice.
    - `tax_withheld_deleted`
      Triggered when a tax withheld is deleted.
    - `tax_withheld_refunded`
      Sent when a tax withheld refund is made.
    - `gift_scheduled`
      Triggered when a new gift is created.
    - `gift_unclaimed`
      Triggered when a new gift is unclaimed and is ready to be claimed.
    - `gift_claimed`
      Triggered when a gift is claimed.
    - `gift_expired`
      Triggered when a gift expires.
    - `gift_cancelled`
      Triggered when a gift is cancelled.
    - `gift_updated`
      Triggered when a gift is updated.
    - `hierarchy_created`
      Triggered when a hierarchy is created.
    - `hierarchy_deleted`
      Triggered when a hierarchy is deleted.
    - `payment_intent_created`
      Sent when a payment intent is created.
    - `payment_intent_updated`
      Sent when a payment intent is updated.
    - `contract_term_created`
      Triggered when a new contract term is created.
    - `contract_term_renewed`
      Triggered when a contract term is renewed.
    - `contract_term_terminated`
      Triggered when a contract term is terminated.
    - `contract_term_completed`
      Triggered when a contract term is completed.
    - `contract_term_cancelled`
      Triggered when a contract term is cancelled.
    - `item_family_created`
      Triggered when an item family is created.
    - `item_family_updated`
      Triggered when an item family is updated.
    - `item_family_deleted`
      Triggered when an item family is deleted.
    - `item_created`
      Triggered when an item is created.
    - `item_updated`
      Triggered when an item is updated.
    - `item_deleted`
      Triggered when an item is deleted.
    - `item_price_created`
      Triggered when an item price is created.
    - `item_price_updated`
      Triggered when an item price is updated.
    - `item_price_deleted`
      Triggered when an item price is deleted.
    - `attached_item_created`
      Triggered when an attached item is created.
    - `attached_item_updated`
      Triggered when an attached item is updated.
    - `attached_item_deleted`
      Triggered when an attached item is deleted.
    - `differential_price_created`
      Triggered when a differential price is created.
    - `differential_price_updated`
      Triggered when a differential price is updated.
    - `differential_price_deleted`
      Triggered when a differential price is deleted.
    - `feature_created`
      Triggered when a feature is created.
    - `feature_updated`
      Triggered when a feature is updated.
    - `feature_deleted`
      Triggered when a feature is deleted.
    - `feature_activated`
      Triggered when a feature `status` transitions to `active` for the first time.
    - `feature_reactivated`
      Triggered when a feature `status` transitions to `active` for the second time or more.
    - `feature_archived`
      Triggered when a feature is archived.
    - `item_entitlements_updated`
      Triggered when item entitlements are updated for a feature.
    - `entitlement_overrides_updated`
      Triggered when an override entitlement is updated.
    - `entitlement_overrides_removed`
      Triggered when an override entitlement is removed.
    - `item_entitlements_removed`
      Triggered when item entitlements are removed for a feature.
    - `entitlement_overrides_auto_removed`
      Triggered when subscription entitlement overrides for a feature are automatically removed after expiry.
    - `subscription_entitlements_created`
      Triggered when subscription entitlements are created for a new subscription.
    - `subscription_entitlements_updated`
      Triggered when subscription entitlements are updated because of a subscription change event.
    - `business_entity_created`
      Sent when a business entity is created.
    - `business_entity_updated`
      Sent when a business entity is updated.
    - `business_entity_deleted`
      Sent when a business entity is deleted.
    - `customer_business_entity_changed`
      Sent when a customer's business entity is changed.
    - `subscription_business_entity_changed`
      Sent when a subscription's business entity is changed.
    - `payment_source_business_entity_changed`
    - `purchase_created`
      Triggered when a purchase action is completed successfully.
    - `voucher_created`
      Triggered when a payment voucher is created.
    - `voucher_expired`
      Triggered when a payment voucher expires.
    - `voucher_create_failed`
      Triggered when payment voucher creation fails.
    - `item_price_entitlements_updated`
      Triggered when item price entitlements are updated for a feature.
    - `item_price_entitlements_removed`
      Triggered when item price entitlements are removed for a feature.
    - `subscription_ramp_created`
      Triggered when a subscription ramp is created.
    - `subscription_ramp_deleted`
      Triggered when a subscription ramp is deleted.
    - `subscription_ramp_applied`
      Triggered when a subscription ramp is applied.
    - `subscription_ramp_drafted`
      Triggered when a subscription ramp is moved to draft status.
    - `subscription_ramp_updated`
      Triggered when a subscription ramp is updated.
    - `price_variant_created`
      Triggered when a price variant is created.
    - `price_variant_updated`
      Triggered when a price variant is updated.
    - `price_variant_deleted`
      Triggered when a price variant is deleted.
    - `customer_entitlements_updated`
      Triggered when entitlements for a list of customers are updated.
    - `subscription_moved_in`
      Triggered when a subscription is moved from another customer.
    - `subscription_moved_out`
      Triggered when a subscription is moved to another customer.
    - `subscription_movement_failed`
      Triggered when a subscription movement fails.
    - `omnichannel_subscription_created`
      Triggered when an omnichannel subscription is created.
    - `omnichannel_subscription_item_renewed`
      Triggered when an omnichannel subscription item is renewed.
    - `omnichannel_subscription_item_downgraded`
      Triggered when an omnichannel subscription item is downgraded.
    - `omnichannel_subscription_item_expired`
      Triggered when an omnichannel subscription item expires.
    - `omnichannel_subscription_item_cancellation_scheduled`
      Triggered when an omnichannel subscription item is scheduled for cancellation.
    - `omnichannel_subscription_item_scheduled_cancellation_removed`
      Triggered when a scheduled cancellation for an omnichannel subscription item is removed.
    - `omnichannel_subscription_item_resubscribed`
      Triggered when an omnichannel subscription item is resubscribed.
    - `omnichannel_subscription_item_upgraded`
      Triggered when an omnichannel subscription item is upgraded.
    - `omnichannel_subscription_item_cancelled`
      Triggered when an omnichannel subscription item is cancelled.
    - `omnichannel_subscription_imported`
      Triggered when an omnichannel subscription item is imported.
    - `omnichannel_subscription_item_grace_period_started`
      Triggered when an omnichannel subscription item's grace period has started.
    - `omnichannel_subscription_item_grace_period_expired`
      Triggered when an omnichannel subscription item's grace period has expired.
    - `omnichannel_subscription_item_dunning_started`
      Triggered when an omnichannel subscription item's dunning has started.
    - `omnichannel_subscription_item_dunning_expired`
      Triggered when an omnichannel subscription item's dunning has expired.
    - `rule_created`
      Triggered when a rule is created.
    - `rule_updated`
      Triggered when a rule is updated.
    - `rule_deleted`
      Triggered when a rule is deleted.
    - `record_purchase_failed`
      Triggered when an omnichannel record purchase fails.
    - `omnichannel_subscription_item_change_scheduled`
      Triggered when an omnichannel subscription item change is scheduled.
    - `omnichannel_subscription_item_scheduled_change_removed`
      Triggered when a scheduled change for an omnichannel subscription item is removed.
    - `omnichannel_subscription_item_reactivated`
      Triggered when an omnichannel subscription item is reactivated.
    - `sales_order_created`
      Triggered when a sales order is created.
    - `sales_order_updated`
      Triggered when a sales order is updated.
    - `omnichannel_subscription_item_changed`
      Triggered when an omnichannel subscription item is changed.
    - `omnichannel_subscription_item_paused`
      Triggered when an omnichannel subscription item is paused.
    - `omnichannel_subscription_item_resumed`
      Triggered when an omnichannel subscription item is resumed.
    - `omnichannel_one_time_order_created`
      Triggered when an omnichannel one-time order is created.
    - `omnichannel_one_time_order_item_cancelled`
      Triggered when an omnichannel one-time order item is cancelled.
    - `usage_file_ingested`
      Triggered when a usage file is ingested.
    - `omnichannel_subscription_item_pause_scheduled`
      Triggered when an omnichannel subscription item is scheduled for pause.
    - `omnichannel_subscription_moved_in`
      Triggered when an omnichannel subscription is moved to another customer.
    - `omnichannel_transaction_created`
      Triggered when an omnichannel transaction is created.
    - `alert_status_changed`
      Triggered when an alert's runtime status for a subscription changes between IN\_ALARM and WITHIN\_LIMIT. This indicates a change in the subscription's usage relative to the alert threshold and applies only to usage-based billing.
    - `omnichannel_subscription_item_updated`
      Triggered when an omnichannel subscription item is updated.
    - `omnichannel_subscription_item_recovered`
      Triggered when an omnichannel subscription item is recovered from a grace period or dunning.
    - `omnichannel_subscription_item_mrr_updated`
      Triggered when an omnichannel subscription item's MRR is updated.
    - `ledger_account_balance_updated`
    - `grant_blocks_created`
    - `grant_blocks_updated`
    - `ledger_updated`
    - `vault_token_created`
      Triggered when a payment method is tokenized and stored in the vault.
    - `vault_token_updated`
      Triggered when a vaulted payment method is updated.
    - `vault_token_deleted`
      Triggered when a vaulted payment method is deleted from the vault.

