#dragosh-elements

1 messages · Page 1 of 1 (latest)

viral glacier
#

hello, give me a sec, catching up

#

Is there a way to do the custom checkout form for a standard connected account that uses the Payment Element?
yes

wheat shuttle
#

Can you please give me a link to the docs describing how to do it? Thanks.

viral glacier
wheat shuttle
#

My assumption was also they are similar, but at the last step, when I try to use the client secret to retrieve the payment intent I get a 404 not found from the Stripe Server.
Mind that on the confirmation page where I'm taken by the checkout flow I don't have the connected account (I only get the payment intent and the client secret in the url query), thus I cannot initialise Spripe.js with it.

viral glacier
#

@wheat shuttle ah you mean on the return_url? are you trying to fetch the PaymentIntent client-side? with Stripe.js's retrievePaymentIntent() method?

wheat shuttle
viral glacier
#

ah gotcha, so you can do a couple of things
1/ set the connect account ID as a cookie to persist it across the redirect, so that on the return_url redirect, if that cookie is present and you can init Stripe.js with the Connect account ID (and the Platform publishable key)

2/ you pass that PaymentIntent ID server-side and fetch it through a server-side roundtrip, on your server you would keep track of what Connect account this PaymentIntent was created on (like in a database table)