You are viewing the documentation for Chargebee API V2. If you're using the older version (V1), click here.

Introduction

Whenever any important changes happen in your Chargebee site, they are recorded as events. An event contains data about affected resources and additional details such as when the change occurred. For example, when a subscription is cancelled due to non payment, an event subscription_cancelled is recorded.

Webhooks

If webhooks have been configured in Chargebee, events trigger those webhooks. If multiple webhooks have been configured, for every event, each webhook is called one after another. If a webhook call for an event fails or times out, it is retried based on a fixed schedule. The webhook call is an HTTP POST with content type application/json.

Caution:

Webhooks are asynchronous and are not recommended for time-critical applications. It is very much possible and even likely that webhooks reach your application out-of-order and that they get duplicated. For time-critical applications, we recommend using the List events API to poll Chargebee for events.

Retries & Duplicate Handling

To mark a webhook notification successful, we expect the HTTP status code to be 2XX from your webhook URL. If we don't receive 2XX response code, we retry calling your webhook with a progressively increasing delay for the next 2 days. You could also resend webhooks manually from the web console.

Due to webhook retries, it’s possible that your application receives the same webhook more than once. Ensure idempotency of the webhook call by detecting such duplicates within your application. This can be done by examining the id parameter since its value uniquely identifies an event.

For example, your application could do the following for each webhook notification:

  1. Get the event id and keep it in a persistent store such as a relational database or redis.
  2. Check whether the event id is already processed.
  3. If the event has not been processed then process the event; otherwise, it is a duplicate event so can be ignored.
  4. Also, since the last retry for a webhook happens at around 3 days and 7 hours after the original event trigger, keep the idempotency window as 3 days and 7 hours. In other words, you may purge the stored event ids that are more than 3 days and 7 hours old.

Out-of-order Delivery

Webhooks can also arrive at your application out-of-order. This can be due to issues such as network delays or webhook failures. However, you can order the events by examining the resource_version attribute of the resource sent by the webhook. For every change made to the resource, resource_version is updated with a new timestamp in milliseconds.

For example, if you wish to sync resource changes from Chargebee to your application, you could:

  1. Get the value (rv1) of the resource_version attribute from the resource in the webhook.
  2. Get the value (rv2) of resource_version from the resource stored on your side.
  3. If rv1 > rv2, process the resource; otherwise, ignore.

API Version

Chargebee supports multiple API versions now. The api_version attribute indicates the API version based on which the event content is structured. While processing webhooks, ensure that api_version is same as the API version used by your webhook server's client library.

Securing Your Webhook URL

You can have basic authentication for the webhook url.
  1. In the Webhook Settings page (Settings > Configure Chargebee > Webhooks),choose the tab for the webhook and check the option My webhook URL is protected by basic authentication.
  2. Enter Username and Password and click Update Webhook.
OR
Generate a random key and have it as part of your webhook URL
eg. http://yourapp.com/chargebee-webhook/cuktqaem0i2fkd5jt9cdtojcn9cvb3Y

In addition to securing your webhook, you can ensure the integrity of the event data by fetching it again using the Retrieve an Event API call.

Webhook IP Addresses

Webhooks from Chargebee originate from a specific set of IP addresses.

Sample event [ JSON ]

{ "api_version": "v2", "content": { "customer": { "allow_direct_debit": false, "auto_collection": "on", "card_status": "no_card", "created_at": 1517505957, "deleted": false, "excess_payments": 0, "id": "__test__KyVnHhSBWm4Xv2rm", "net_term_days": 0, "object": "customer", "pii_cleared": "active", "preferred_currency_code": "USD", "promotional_credits": 0, "refundable_credits": 0, "resource_version": 1517505957000, "taxability": "taxable", "unbilled_charges": 0, "updated_at": 1517505957 }, "subscription": { "billing_period": 1, "billing_period_unit": "month", "created_at": 1517505957, "currency_code": "USD", "customer_id": "__test__KyVnHhSBWm4Xv2rm", "deleted": false, "due_invoices_count": 0, "has_scheduled_changes": false, "id": "__test__KyVnHhSBWm4Xv2rm", "next_billing_at": 1518801957, "object": "subscription", "plan_amount": 1500, "plan_free_quantity": 0, "plan_id": "plan1", "plan_quantity": 1, "plan_unit_price": 1500, "resource_version": 1517505957000, "started_at": 1517505957, "status": "in_trial", "trial_end": 1518801957, "trial_start": 1517505957, "updated_at": 1517505957 } }, "event_type": "subscription_created", "id": "ev___test__KyVnHhSBWm4am2rp", "object": "event", "occurred_at": 1517505957, "source": "api", "user": "full_access_key_v1", "webhook_status": "scheduled" }

API Index URL GET

https://{site}.chargebee.com/api/v2/events
id
string, max chars=40
Uniquely identifies a event
occurred_at
timestamp(UTC) in seconds
Timestamp indicating when this event had occurred.
source
enumerated string, default=none
Source of the event
Possible values are
admin_consoleOperation made through the Chargebee admin UI.apiOperation made through the API.scheduled_jobOperation made through the Scheduled Jobs.hosted_pageOperation made through the Hosted Pages.
portalOperation made through Self-Serve Portal.systemOperation that are triggered by ChargeBee System.noneIf no source can be identified for an operation.js_apiOperation made through the JS API.migrationDeprecated.bulk_operationOperation that are triggerd through bulk operation.external_serviceOperation that are triggered via webhook.
Show all values[+]
user
optional, string, max chars=150
The “user” that triggered the event. The value depends on the source attribute:
  • When source is admin_console: the email address of the user that triggered the event.
  • When source is api, js_api or bulk_operation: the name of the API key that was used to trigger the event.
  • When the source is external_service: the name of the service that called our webhook. Eg. ADYEN, STRIPE, AMAZON_PAYMENTS etc.
  • When the source is hosted_page or portal: the user attribute is not passed.

event_type
optional, enumerated string
The types of event provided by chargebee. Refer event types for all the event types provided by us currently.
api_version
optional, enumerated string, default=v1
The Chargebee API Version used for rendering this event content. While processing webhooks, ensure this version is same as the API version used by your webhook server's client library.
Possible values are
v1Chargebee API version V1.v2Chargebee API version V2.
content
jsonobject
The JSON data associated with this event. Has resources (subscription, invoice etc) based on the event type. These resources are structured based on the Chargebee API version indicated by the api_version attribute.
optional, list of webhook
Array of webhook call statuses: one for each of the webhooks configured for the site. This object is only available after the first webhook call for the event has completed or timed out. Also, creation/updation of the webhook object data is a queued operation and hence there can be an additional delay of up to 5 seconds.
Webhook attributes
id
string, max chars=40
Uniquely identifies a webhook
webhook_status
enumerated string
  • When the event resource is retrieved via API: Represents the status of the webhook call made to this webhook.
  • When the event resource is passed as part of a webhook call: The webhooks object is unavailable on the first webhook call for the event. For subsequent calls, this attribute holds the status from after the last retry.

Possible values are
not_configuredWebhook was not configured when this event occurredscheduledWebhook call has been scheduled.succeededWebhook call was successful.re_scheduledWebhook call has been rescheduled due failure(s) in previous call(s)failedWebhook call has been suspended after the all retries have resulted in failure.skippedSkipped as specified in requestnot_applicableWebhook call is not applicable for this event.

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.

plan_created
Triggered when a plan is created.
plan
plan_updated
Triggered when a plan is changed.
plan
plan_deleted
Triggered when a plan is deleted.
plan
addon_created
Triggered when an addon is created.
addon
addon_updated
Triggered when an addon is changed.
addon
addon_deleted
Triggered when an addon is deleted.
addon
coupon_created
Triggered when a coupon is created.
coupon
coupon_updated
Triggered when a coupon is changed.
coupon
coupon_deleted
Triggered when a coupon is deleted.
coupon
coupon_set_created
Triggered when a coupon set is created.
coupon, coupon_set
coupon_set_updated
Triggered when a coupon set is updated.
coupon, coupon_set
coupon_set_deleted
Triggered when a coupon set is deleted.
coupon, coupon_set
coupon_codes_added
Triggered when coupon codes are added in coupon set.
coupon, coupon_set
coupon_codes_deleted
Triggered when coupon codes are deleted in coupon set.
coupon, coupon_set
coupon_codes_updated
Triggered when coupon codes are updated in coupon set.
coupon, coupon_set
customer_created
Triggered when a customer is created.
customer
customer_changed
Triggered when a customer is changed.
customer
customer_deleted
Triggered when a customer is deleted.
customer, subscriptions(optional)
customer_moved_out
Triggered when a customer is copied to another site.
customer
customer_moved_in
Triggered when a customer is copied from another site.
customer
promotional_credits_added
Triggered when promotional credit is added.
customer, promotional_credit
promotional_credits_deducted
Triggered when promotional credit is deducted.
customer, promotional_credit
subscription_created
Triggered when a new subscription is created.
subscription, customer, invoice(optional), unbilled_charges(optional)
subscription_created_with_backdating
Triggered when a subscription is created and the value of subscription.started_at is in the past.
subscription, customer, invoice(optional), unbilled_charges(optional)
subscription_started
Triggered when a 'future' subscription gets started.
subscription, customer, invoice(optional)
subscription_trial_end_reminder
Triggered 6 days prior to the trial period's end date.
subscription, customer, advance_invoice_schedule(optional)
subscription_activated
Triggered after the subscription has been moved from "Trial" to "Active" state.
subscription, customer, invoice(optional)
subscription_activated_with_backdating
Triggered after the subscription changes to `active` from another `status`, while the change is backdated.
subscription, customer, invoice(optional), unbilled_charges(optional)
subscription_changed
Triggered when the subscription's recurring items are changed.
subscription, customer, invoice(optional), credit_notes(optional), unbilled_charges(optional)
subscription_trial_extended
Trial Extension
subscription, customer, advance_invoice_schedule(optional)
mrr_updated
Triggered when either of MRR or CMRR is changed.
subscription
subscription_changed_with_backdating
Triggered when a subscription is changed with changes_scheduled_at set to a value in the past.
subscription, customer, invoice(optional), credit_notes(optional), unbilled_charges(optional)
subscription_cancellation_scheduled
Triggered when subscription is scheduled to cancel at end of current term.
subscription, customer, advance_invoice_schedule(optional)
subscription_cancellation_reminder
Triggered 6 days prior to the scheduled cancellation date.
subscription, customer, advance_invoice_schedule(optional)
subscription_cancelled
Triggered when the subscription is cancelled. If it is cancelled due to non payment or because the card details are not present, the subscription will have the possible reason as 'cancel_reason'.
subscription, customer, invoice(optional), credit_notes(optional), unbilled_charges(optional)
subscription_canceled_with_backdating
Triggered when a subscription is canceled with cancel_at set to a value in the past.
subscription, customer, invoice(optional), credit_notes(optional), unbilled_charges(optional)
subscription_reactivated
Triggered when the subscription is moved from `cancelled` `status` to `active` or `in_trial`.
subscription, customer, invoice(optional), unbilled_charges(optional)
subscription_reactivated_with_backdating
Triggered when the subscription is moved from `cancelled` `status` to `active` or `in_trial`, while `reactivate_from` is set to a value in the past.
subscription, customer, invoice(optional), unbilled_charges(optional)
subscription_renewed
Triggered when the subscription is renewed from the current term.
subscription, customer, invoice(optional), unbilled_charges(optional)
subscription_scheduled_cancellation_removed
Triggered when scheduled cancellation is removed for the subscription.
subscription, customer, advance_invoice_schedule(optional)
subscription_changes_scheduled
Triggered when subscription changes are scheduled for later. Changes will be applied at the end of current term.
subscription, customer, advance_invoice_schedule(optional)
subscription_scheduled_changes_removed
Triggered when scheduled change for the subscription is removed.
subscription, customer, advance_invoice_schedule(optional)
subscription_shipping_address_updated
Triggered when shipping address is added or updated for a subscription.
subscription, customer, advance_invoice_schedule(optional)
subscription_deleted
Triggered when a subscription is deleted.
subscription, customer, advance_invoice_schedule(optional)
subscription_paused
Triggered when the subscription is paused.
subscription, customer, invoice(optional), credit_notes(optional), unbilled_charges(optional)
subscription_pause_scheduled
Triggered when the subscription is scheduled to pause.
subscription, customer, advance_invoice_schedule(optional)
subscription_scheduled_pause_removed
Triggered when scheduled pause is removed for the subscription.
subscription, customer, advance_invoice_schedule(optional)
subscription_resumed
Triggered when the subscription is resumed.
subscription, customer, invoice(optional), unbilled_charges(optional)
subscription_resumption_scheduled
Triggered when the subscription is scheduled to resume.
subscription, customer, advance_invoice_schedule(optional)
subscription_scheduled_resumption_removed
Triggered when scheduled resumption is removed for the subscription.
subscription, customer, advance_invoice_schedule(optional)
subscription_advance_invoice_schedule_added
Triggered when advance invoice is scheduled for a subscription.
subscription, customer, advance_invoice_schedules(optional)
subscription_advance_invoice_schedule_updated
Triggered when scheduled advance invoice is updated for a subscription.
subscription, customer, advance_invoice_schedules(optional)
subscription_advance_invoice_schedule_removed
Triggered when scheduled advance invoice is removed for a subscription.
subscription, customer, advance_invoice_schedules(optional)
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.
invoice
pending_invoice_updated
Triggered when you make the following changes to the invoice - void, delete, invoice address update, status change, payment changes - apply payment / remove payment, credit apply/remove, credit note creation, and so on. 'Invoice_updated' is triggered for all changes made to the invoice except for the changes which trigger 'pending_invoice_updated'.
invoice
invoice_generated
Event triggered when a new invoice is created except when created with status as pending. For pending invoices, this event is triggered when the invoice is closed.
invoice
invoice_generated_with_backdating
Triggered when an invoice has been created with date set to a value in the past. However, if the invoice is created with a pending status and the site setting is to set invoice.date to the date of closing the invoice, this event is never triggered.
invoice
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
invoice_deleted
Event triggered when an invoice is deleted.
invoice
credit_note_created
Triggered when a credit note is created.
credit_note
credit_note_created_with_backdating
Triggered when a credit note is created such that generated_at is a value in the past.
credit_note
credit_note_updated
Triggered when a credit note is updated.
credit_note
credit_note_deleted
Triggered when a credit note is deleted.
credit_note
subscription_renewal_reminder
Triggered 3 days before each subscription's renewal.
subscription, customer, advance_invoice_schedule(optional)
transaction_created
Triggered when a transaction is recorded.
transaction
transaction_updated
Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated.
transaction
transaction_deleted
Triggered when a transaction is deleted.
transaction
payment_succeeded
Triggered when the payment is successfully collected.
transaction, customer, subscription(optional)
payment_failed
Triggered when the payment collection fails.
transaction, invoice, customer, subscription(optional)
payment_refunded
Triggered when a payment refund is made.
transaction, invoice, credit_note(optional), customer, subscription(optional)
payment_initiated
Triggered when a payment is initiated via direct debit.
transaction, invoice, customer, subscription(optional)
refund_initiated
Triggered when a refund is initiated via direct debit.
transaction, invoice, credit_note(optional), customer, subscription(optional)
authorization_succeeded
Triggered when a authorization transaction is created.
transaction
authorization_voided
Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time.
transaction
card_added
Triggered when a card is added for a customer.
customer
card_updated
Triggered when the card is updated for a customer.
customer
card_expiry_reminder
Triggered when the customer's credit card is expiring soon. Triggered 30 days before the expiry date.
customer
card_expired
Triggered when the card for a customer has expired.
customer
card_deleted
Triggered when a card is deleted for a customer.
customer
payment_source_added
Triggered when a payment source is added.
customer, payment_source
payment_source_updated
Triggered when the payment source is updated and also when a role is assigned to it.
customer, payment_source
payment_source_deleted
Triggered when a payment source is deleted.
customer, payment_source
payment_source_expiring
Triggered when the customer's payment source is expiring soon. Triggered 30 days before the expiry date.
customer, payment_source
payment_source_expired
Triggered when the payment source for a customer has expired.
customer, payment_source
payment_source_locally_deleted
Triggered when a payment source is deleted at Chargebee.
customer, payment_source
virtual_bank_account_added
Triggered when a virtual bank account is added.
customer, virtual_bank_account
virtual_bank_account_updated
Triggered when the virtual bank account is updated.
customer, virtual_bank_account
virtual_bank_account_deleted
Triggered when a virtual bank account is deleted.
customer, virtual_bank_account
token_created
Triggered when a nonce is created.
token
token_consumed
Triggered when a nonce is consumed.
token
token_expired
Triggered when a nonce is expired.
token
unbilled_charges_created
Triggered when unbilled charges are created
unbilled_charges
unbilled_charges_voided
Triggered when unbilled charges are voided
unbilled_charges
unbilled_charges_deleted
Triggered when unbilled charges are deleted
unbilled_charges
unbilled_charges_invoiced
Triggered when unbilled charges are invoiced
unbilled_charges, invoice
order_created
Triggered when an order is generated.
order
order_updated
Triggered when an order is updated.
order
order_cancelled
Triggered when an order is cancelled.
order
order_delivered
Triggered when an order is delivered.
order
order_returned
Triggered when an order is returned.
order
order_ready_to_process
Triggered when an order reaches it's order date.
order
order_ready_to_ship
Triggered when an order reaches it's shipping date.
order
order_deleted
Triggered when an order is deleted.
order
order_resent
Triggered when an order is resent.
order
quote_created
Event triggered when a new quote is generated.
quote
quote_updated
Triggered when a quote is updated.
quote
quote_deleted
Event triggered when a new quote is deleted.
quote
tax_withheld_recorded
Triggered when a tax withheld is recorded for an invoice.
tax_withheld, invoice, credit_note
tax_withheld_deleted
Triggered when a tax withheld is deleted.
tax_withheld, invoice, credit_note
tax_withheld_refunded
Triggered when a tax withheld is refunded.
tax_withheld, invoice, credit_note
gift_scheduled
Triggered when a new gift is created.
gift
gift_unclaimed
Triggered when a new gift is unclaimed and is ready to be claimed.
gift
gift_claimed
Triggered when a gift is claimed.
gift
gift_expired
Triggered when a gift expires.
gift
gift_cancelled
Triggered when gift is cancelled.
gift
gift_updated
Triggered when a gift is updated.
gift
hierarchy_created
Triggered when a hierarchy is created.
customer
hierarchy_deleted
Triggered when a hierarchy is deleted.
customer
payment_intent_created
Triggered when a payment intent is created.
payment_intent
payment_intent_updated
Triggered when a payment intent is updated.
payment_intent
contract_term_created
Triggered when contract term is created.
contract_term
contract_term_renewed
Triggered when a contract term is renewed.
contract_term
contract_term_terminated
Triggered when contract term is terminated.
contract_term
contract_term_completed
Triggered when contract term is completed.
contract_term
contract_term_cancelled
Triggered when contract term is cancelled.
contract_term
voucher_created
Triggered when a Payment voucher is created.
payment_voucher
voucher_expired
Triggered when a Payment voucher is Expired.
payment_voucher
voucher_create_failed
Triggered when the Payment voucher Creation fails.
payment_voucher

Retrieves list of events.


Sample Request
curl  https://{site}.chargebee.com/api/v2/events \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=2 \
     --data-urlencode event_type[in]="["subscription_created","customer_created"]"
copy
curl  https://{site}.chargebee.com/api/v2/events \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=2 \
     --data-urlencode event_type[in]="["subscription_created","customer_created"]"

Sample Response [ JSON ]

Show more...
{"list": [ {"event": { "api_version": "v2", "content": { "customer": { "allow_direct_debit": false, "auto_collection": "on", "card_status": "no_card", "created_at": 1517505957, "deleted": false, "excess_payments": 0, "id": "__test__KyVnHhSBWm4Xv2rm", "net_term_days": 0, "object": "customer", "pii_cleared": "active", "preferred_currency_code": "USD", "promotional_credits": 0, "refundable_credits": 0, "resource_version": 1517505957000, "taxability": "taxable", "unbilled_charges": 0, "updated_at": 1517505957 }, "subscription": { "billing_period": 1, "billing_period_unit": "month", "created_at": 1517505957, "currency_code": "USD", "customer_id": "__test__KyVnHhSBWm4Xv2rm", "deleted": false, "due_invoices_count": 0, "has_scheduled_changes": false, "id": "__test__KyVnHhSBWm4Xv2rm", "next_billing_at": 1518801957, "object": "subscription", "plan_amount": 1500, "plan_free_quantity": 0, "plan_id": "plan1", "plan_quantity": 1, "plan_unit_price": 1500, "resource_version": 1517505957000, "started_at": 1517505957, "status": "in_trial", "trial_end": 1518801957, "trial_start": 1517505957, "updated_at": 1517505957 } }, "event_type": "subscription_created", "id": "ev___test__KyVnHhSBWm4am2rp", "object": "event", "occurred_at": 1517505957, "source": "api", "user": "full_access_key_v1", "webhook_status": "scheduled" }}, {..} ]}

URL Format GET

https://{site}.chargebee.com/api/v2/events
limit
optional, integer, default=10, min=1, max=100
The number of resources to be returned.
offset
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.
sort_by[<sort-order>]
optional, string filter
Sorts based on the specified attribute.
Supported attributes : occurred_at
Supported sort-orders : asc, desc

Example sort_by[asc] = "occurred_at"
This will sort the result based on the 'occurred_at' attribute in ascending(earliest first) order.
Filter Params
For operator usages, see the Pagination and Filtering section.
id[<operator>]
optional, string filter
Uniquely identifies a event.
Supported operators : is, is_not, starts_with, in, not_in

Example id[is] = "8ndk0hbKm"
webhook_status[<operator>]
optional, enumerated string filter
Returns the events (occurred in the past 6 days) which has this status in any of the events' webhooks.
Note : To retrieve events which have occurred before the 6 day period, use the occurred_at(start_time/end_time) attribute. Possible values are : not_configured, scheduled, succeeded, re_scheduled, failed, skipped, not_applicable.
Supported operators : is, is_not, in, not_in

Example webhook_status[is] = "succeeded"
event_type[<operator>]
optional, enumerated string filter
Specify it if you need to fetch events of a particular type. Possible values are : plan_created, plan_updated, plan_deleted, addon_created, addon_updated, addon_deleted, coupon_created, coupon_updated, coupon_deleted, coupon_set_created, coupon_set_updated, coupon_set_deleted, coupon_codes_added, coupon_codes_deleted, coupon_codes_updated, customer_created, customer_changed, customer_deleted, customer_moved_out, customer_moved_in, promotional_credits_added, promotional_credits_deducted, subscription_created, subscription_created_with_backdating, subscription_started, subscription_trial_end_reminder, subscription_activated, subscription_activated_with_backdating, subscription_changed, subscription_trial_extended, mrr_updated, subscription_changed_with_backdating, subscription_cancellation_scheduled, subscription_cancellation_reminder, subscription_cancelled, subscription_canceled_with_backdating, subscription_reactivated, subscription_reactivated_with_backdating, subscription_renewed, subscription_scheduled_cancellation_removed, subscription_changes_scheduled, subscription_scheduled_changes_removed, subscription_shipping_address_updated, subscription_deleted, subscription_paused, subscription_pause_scheduled, subscription_scheduled_pause_removed, subscription_resumed, subscription_resumption_scheduled, subscription_scheduled_resumption_removed, subscription_advance_invoice_schedule_added, subscription_advance_invoice_schedule_updated, subscription_advance_invoice_schedule_removed, pending_invoice_created, pending_invoice_updated, invoice_generated, invoice_generated_with_backdating, invoice_updated, invoice_deleted, credit_note_created, credit_note_created_with_backdating, credit_note_updated, credit_note_deleted, subscription_renewal_reminder, transaction_created, transaction_updated, transaction_deleted, payment_succeeded, payment_failed, payment_refunded, payment_initiated, refund_initiated, authorization_succeeded, authorization_voided, card_added, card_updated, card_expiry_reminder, card_expired, card_deleted, payment_source_added, payment_source_updated, payment_source_deleted, payment_source_expiring, payment_source_expired, payment_source_locally_deleted, virtual_bank_account_added, virtual_bank_account_updated, virtual_bank_account_deleted, token_created, token_consumed, token_expired, unbilled_charges_created, unbilled_charges_voided, unbilled_charges_deleted, unbilled_charges_invoiced, order_created, order_updated, order_cancelled, order_delivered, order_returned, order_ready_to_process, order_ready_to_ship, order_deleted, order_resent, quote_created, quote_updated, quote_deleted, tax_withheld_recorded, tax_withheld_deleted, tax_withheld_refunded, gift_scheduled, gift_unclaimed, gift_claimed, gift_expired, gift_cancelled, gift_updated, hierarchy_created, hierarchy_deleted, payment_intent_created, payment_intent_updated, contract_term_created, contract_term_renewed, contract_term_terminated, contract_term_completed, contract_term_cancelled, voucher_created, voucher_expired, voucher_create_failed.
Supported operators : is, is_not, in, not_in

Example event_type[is] = "customer_created"
source[<operator>]
optional, enumerated string filter
Source of the event. Possible values are : admin_console, api, scheduled_job, hosted_page, portal, system, none, js_api, migration, bulk_operation, external_service.
Supported operators : is, is_not, in, not_in

Example source[is] = "hosted_page"
occurred_at[<operator>]
optional, timestamp(UTC) in seconds filter
Timestamp indicating when this event had occurred.
Supported operators : after, before, on, between

Example occurred_at[after] = "1349116200"
always returned
Resource object representing event
next_offset
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”.

Retrieves a specific event identified by a unique event identifier.

Note: Only events that are less than 90 days old will be retrieved.

Sample Request
curl  https://{site}.chargebee.com/api/v2/events/ev___test__KyVnHhSBWm4wM2ru \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/events/ev___test__KyVnHhSBWm4wM2ru \
     -u {site_api_key}:

Sample Response [ JSON ]

Show more...
{"event": { "api_version": "v2", "content": {"customer": { "allow_direct_debit": false, "auto_collection": "off", "card_status": "no_card", "created_at": 1517505958, "deleted": false, "excess_payments": 0, "id": "__test__KyVnHhSBWm4tg2rq", "net_term_days": 0, "object": "customer", "pii_cleared": "active", "preferred_currency_code": "USD", "promotional_credits": 0, "refundable_credits": 0, "resource_version": 1517505958000, "taxability": "taxable", "unbilled_charges": 0, "updated_at": 1517505958 }}, "event_type": "customer_created", "id": "ev___test__KyVnHhSBWm4wM2ru", "object": "event", "occurred_at": 1517505959, "source": "api", "user": "full_access_key_v1", "webhook_status": "scheduled" }}

URL Format GET

https://{site}.chargebee.com/api/v2/events/{event_id}
always returned
Resource object representing event

Sample admin console URL

https://{site}.chargebee.com/admin-console/events/123x