#Zia
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
Hello Tarzan
we are using standard connected accounts
and creating checkout Session Ids and sending these ids to frontend
then frontend redirects and opens a checkout page for purchase
but it says that session not found
we are sending ids
and using stripe.redirect on frontend
stripe
.redirectToCheckout({
sessionId: purchaseSessionId.checkoutSessionId
})
it says session not found
and when we add client referrence:
stripe
.redirectToCheckout({
sessionId: purchaseSessionId.checkoutSessionId,
clientReferenceId: purchaseSessionId.stripeStandardAccountId,
})
it says that Uncaught IntegrationError: stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.
ok that's really not the way you should handle this
you should send the url and just redirect the window.location on the frontend
but in all cases there also another potential issue for future implementations that needs to be addressed
depending on how you created the object on the backend (e.g. secret key of the platform + Connect Account Id) you need to use the equivalent configuration on the frontend (e.g. publishable key + Connect Account Id)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes, we are using secret key of platform and passing standard account id in request options while creating checkout session
and sending the key to frontend
and then on frontend we are using stripe.redirect with same platform secret key
we were doing the same for custom connected accounts and it was working fine
but now we also needs to integrate standard connected accounts
Hey! Taking over for my colleague. Let me catch up.
When initializing Stripe Js, you need to pass the Connected Account id
https://stripe.com/docs/js/initializing#init_stripe_js-options-stripeAccount
hmm
ok
let me try this
every time we need to reinitialize stripe with new stripe account Id, right?
yes
HI ๐ jumping in as my teammate needed to step away. I was coming to close the thread as the conversation seems to have settled, but I noticed this message that you sent. I wanted to clarify that you should not be sending a secret key to your frontend, that key needs to remain secret and should not be transmitted anywhere. If that secret key has been transmitted anywhere, then it should be rolled promptly:
https://stripe.com/docs/keys#rolling-keys