#joseph01
1 messages · Page 1 of 1 (latest)
Yes. Before checkout there is a input field for email address enter. And then checkout button when clicked it would send the payment link of the product selected in the customer's email.
Are you using Checkout Session or Payment Link?
I am using checkout session. But can't figure out a way to send the link through email. So maybe stripe payment link. What do you suggest ? If you could help!
Well, one option would be:
- You create the Checkout Session on your backend
- You retrieve the Checkout Session
urlhttps://stripe.com/docs/api/checkout/sessions/object?lang=curl#checkout_session_object-url - You send the url yourself to the user
But note that Checkout Session url expire after 24 hours, so it's not ideal. So instead what you should do:
- Send an email to your user, with a link to a page of your website
- When they click on the link, you automatically create a new Checkout Session
- And then you redirect the user to the Checkout Session url.
Hey thank you for the suggestion.
But the issue is I can't send email directly. It's supposed to generate automatic email as soon as customer clicks on checkout button.
If you want to send emails to customer with a payment link in them, it's completely up to you to send the email. So you'll have to write some code to handle this on your end.
Yes that I have covered up. Okay sorry I misunderstood your reply. That automatic email will be generated. But how do I create the link for the checkout.
Once the user click the link inside their email, you create a new Checkout Session with https://stripe.com/docs/api/checkout/sessions/create and then redirect users to the Checkout Session URL.
To learn more about Checkout Session: https://stripe.com/docs/payments/accept-a-payment
Thank you. I would go through this.
And one more thing. How do I change the product price based on currency selected
What do you mean by "currency selected"? You mean the customer will select the currency directly on your website?
Yes. Like $ , £ and €.
Based on currency the product price will change. How can it be done from stripe. As it already shows it would show local currency to users.
When you create the Checkout Session you can just pass a price ID that is using the correct currency.
Another option is to use this: https://stripe.com/docs/payments/checkout/present-local-currencies
Okay. Thank you!