#paul_best-practices
1 messages · Page 1 of 1 (latest)
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.
- paul_code, 3 days ago, 8 messages
đź‘‹ 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/1276628211748438147
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, taking a look
We document this here, https://docs.stripe.com/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#webhooks where we share that you can listen to webhook events. The recommendation on polling the reader is when you see webhook event delivery issues: https://docs.stripe.com/terminal/payments/collect-card-payment?terminal-sdk-platform=server-driven#stripe-api. So after you get the event, you can make the updates.
Yeah I saw that, I was thinking of the user experience / idiot proofing, a “check status” button could be ignored, or clicked a million times. Webhook isn’t a problem got that working. Are you saying if I do just have some javascript/ajax polling either stripe or my database to update in the browser then that’s best? And checking the payment intent is best unless there are issues in which case check the reader? I just didn’t want to make a load of requests. Its kind of annoying the Reader doesn’t return something more useful after processPaymentIntent is called.
Our reccomendation is that you listen to the webhook events. Or, poll the Reader and PaymentIntent status to receive the status of the payment. The reason why we do not return 'useful things' after is because we do not know when the end customer will present their card. For this reason, the recommendation is that you listen to the events and store this data in your database for instance. Then, you can pull that data from your end if you're not wanting to make many calls or hit rate limiting errors.
ok thanks, that is basically what I wanted to know :).