#sarita9248

1 messages · Page 1 of 1 (latest)

buoyant skiffBOT
outer marten
#

What source are you referring to? Can you illustrate in an example?

unkempt creek
#

Does it make sense?

#

Hi

outer marten
#

Thanks for waiting! Discord is busy now and will take time to respond

#

Which URL is this for? If it's for return_url, then you can add the source parameter in the link

unkempt creek
#

Is there a doc link that you can share?

outer marten
unkempt creek
#

This is my current code, will adding the source=xyz to the thank-you page get recorded in the stripe automatically? I want the source to be recording some where in the stripe with my transaction.

async function handleSubmit(e) {
e.preventDefault();
setLoading(true);

var homepageURL = window.location.origin;
console.log(homepageURL);
const { error } = await stripe.confirmPayment({
elements,
confirmParams: {
// Make sure to change this to your payment completion page
return_url: homepageURL + "/thank-you",
},
});

if (error.type === "card_error" || error.type === "validation_error") {
showMessage(error.message);
} else {
showMessage("An unexpected error occurred.");
}

setLoading(false);
}