#whiteplatin_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/1410660370389008475
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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
I guess so ?
Is there a condition to be met for it to become available for payout ?
Basically where I can be confident, that the money wont disappear. E.g. customer cant revert payment, and money is inside balance account.
Sry, I hope u know what Im saying.
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.
Yeah disputes, and fraud etc. is fine ๐
So I could basically just work with payment_intent.succeeded ?
Thanks I think Im good
๐
Yep
๐
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
Nope no need to open a new thread.
If you Webhook endpoint is down (you aren't responding with 200s) then we will retry for 3 days: https://docs.stripe.com/webhooks#automatic-retries
hmm, imagine its for same day delivery.
Cant wait 3days to generate order as an example
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.
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 ?
What do you mean by "internal"?
When a payment is completed via Stripe Checkout a payment_intent.succeeded Webhook will be emitted, yes.
Imagine I only want to work with the Stripe Checkout Page, and without webhooks, is that possible ?
Technically yes, you would poll the API by retrieving the Checkout Session that was created.
Because the checkout page works without listening for webhooks.
Or do I ALWAYS always listen for webhooks ?
The recommendation is to listen for Webhooks and use those for fulfillment.
But it is possible without, by polling the API.
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
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.
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
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.
So this stripe listen --forward-to https://3235sd-production.up.railway.app/webhooks/stripe
Should be on 24/7 basically ?
That should only be for development.
You should not be using that for a live integration.
OHHH
You would create a Webhook endpoint, which you can do via your Dashboard, with that URL.
I seee! Ok will look into that , thanks a bunch again!
Sure
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?
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.
hello! fyi i'm taking over this thread, lmk if you have any additional questions!
Hi,
The thing is the customer can access the Checkout before closing, and leave it open for however long , which would exceed opening hours?
One way to maybe overcome this is, if the checkout page has a timer ? Or maybe something much better ?
catching up on the context, give me just a minute...
you can expire the checkout session using this parameter, so one option might be to just set the expiration to the time you want to stop accepting orders that day
https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-expires_at
Thanks very much, Ill have a read later and get back to you
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
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