#merrow-payment-complete-js
1 messages · Page 1 of 1 (latest)
hey there, can you share how you're integrating and completing that payment on the client already?
you should be able to await or chain .then() on confirmCardPayment and use the payment result from it
like this
oh, thats with checkout
ok, you need to either listen to the webhook or use the custom success page:
the latter if you need something client side on redirect
ok I got it thanks
np!
Archiving this thread 🗄️ -- if you have further questions, please feel free to ask in the main channel!
Unarchived: did you run in to some trouble with this @lost kayak ?
yeah I did
I didnt quite understand when you said "the latter if you need something client side on redirect
"
well, you asked about calling something in the client. what are you trying to do? I've imagined this as some kind of success/thank you page where you want to show something or take some action.
What is your end goal?
So basically after the checkout I want to send the costumer an email about the payment and I want to take the email adress that he put before the checkout and send an email to it. I already appended the email adress to the costumer_email thing in the checkout but I cant take it from there because I also have paypal setup, and I am making a same post request after the payment is complete with paypal, so I cant take the email adress from the checkout session because after the payment with stripe paypal is calling out the same function and it wouldnt understand what to do when I am taking the email adress from the stripe checkout session. So I am trying to callout a client side javascript function after the payment is complete with stripe so it can get the email adress element that he entered earlier before the checkout and make a fetch request to the post request that sends the email so I can get it from that javascript client side function with bodyparser and send an email to the costumer with it so the post request that sends emails could both work with paypal and stripe.
I know its really confusing sorry
do you actually need to do anything client side specifically?
Checkout works with a redirect, so you page no longer exists with any of the email forms filled out
you could append that to the session metadata when you create it, and have it available on the session object
in which case you could use webhooks to know about your completed checkouts and send emails
if you really want to handle part of this client side or show a customized success page, you want this:
You would extract the session id from the url query params then, and use that to get any data and send email form your server
yeah but I dont have the session id in my url
no not really
sure but after redirect, you can have the session based on the docs i linked
did you look at setting the template in the url like that shows?
you maybe want to look at the cwebhook option (other link i shared), but this can be somewhat complex to set up
yes I did
Is there a way I could get the email adress from an input field that I put before the checkout tho
not afterwards, but you said you're sending that as the session customer email, so i'm confused why you need it again