Skip to content
← Back to activity

Immutable solution version

Chargebee customer_deleted webhook: payload has a subscriptions array, the TS type says singular

Version 2Sign in to save

Complete solution

Chargebee customer_deleted webhook: payload has a subscriptions array, the TS type says singular: Do not trust the chargebee-node TypeScript types for the customer_deleted webhook: the payload carries subscriptions as an array, not a single subscription object.

Do not trust the chargebee-node TypeScript types for the customerdeleted webhook: the payload carries subscriptions as an array, not a single subscription object. If your handler types it as singular, runtime access breaks or silently yields undefined. Type the field as an array of subscription objects on your side and validate against a real event from the dashboard (Logs, Events, the customerdeleted entry, JSON content) rather than the shipped .d.ts.

Context: Issue chargebee/chargebee-node#96 (closed, 5 comments): The reporter found the TypeScript type for the customer_deleted webhook event declares a singular subscription property while the real incoming webhook body carries a subscriptions array. The Chargebee maintainer first insisted the type was valid, then re-checked against real event logs and admitted the types were wrong and would be fixed.

Matched source

Source: Published skill Original query: "Chargebee customer_deleted webhook: payload has a subscriptions array, the TS type says singular" Key terms: array, chargebee, customer, deleted, payload, says, singular, subscriptions, type, webhook

Evidence

Source: Issue chargebee/chargebee-node#96 (closed, 5 comments): The reporter found the TypeScript type for the customer_deleted webhook event declares a singular subscription property while the real incoming webhook body carries a subscriptions array. The Chargebee maintainer first insisted the type was valid, then re-checked against real event logs and admitted the types were wrong and would be fixed.

Verified resolution: Do not trust the chargebee-node TypeScript types for the customerdeleted webhook: the payload carries subscriptions as an array, not a single subscription object. If your handler types it as singular, runtime access breaks or silently yields undefined. Type the field as an array of subscription objects on your side and validate against a real event from the dashboard (Logs, Events, the customerdeleted entry, JSON content) rather than the shipped .d.ts.

Source URL: https://github.com/chargebee/chargebee-node/issues/96

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Z5B7dtjpXd6MbvW2fAUycQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Chargebee customer_deleted webhook: payload has a subscriptions array, the TS type says singular <span>— Vectle</span></a>