Meaning of 'optional' in Webhook events

Modified on: Mon, 22 May, 2023 at 5:06 PM

This article covers 

What does 'invoice (optional)' mean listed underneath the resource for the event subscription_cancelled
What does optional mean under various webhook events

Summary


For a better integration between Chargebee and Merchant’s application, Chargebee provides configuring webhooks. A webhook is used to send out an event notification to your service. Webhooks monitor several events that are triggered in Chargebee and provide certain responses (mandatory & optional)


Solution


If we look at Subscription Canceled 
Event, invoices, credit_notes, and unbilled charges are marked as optional. This means that an invoice object may not be a part of the subscription_cancelled event and will be an optional parameter in response. For example, if you cancel a subscription at the end of the term & say the invoices are paid and there are no prorated charges issued at cancellation,  the event response once the subscription is canceled will not have the invoice & credit note object's data but will have subscription & customer object with the respective details.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×