// This is your test secret API key. const stripe = Stripe("pk_live_51QfopZIkXI7g9fVHxbGeCVLJeVqIbgvNsOcg4Cix0Ve87vFdnyKYfcaU0cToFUMx0szmY9dckDE1jYrX8o7m4yUD00gsdGVjC0"); initialize(); // Create a Checkout Session async function initialize() { const fetchClientSecret = async () => { const response = await fetch("/st-checkout.php?p=1QfpaaIkXI7g9fVHrfiqWZ6M", { method: "POST", }); const { clientSecret } = await response.json(); return clientSecret; }; const checkout = await stripe.initEmbeddedCheckout({ fetchClientSecret, }); // Mount Checkout checkout.mount('#checkout'); }