#Thorkell
1 messages · Page 1 of 1 (latest)
howdy, can you share more details about this, and if there's an implementation i can see online?
For sure, I made the repo public just for this haha. Give me one sec to type up my issue 💪
So, I have the embedded Stripe pricing table as part of a Chakra UI based multi-step on-boarding form that requires users to navigate away to sign up for their preferred plan before being redirected back to the next step.
My problem is that is has started refusing to pass the step that has the pricing table onto the next step.
The logic that is supposed to be handling it on the backend is the stripe_controller.rb file:
And on the front-end it's a mix of files in the /OnboardingPage that are nested in a private route component:
https://github.com/Distilled-Platform/app.getdistilled.io/
There's a few issues I've noticed when working with this. First, when I first create a subscription, I run into this error in the logs:
Feb 7 04:26:25 PM E, [2023-02-07T21:26:25.471258 #70] ERROR -- : [af913f30-2f7c-4395-9851-7d6e8ba982d4] Stripe customer failed to save after multiple retries
Which is a debugging error I made myself, but a big thing I noticed in the past was this:
Feb 7 04:45:22 PM [d4483de5-1359-43d6-b96e-8a6d06dcc381]```
Although when I dove into the database, I noticed that the Workspace did in fact exist, but there was no `stripe_product` association created. Only when I made a subsequent subscription via the pricing page would that association be made, thereby fufilling the redirect and continuing onboarding.
Lastly, another error I noticed in the browser was a CORs issue that could be related:
```Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://js.stripe.com’) does not match the recipient window’s origin (‘https://app.getdistilled.io’).
Contribute to Distilled-Platform/api.getdistilled.io development by creating an account on GitHub.
https://app-getdistilled-io.onrender.com. Contribute to Distilled-Platform/app.getdistilled.io development by creating an account on GitHub.
Also love your profile aesthetic 😎 . I'm listening to a future funk artist called Yung Bae rn
I need to step away, but @fierce berry is here to help too. I'm not sure whether this is Stripe-specific or an issue within the non-Stripe parts of your integration. It's possible there's an underlying Stripe error we can help with though.
For example this:
Stripe customer failed to save after multiple retries
Are you seeing errors related to the Stripe Customer API you can share? Do you have any example request IDs hitting errors?
Check your developer logs here: https://dashboard.stripe.com/test/logs/ and provide anyreq_123IDs hitting errors you don't understand
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'm not seeing any errors on the customer API, in fact I'm getting a 200 OK on everything. That's what makes me think this is some kind of race condition. Because when I run through the process the first time, it creates the workspace fine, but it doesn't associate stripe_product a second time until the follow up subscription.
I have a loom for context but there was no was to do it without sensitive info
I don't think we're going to be able to assist much on this one, since it's not a Stripe-specific error and we're a little limited about how much we can debug on other technologies/platforms