#_best-practices
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/1404642803803361411
📝 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.
- _best-practices, 5 days ago, 31 messages
Hi
I want to use some payment options that have delayed delivery or whatever its called
so I'm using webhooks but I don't know exactly what the flow should be
I'm thinking to take checkout session completed -> store payment intent to db -> wait for the corresponding payment intent success, and grant the product
I wanted to just use the payment intent success event but theres no data on it like customer email, or payment link metadata
I've created a payment link
just what I needed
it doesnt mention anything about the delayed payment options, like the European bank transfer, etc..
but I'll assume its implied that the payment has been 100% completed & funds transferred
is that correct
Some payment methods aren’t instant, such as ACH direct debit and other bank transfers. This means, funds won’t be immediately available when Checkout completes. Delayed payment methods generate a checkout.session.async_payment_succeeded event when payment succeeds later. The status of the object is in processing until the payment status either succeeds or fails.
np
just to clear it up before I implement this,
- User finishes checkout
- Webhook is received with the status of paid (Store details in DB)
- Grant the product
or
- User finishes checkout
- Webhook is received with status of pending (Store details in DB)
- Either grant the product or wait for the async event and then grant the product
Yes correct (please test in Sandbox)
what happens if theres an error during the webhook
and I return http 500
delayed re-try?
We will retry, resend. Be careful cause sometimes that will affect how Stripe treat the object
With Checkout Session we pretty much not care, but ie for invoice.created, we do look at webhook event response and decide to move forward or pending Subscription behavior
So my advice is try to response 200 as soon as you received the webhook event, then do your logic async