#arrowcircle

1 messages · Page 1 of 1 (latest)

proper starBOT
cobalt blade
#

Hello

#

Webhooks will contain their relevant object

willow smelt
#

yes, but where I can find example jsons?

cobalt blade
#

Then look at that object's properties

willow smelt
#

so I can use them in tests

cobalt blade
#

For the actual JSON you would trigger the Event yourself

willow smelt
#

so no examples?

cobalt blade
#

You can also see an example JSON response for each object in the API reference as well

#

On the right side is the JSON response for a basic PaymentIntent creation

willow smelt
#

these example api references are present only for single webhook event 😦

cobalt blade
#

I don't know what you mean by that

willow smelt
#

there are a lot of webhook event types

#

each of them have different structure

#

i want to write tests first for my code using sample jsons as inputs

#

and I am looking a way to find these json contents

cobalt blade
#

Each of them do not have different structures.

#

The structure is always the object that is returned

#

The easiest thing to do here is to use the Stripe CLI and use stripe trigger

#

That will make the necessary API requests for you and generate the Event you want