#J7

1 messages · Page 1 of 1 (latest)

hushed cargoBOT
polar mist
#

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.

sinful prawn
#

Makes sense. How about card payments though?

polar mist
#

Card payments are synchonous

#

You'll get the success/fail message in response to the API request

sinful prawn
#

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?

polar mist
#

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.

sinful prawn
#

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

polar mist
#

Well that would be up to your integrations auth/auth system. We don't have any recommendations for that specific scenario.

sinful prawn
#

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