#Daniel M.-redirect
1 messages · Page 1 of 1 (latest)
.then(async (res) => {
const { error } = await stripe.confirmPayment({
elements,
confirmParams: {
// Return to checkout pending page (fileName is used to later download the file from the server)
return_url: `${process.env.REACT_APP_WEBSITE_DOMAIN}/createAudit/`
}
});
this one
is it fine to put the localhost into the .env variable?
or does it need to be a reachable url from outwards?
While you are testing things, it's totally fine to use a localhost URL.
means when going live i have to provide the actual return url?
so instead localhost:3000/createAudit https://myurl.io/createAudit
?
The return_url you set is where your customer will be redirected after their payment is completed. So you need to provide a valid URL that customer can access.
While you are building your integration, using localhost makes a lot of sense. But once you are live I would recommend using a real URL with your own domain.