#redapse_docs
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/1369120756440498247
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! yes, that's what the error message mentions that elements.submit() must be called before stripe.confirmSetup()
Are you following the example code from our guide closely? Can you share your code snippets and what errors you're getting?
yeah I'm using that doc I sent
When I call elements.Submit(), and then call confirmSetup()
I get this error
We could not retrieve data from the specified Element.
Please make sure the Element you are attempting to use is still mounted.
does the setup intent need to be created after Submit() ?
that error isn't related to the timing of when the SetupIntent is created after the submit action.
The issue seems that it's not being able to retrieve the payment method data (like card details) from the Element to confirm the SetupIntent. Hence, it's asking you to make sure that the Element you are attempting to use is still mounted.
can you share your site or an example so that we can take a look?
I don't think it would be much help to you unfortunately; it's a blazor webassembly framework i'm building
nevertheless, is there any functions i can run to verify mounting etc
๐ค The element.mount method attaches your Element to the DOM : https://docs.stripe.com/js/element/mount. So i guess you can probably check if there's an iframe in the DOM element which you're mounting the Element in?
maybe try logging elements just before submiting too to see what it is
i was initializing twice due to an issue with the render order
thanks for your help
glad to hear you managed to figure things out!