Help Regarding Stripe Checkout Session with Connected Account

Hello,

I am a Wappler Pro User using Wappler 4 beta 13.

I have been using Wappler and is simply amazing & user friendly.

I am facing an issue with the Stripe while using it through Wappler. I have used the stripe create checkout session and it works fine but when I try to add the connected account(with the payment intent info) in the advanced options, I get an error message on the stripe checkout page:
“Something went wrong
The specified Checkout Session could not be found. This error is usually caused by using the wrong API key. Please make sure the API keys used to initialize Stripe.js and create the Checkout Session are test mode keys from the same account.”

I spoke to the stripe support and identified that the URL that is logged in the Stripe Developer Logs is different from the link that is redirected with Wappler stripe.checkout(). When I open the URL(directly in the browser) copied from the Stripe Log, it seems to be working fine. I am getting the above error while Wappler is creating and checking out the session.

Kindly let me know if there is an issue or a step that I am missing.

Please Note:

  1. The Checkout session is working fine without any issue while there is no connected account mentioned.
  2. When the connected account is added in the advanced options with the payment intent, the stripe log shows the execution was successful. The only challenge is that Wappler is redirecting the app to the wrong stripe checkout page which is giving me an error.

Hoping for a quick response

Which Stripe documentation page(s) are you following?

https://stripe.com/docs/connect/standard-accounts
https://stripe.com/docs/connect/direct-charges

I’ve worked on Stripe for 2 months only so not an expert, this part is confusing.
Can you share screenshots of both areas or modules containing your URLs and test keys?


Client Side Properties


Server Side Properties


Error on stripe page while using stripe.checkout()

I am facing this issue only if I am filling the connected account and payment intent properties on the server-side. Without the connected account and payment intent properties, it is working fine.

The link that is redirected by Wappler to the Stripe page is different from the link from the Stripe logs.

Above, I think you need to use the Payment Url too. Use same “url api action” as that of Session Url.

Above, you need a real success url with I believe a {session_ID} appended to it.
Much like:

https://example.com/success?session_id={CHECKOUT_SESSION_ID}

But, regardless, the use of checkout session confuses me here since the direct-charges Doc your shared does not instruct to use such session.create, but rather paymentIntent.create.

Don’t you need to follow this instead? https://stripe.com/docs/payments/save-and-reuse

1 Like