Does RC provide through any of the SDKs type definitions for their Webhook Events? I’m working in NodeJS and want to receive webhooks to keep some state locally. I can see their examples and write my own type definitions, but the Best Practices state,
“You should be able to handle webhooks that include additional fields to what's shown here, including new event types. We may add new fields or event types in the future without changing the API version.”
It would be preferable to have an officially supported set of these objects and types, similar to what Stripe provides for their events, for folks out there that want to process Webhooks events because the documentation leaves some things ambiguous.
For example, in the section on Subscription Lifecycle Event Fields, it says that tax_percentage
can be NULL
if unknown. Then on the Webhooks Sample Events page, tax_percentage
is completely absent in some examples (Renewal), present in some (Uncancellation), and NULL
in others (Billing Issue). This makes it really hard to understand exactly what will be present in the different message types. In NodeJS, absent values (undefined
) and NULL
values are two completely different things.
Lacking official type definitions, could we at least get clearer documentation on the Webhook events to indicate whether it will always be present; whether it will always be present, but possibly NULL
, and when it may not be present at all?
Thanks...