Chargebee · event: subscription_created ·
content type: application/json
This is a representative sample — fake IDs, real structure. To see a payload with your data, point the provider at a capture URL (button below).
One click creates a free capture bin with this exact payload already in it — pretty-printed, headers inspectable, replayable to your own endpoint:
Then paste the bin's URL into Chargebee's webhook settings to capture a real delivery. No signup.
content-type: application/json authorization: Basic Y2Itd2ViaG9vay11c2VyOmNiLXdlYmhvb2stcGFzcw==
{
"id": "ev_16BPgETyVrQbiGhA",
"occurred_at": 1788150551,
"source": "admin_console",
"user": "ada@acme.dev",
"object": "event",
"api_version": "v2",
"content": {
"subscription": {
"id": "16BPgETyVrQVHGh1",
"billing_period": 1,
"billing_period_unit": "month",
"customer_id": "cust_ada",
"status": "active",
"current_term_start": 1788136151,
"current_term_end": 1790814551,
"next_billing_at": 1790814551,
"created_at": 1788150551,
"started_at": 1788136151,
"activated_at": 1788136151,
"updated_at": 1788150551,
"has_scheduled_changes": false,
"channel": "web",
"resource_version": 1788150551793,
"deleted": false,
"object": "subscription",
"currency_code": "USD",
"subscription_items": [
{
"item_price_id": "pro-plan-USD-1_MONTH",
"item_type": "plan",
"quantity": 1,
"unit_price": 2900,
"amount": 2900,
"free_quantity": 0,
"object": "subscription_item"
}
],
"due_invoices_count": 0,
"mrr": 2900
},
"customer": {
"id": "cust_ada",
"first_name": "Ada",
"last_name": "Deveraux",
"email": "ada@acme.dev",
"auto_collection": "on",
"net_term_days": 0,
"allow_direct_debit": false,
"created_at": 1788136100,
"taxability": "taxable",
"updated_at": 1788150551,
"pii_cleared": "active",
"channel": "web",
"resource_version": 1788150551700,
"deleted": false,
"object": "customer",
"card_status": "valid"
}
},
"event_type": "subscription_created",
"webhook_status": "scheduled",
"webhooks": [
{
"id": "whv2_Azz5aITsMVdKtVWV",
"webhook_status": "scheduled",
"object": "webhook"
}
]
}
Authorization: Basic … header) and/or a random key inside the URL path.
For belt-and-braces integrity, re-fetch the event by id via the Retrieve
Event API instead of trusting the delivered body.id.resource_version (ms timestamp, bumped on every change) with
what you've stored and ignore stale ones. The payload is a point-in-time snapshot that
never changes on retries — it can be outdated by delivery time, so re-fetch the
resource when current state matters.api_version (v2 here) matches your client library
before parsing content, and route on event_type — one URL
receives every subscribed event, each wrapped in this same envelope with the relevant
resources (subscription, customer, card, invoice…) under content.Reproduce this delivery against any endpoint (your handler, a bin, staging):
$ curl -X POST https://your-endpoint.example/hook \
-H 'content-type: application/json' \
-H 'authorization: Basic Y2Itd2ViaG9vay11c2VyOmNiLXdlYmhvb2stcGFzcw==' \
-d '{"id":"ev_16BPgETyVrQbiGhA","occurred_at":1788150551,"source":"admin_console","user":"ada@acme.dev","object":"event","api_version":"v2","content":{"subscription":{"id":"16BPgETyVrQVHGh1","billing_period":1,"billing_period_unit":"month","customer_id":"cust_ada","status":"active","current_term_start":1788136151,"current_term_end":1790814551,"next_billing_at":1790814551,"created_at":1788150551,"started_at":1788136151,"activated_at":1788136151,"updated_at":1788150551,"has_scheduled_changes":false,"channel":"web","resource_version":1788150551793,"deleted":false,"object":"subscription","currency_code":"USD","subscription_items":[{"item_price_id":"pro-plan-USD-1_MONTH","item_type":"plan","quantity":1,"unit_price":2900,"amount":2900,"free_quantity":0,"object":"subscription_item"}],"due_invoices_count":0,"mrr":2900},"customer":{"id":"cust_ada","first_name":"Ada","last_name":"Deveraux","email":"ada@acme.dev","auto_collection":"on","net_term_days":0,"allow_direct_debit":false,"created_at":1788136100,"taxability":"taxable","updated_at":1788150551,"pii_cleared":"active","channel":"web","resource_version":1788150551700,"deleted":false,"object":"customer","card_status":"valid"}},"event_type":"subscription_created","webhook_status":"scheduled","webhooks":[{"id":"whv2_Azz5aITsMVdKtVWV","webhook_status":"scheduled","object":"webhook"}]}'