#J7
1 messages · Page 1 of 1 (latest)
Hi 👋
Since delays can be up to days for async payment methods (e.g. ACH DD), we generally don't have a recommendation for communicating back to the browser. It is assumed the customer will be off-session at that point so our suggested pattern would be to send an email receipt.
Makes sense. How about card payments though?
Card payments are synchonous
You'll get the success/fail message in response to the API request
right but that api request is client-side right? So wouldn't I still need to listen for the webhook from stripe to reliably do my processing server side?
Sure, that's recommended to ensure your server code gets the information even if your customer navigates away before the client returns the success message
But I thought you were asking about browser communication, which wouldn't matter in that case.
right so say I need to create a user on my server after the payment suceeds. If the user stays on session I want to log them in
Well that would be up to your integrations auth/auth system. We don't have any recommendations for that specific scenario.
I guess I'm saying I'll need to listen for the webhook to do some processing. Then I want to communicate to the browser that something happened in response to payment. Seems like the only way to do so would be with a websocket or having the browser poll