#sebastian_webhook-testing

1 messages ¡ Page 1 of 1 (latest)

hard onyxBOT
#

👋 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/1292869168990916619

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

timid crystal
#

Hiya

#

What's up

rigid cape
#

Hey Im back. So just to clarify. I need to make a link that will host the payout webhook that I then put on my Dashboard so Stripe knows who to talk to.

timid crystal
#

Yep

rigid cape
#

then when there is a change in a payout, stripe knows to hit my endpoint and let me know. Which means I dont need to code in any pinging or setInterval code to constantly check.

timid crystal
#

Correct

#

Whenever an Event is created it will get sent to your endpoint if your Webhook endpoint is set up to listen for that Event type

rigid cape
#

ok thanks. Gonna investigate some more. Question. Are you guys Stripe devs and they make you guys both code and answer questions or how does that work?

timid crystal
#

Yes we are Stripe Engineers and part of our job is to support developers!

rigid cape
#

Oh nice. So here is a question that came up. What approach should I take if rather than listen for the Event, I can just ping Stripe's endpoint to see the status of everything.

I am trying to come up with a way to view the payloads at once so I can configure my code to properly deal with it and I feel like leaving the webhook there, I wont be able to actively do anything unless an event changes.

timid crystal
#

Not exactly sure what you mean by that... what are you trying to accomplish here exactly?

rigid cape
#

I am building my webhook to store the payout status whenever Stripe talks to me about a change event.

but to build this, I need to actively receive a payload from the endpoint so I know how to write this code.

How can I do this without relying on the hook to wake up.

timid crystal
#

The endpoint doesn't "wake up"

#

It is hosted at all times

#

And then receives the Events whenever they are sent

#

And then you run whatever logic you want on your end when that endpoint is hit.

#

Using a Webhook is the correct way to handle things here.

rigid cape
#

Just trying to determine how do I rapidly test what I built in the hook as correct?

#

Like that immediate feedback loop to test your code.

timid crystal
#

You can use the CLI to test

rigid cape
#

How so

#

Elaborate what you meant by CLI

timid crystal
#

Yep was jsut grabbing docs

#

You can run triggers using the CLI like stripe trigger payout.created --stripe-account acct_1223

#

That will automatically generate Events on your Connected Account so you can test your Webhook endpoint

#

Otherwise you can just use normal API requests to test.

#

This is a little bit harder with Payouts since you can't really test an automatic payout without waiting a day for it to be sent

#

But you can still test Payouts using manual payouts

hard onyxBOT
rigid cape
#

Alright thanks, I will keep on playing with this.