#whiteplatin_webhooks

1 messages ยท Page 1 of 1 (latest)

chrome quiverBOT
#

๐Ÿ‘‹ 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/1410660370389008475

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

native crystal
#

Hi there

#

I think you are asking for a Webhook for when the Balance Transaction becomes available, yes?

#

Or you just want to know when funds have entered your balance?

#

Not necessarily when they are available for Payout

thorn void
native crystal
#

payment_intent.succeeded is the correct Webhook for this. But, funds could always be pulled out due to a dispute after this point.

#

That Webhooks signals a successful payment though and is the one you want to use.

thorn void
#

Yeah disputes, and fraud etc. is fine ๐Ÿ™‚

#

So I could basically just work with payment_intent.succeeded ?

Thanks I think Im good

#

๐Ÿ™‚

native crystal
#

Yep

thorn void
#

๐Ÿ‘

#

Should I create a new question ?
I am able to place orders without hooks.
What I mean is....
Sometimes the webhook goes offline, but stripe checkout still can occur and complete.

I rely on webhooks to generate orders.
But when the webhook goes offline, Im still able to receive payments via Stripe Checkout page

native crystal
#

Nope no need to open a new thread.

thorn void
#

hmm, imagine its for same day delivery.
Cant wait 3days to generate order as an example

native crystal
#

Why do you expect your endpoint to be down?

#

Like that should only happen if something was broken?

#

But if you are truly concerned about this then you would want to poll the API either by attempting to retrieve the PaymentIntent that was just created at a specific interval or List PaymentIntents.

#

You could implement some sort of backup check where if a PaymentIntent is not completed after a certain timeframe you could retrieve it to check its status.

thorn void
#

I guess what I really want to know is, how does the stripe checkout site work (where people fill their names and credit card numbers etc.), does that also have an "internal" payment_intent.succeeded ?

native crystal
#

What do you mean by "internal"?

#

When a payment is completed via Stripe Checkout a payment_intent.succeeded Webhook will be emitted, yes.

thorn void
#

Imagine I only want to work with the Stripe Checkout Page, and without webhooks, is that possible ?

native crystal
#

Technically yes, you would poll the API by retrieving the Checkout Session that was created.

thorn void
#

Because the checkout page works without listening for webhooks.

Or do I ALWAYS always listen for webhooks ?

native crystal
#

The recommendation is to listen for Webhooks and use those for fulfillment.

#

But it is possible without, by polling the API.

thorn void
#

But it is possible without, by polling the API.
Dont know what this means

Let me extend my first question ๐Ÿ˜„

Is there like an "initial" webhook endpoint that I can listen to, to ensure that I am listening to the webhook.

Eg:

If webhook_init is read than continue to Stripe Checkout page.
Otherwise dont continue to Stripe Checkout Page, because the webhook listener is offline or crashed.

Why do you expect your endpoint to be down? I meant my endpoint listener to clarify

native crystal
#

You should google polling if you don't know what it means. It basically just means making repeated retrieval requests over a period of time to check for data changes.

#

No there is no "initial" webhook but really I think you are thinking of this the wrong way. You should have testing and observability in place in case your Webhook endpoint/handler goes down and you should then fix that issue if the issue arises. There shouldn't be an expectation that your Webhook endpoint would not be functioning.

#

Like yes you should have backups/precautions in place but it seems like you are trying to solve for the wrong thing here imo.

thorn void
#

I meant my Webhook Enpoint Listener ๐Ÿ™‚
Still in dev obviously, and when I do test payments with stripe, I sometimes forget to turn on the webhook listener

native crystal
#

Sorry I don't know what that means... you shouldn't be turning on/off your endpoint?

#

That's really not how Webhooks are designed to work.

#

You should have a hosted Webhook endpoint that is always available and when that endpoint is hit your Webhook handler code should process the Event.

thorn void
#

So this stripe listen --forward-to https://3235sd-production.up.railway.app/webhooks/stripe
Should be on 24/7 basically ?

native crystal
#

That should only be for development.

#

You should not be using that for a live integration.

thorn void
#

OHHH

native crystal
#

You would create a Webhook endpoint, which you can do via your Dashboard, with that URL.

thorn void
#

I seee! Ok will look into that , thanks a bunch again!

native crystal
#

Sure

thorn void
#

Is it possible to customize or restrict the Stripe Checkout page itself? For example, can I enforce rules such as requiring the shipping address to be within a specific city, or blocking checkout after certain hours when the shop is closed?

native crystal
#

You could use Radar rules to require certain shipping addresses. In terms of blocking Checkout... you would handle that logic on your end and throw an error instead of redirecting the customer to Checkout if you don't want them to have access during certain hours.

chrome quiverBOT
versed meadow
#

hello! fyi i'm taking over this thread, lmk if you have any additional questions!

thorn void
versed meadow
#

catching up on the context, give me just a minute...

thorn void
#

Thanks very much, Ill have a read later and get back to you

versed meadow
#

sounds good! we usually close threads out after a period of inactivity but if this one is closed later you're always welcome to make another

thorn void
#

Ah got it , sure.

Ill say this, my website is more of a marketplace, so different customers will have different restrictions and different cities.

Alot to ask of a checkout page ^^.
Maybe take a custom stripe route ? Although I do like the convenience of the Stripe Checkout Page.

#

Cause all of the validation checks I do before reaching the checkout page, could be wasted after the checkout , because theres no validation I can do in the checkout page