#niraj-p_error
1 messages ¡ Page 1 of 1 (latest)
đ 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/1400424949532983376
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Where is this error thrown? That's an internal API object, you shouldn't be interacting with that directly
It is throwing error when i mount stripe payment element with adaptive pricing.
Can you share the exact code that youy're using that throws the error?
this.elements = await this.stripeV3.initCheckout({
fetchClientSecret: () => this.getClientSecret(clientSecret),
elementsOptions: { appearance: STRIPE_APPEARANCE_ELEMENT },
});
this.paymentElement = this.elements.createPaymentElement();
this.paymentElement.mount('#payment-element');
const currencySelectorElement = this.elements.createCurrencySelectorElement();
currencySelectorElement.mount('#currency-selector');
I am using above code
What's the value of clientSecret?
cs_test_a1aON10YVpTTA4C2ltIiJzrBKsro33tZpsYLHg9u6vdW4XM1EqHP7zJVHN_secret_fidwbEhqYWAnPydmcHZxamgneCUl
checkout session client secret
Can you share the code you use to init Stripe.js?
this.stripeV3 = Stripe(pk, { betas: ['custom_checkout_adaptive_pricing_2'], locale: this.currencyCode || 'auto', });
You're missing the stripeAccount param there: https://docs.stripe.com/js/initializing#init_stripe_js-options-stripeAccount
Your Checkout Session is created on a connected account via your platform keys, here: https://dashboard.stripe.com/test/logs/req_dH2fR7iGpI9rzy
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
No it was created by connected account platform key
It was all working good till now
The creation request was made via the keys from acct_1FixTpHWMWhDPqNo
You pass the Stripe-Account header on that creation request for acct_1ESLU7DMHyYK6LSZ
You'll need to add stripeAccount: 'acct_1ESLU7DMHyYK6LSZ' to your Stripe.js init code
Let me check
hi! I'm taking over this thread. let me know if you have other questions.
As you can see here
pk means platform keys
yes you need to platform keys, and also set the Stripe-Account header to the connected account ID.
https://docs.stripe.com/js/initializing#init_stripe_js-options-stripeAccount
Unable to open this link
But it is working fine with the other checkout sessions and it was also working fine till now i'm facing this issue right now
I don't reallt follow. If you create a Checkout Session on a Connected account, using a Direct Charge (like you did with cs_test_a1aON10YVpTTA4C2ltIiJzrBKsro33tZpsYLHg9u6vdW4XM1EqHP7zJVHN_secret_fidwbEhqYWAnPydmcHZxamgneCUl)
Then you also have to use the Stripe-Account header when initializing Stripe.js
can you try with a different browser? it's working fine on my end.