#tomfree

1 messages · Page 1 of 1 (latest)

earnest streamBOT
onyx prism
lyric cedar
#

I am just using my sk_test ... api key and then doing the call but receive nothing. i.e. I know I just created such an event but I get However when print the result I get { object: 'list', data: [], has_more: false, url: '/v1/events' } i..el no events at all. Any idea what that is?

#

and 'setup_intent.succeeded' is among the types in my array of types of events I listen to and want to fetch

#

and limit is 100

onyx prism
#

Do you have a pending eventId?

#

in your test mode

lyric cedar
#

let me see if i can get one

#

evt_1MbLThJgnOZBUP8aI74DcILh

#

develied to stripe cli (listen exe but not to my server - since i want to test exactly that case and just turned it on to get the id)

onyx prism
#

You need to have an event that its delivery status is failed, in order to get it from the API call you are doing above

lyric cedar
#

well not really. it was delivered to stripe.exe but intentionally not to my server, since otherwiese I could not get it via the above call to handle missed events.
So I guess the question to my comes down to ho w can I know the eventId but without listening and accepting the event if a not delivery by stripe.exe is already considered successful delivery? Do youi know what I mean?

#

so how can I fail such an event

#

and still get its id

#

cause if i dont listen via stripe.exe at all then also ghe call gives no results, but obbiously I then have no id

onyx prism
#

You need to create a webhook endpoint in stripe, and your endpoint should be responding unsuccessfully (not 2xx), and the event should have failure delivery status

lyric cedar
#

and if my system would be down in the event cannot be delivered at all would i then get it via this call?

onyx prism
lyric cedar
#

cause as as when the event is sent there I intentioanlly used a different port to get the eventid but not have it delivered to then call the missed event call

onyx prism
#

You can't use your localhost endpoint.

lyric cedar
#

is there a way to have different webhooks be called for prod and test data? I see can I also add webhooks via api which is nice for testing but I also of course want the events in production still be delivered so how can i have one webhook for productiona nd different webhooks for testing depending on test case?

#

and btw with the webhook now I see missed events. thanks

onyx prism
lyric cedar
#

thanks. great. Have a beautiful day

onyx prism
#

Welcome!

lyric cedar
#

one more thing.

#

I couldnt see a parameter int he api to create webhook to specify if it's for test or prod. Or does that happen automatically depdning on aoikey used?

#

i.e. sk_test... would always create test webhooks?

onyx prism
#

does that happen automatically depdning on aoikey used?
Yes.

lyric cedar
#

thanks

onyx prism
#

Np!