#altairsama69
1 messages · Page 1 of 1 (latest)
Yeah your way is the only way to achieve this. You can't select dynamic amounts within checkout depending on the payment method the user clicks
does stripe support this in any other product? the reason we chose checkout was it requyired minimal integration with our frontend
also I was going through the webhooks docs, and would you recommend using stripe-cli to forward webhooks even on a production setup?
or should we just directly expose the endpoints and stripe can just hit them? in this case what about security? webhooks in general need a quick 200 return code right? so do we have to first authenticate the webhook using the stripe package and then return the 200 code?
does stripe support this in any other product? the reason we chose checkout was it requyired minimal integration with our frontend
It's a niche usecase but you could build out the fuctionality yourself with Elements
No
or should we just directly expose the endpoints and stripe can just hit them? in this case what about security? webhooks in general need a quick 200 return code right? so do we have to first authenticate the webhook using the stripe package and then return the 200 code?
Yes. See: https://stripe.com/docs/webhooks/quickstart
gotcha thanks, so autheticating each webhook request is a must then
and stripe has a 5 min window to reply with a 200 right?
for each webhook request
Where did you get 5 min?
in the docs about webhooks, maybe I got it wrong
We retry requests to your endpoint if it doesn't respond with a 200
But timeouts are seconds not minutes
We don't keep connections open that long
can you give me an idea in general? like whats the expected response time for this? and it seems like the example uses a stripe signature header for auth, is this the recommended method?
whats the expected response time for this?
What do you mean? It's your endpoint
You should have it respond as quickly as you can
But idk exact timeout. We don't publish the value
Probably if you're responding within 10 sec you should be fine, but idk for sure
gotcha thanks
Should aim for as fast as possible
so signature header is the way for auth instead of authenticating the event with stripe and then returning 2xx
Yeah. Recommend you read this whole doc: https://stripe.com/docs/webhooks
It should contain all the info you need
It goes over signature verification in depth
I'll do that, thanks for the help!