Open waptik opened 1 year ago
Interesting request @waptik. This isn't something we've considered adding to the library, however, do you mind sharing how you'd like this to work? Using the charge.success
as an example, how would you want to parse an event in your webhook function if types are available?
@damilola-paystack I think @waptik means having types like what we have here in Stripe Events
@damilola-paystack I think @waptik means having types like what we have here in Stripe Events
Yup, this is exactly what I meant. I saw it being used in a project and I thought it'd be great to have the same thing here as part of the library.
Got it @orimdominic @waptik. I'll look into adding this in an upcoming version. You could also make this your first contribution if you are up for it 😀.
Is your feature request related to a problem? Please describe. As for right now, there doesn't to be any type definition for webhook events inside this library that will help validate the incoming webhook events.
Describe the solution you'd like It'd be great to have a built-in type definition for webhook events in this library. This will save us time of having to manually write our own.
Describe alternatives you've considered What i've been doing so far is to model the types of each events(
charge.success
as for now) based on received webhook response or often time cross check supported-eventsAdditional context None