#sarthak17_error

1 messages ¡ Page 1 of 1 (latest)

open kettleBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1280854487757623389

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

plush rapids
#

Also In certain application I am using standard checkout. Howto store cards for that.

fallen jolt
plush rapids
#

I was sending session client secret a string but i removed it while sharing

fallen jolt
#

It's fine to share really, nothing secret about it. Please share the exact code you're using and the error you're seeing. Hard to help without specific details!

plush rapids
#

<script>
const stripe = Stripe("pk_test_t36Iz19QEIDboHSCYfumx2ks",{stripeAccount: 'acct_1PKwmJCdnxoFimfq'});

initialize();

// Create a Checkout Session
async function initialize() {
const fetchClientSecret = async () => {
return "cs_test_a1vL5o0HXkA4kwLocHSH31SxCioRcMycGwvzZdEFeilUro2YhRbieXn2yU_secret_fidwbEhqYWAnPydgaGdgYWFgYScpJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ3dgYWx3YGZxSmtGamh1aWBxbGprJz8nZGlyZHx2J3gl";
};

const checkout = await stripe.initEmbeddedCheckout({
fetchClientSecret,
});

// Mount Checkout
checkout.mount('#checkout');
}
</script>
<div id="checkout">
<!-- Checkout will insert the payment form here -->
</div>

this is the code

fallen jolt
#

OK, and what's the exact issue?

plush rapids
#

IntegrationError: Invalid initEmbeddedCheckout(options) parameter: fnFetchClientSecret is not an accepted parameter.

#

I am getting this error

fallen jolt
#

FWIW, if you already have a client secret you can just pass it via clientSecret directly

plush rapids
#

let me check with that

open kettleBOT
fallen jolt
#

Otherwise I suspect it's because your fetchClientSecret is a function, not a const/variable and you're not invoking it correctly

plush rapids
#

<script>
const stripe = Stripe("pk_test_t36Iz19QEIDboHSCYfumx2ks",{stripeAccount: 'acct_1PKwmJCdnxoFimfq'});

initialize();

// Create a Checkout Session
async function initialize() {
const fetchClientSecret = async () => {
return ""
};

const checkout = await stripe.initEmbeddedCheckout("cs_test_a1vL5o0HXkA4kwLocHSH31SxCioRcMycGwvzZdEFeilUro2YhRbieXn2yU_secret_fidwbEhqYWAnPydgaGdgYWFgYScpJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ3dgYWx3YGZxSmtGamh1aWBxbGprJz8nZGlyZHx2J3gl");

// Mount Checkout
checkout.mount('#checkout');
}
</script>
<div id="checkout">
<!-- Checkout will insert the payment form here -->
</div>

this is the updated code

IntegrationError: Invalid value for initEmbeddedCheckout(options): value should be an object. You specified: cs_test_a1vL5o0HXkA4kwLocHSH31SxCioRcMycGwvzZdEFeilUro2YhRbieXn2yU_secret_fidwbEhqYWAnPydgaGdgYWFgYScpJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ3dgYWx3YGZxSmtGamh1aWBxbGprJz8nZGlyZHx2J3gl.

#

Please tell me the exact format on initEmbeddedCheckout

fallen jolt
#
stripe.initEmbeddedCheckout({
  clientSecret: 'your_secret'
})
plush rapids
#

okay let me check

#

thats work thanks
How to save cards for stripe standard checkouts because there some application which are old and they are asking for that.

muted obsidian
#

What do you mean by "standard checkouts" exactly?

plush rapids
#

okay let me send you the screenshot. This was used to be modal.

muted obsidian
#

This is a Split Card Element, right?

plush rapids
#

No this was a old tech before hosted pages and scheckout

muted obsidian
#

I know. The guide I shared is not for hosted checkout surfaces.