#abe_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240824952182280243
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, there is https://docs.stripe.com/api/events/object#event_object-type where tell the Event name, and normally you can branching from that string and expect what object you will be receiving in data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ya but thats teh webhook event type
it doesn't align with the objects
for example charge.pending is a Charge object https://docs.stripe.com/api/events/types#event_types-charge.pending
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but charge.refund.update is a Refund object
https://docs.stripe.com/api/events/types#event_types-charge.refund.updated
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The point I'm getting to is that stripe has over 300 Event type and there is no programmatic way to determine the Object being handled in the event
for my project idea I therefor need to maintain a mapper mapping out each Event to a object
It would be nice it they simply added a field indicating the type
is there a way I can provide such feedback?
Yes sure I will record your feedback
And true agree charge.refund.update is a Refund object indeed
my point is you cannot really parse what object you are dealling with - it needs to be hard coded
this could be avoided if the Event object announce which Stripe object it handles...
Btw
I have another question
Does stripe publish a json schema for each object?
We only have it in our public API Reference https://docs.stripe.com/api
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Search for any object here
ie. the Charge object https://docs.stripe.com/api/charges/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ya
I am aware
Thats what I use when using a specific object
But im looking for a programming way to understand the object
Can u also put in a request to publish a json schema?
Hi, how about this https://github.com/stripe/openapi/tree/master
That might help