#w0lf_subscriptions-deferred

1 messages ยท Page 1 of 1 (latest)

shadow fogBOT
#

๐Ÿ‘‹ 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/1303740686993985537

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

winter lodge
dawn waspBOT
lofty lynx
#

Hi there ๐Ÿ‘‹ the Subscription tab in that guide is the correct guide to follow for setting up a deferred intents integration for subscriptions. It shows how to initialize Elements without a client secret.

Can you elaborate on what isn't working? Are you encountering some sort of error?

winter lodge
#

Well this is what Im getting without client secret, no error

lofty lynx
#

What code are you running to get to that point? Do you see anything in the browser console when you run it, either warnings or errors?

winter lodge
#

Im using Flutter web with webview thats rendered inside the dialog only for stripe

shadow fogBOT
#

w0lf_subscriptions-deferred

winter lodge
#

Nothing in the console as well - before when it was working I had the http warning

lofty lynx
#

I'm not familiar with building this in Flutter, since we don't have direct first-party support that framework. Are you using our packages for that somehow?

winter lodge
#

We are using stripe API calls via firebase functions and for front end just simple html + js for stripe, everything else is flutter

#

And communication between JS side and Dart (Flutter) side is done via html postMessages

lofty lynx
#

Do you have a public test page where I can see your flow?

winter lodge
#

Unfortunately no

#

Basically what Im trying to do is use the correct customer information on invoice - right now it shows "guest"
We firstly create a customer via firebase functions, we then create a subscription upon clicking on a product, then we pass client secret to JS side and render the payment element. Upon filling up the form and submitting we firstly update customer with the filled in data and then we confirm payment

#

But the customer inside subscription is not being updated - it uses the customer info pre customer update

lofty lynx
#

Correct, because by the time you have a Payment Intent client secret the Invoice is finalized and won't update customer details. You need to set those details correctly before the Invoice is finalized, which happens immediately for the first Invoice if you're creating Subscriptions.

winter lodge
#

Yes exactly - thats when I discovered the deferred payments

#

But without providing the client secret the UI is not rendered

lofty lynx
#

Without an understanding of what errors are being thrown, or being able to see the site to try to find those errors myself, I don't know what is going wrong and can't really offer information about what needs to change.

#

Are you sure amount is being set to a non-zero value?

winter lodge
#

I can give you logs from console - there isnt anything stripe related

#

yes amount is set correctly - 3999 based on selected product

lofty lynx
#

If our Payment Element can't render due to an integration issue, then we will surface an integration error, though if your code is catching that it may not be raised all the way to the browser console.

winter lodge
#

Well I cant see any logs, literally nothing related to stripe

#

dom.dart:184 Height of Platform View type: [payment-dialog-view] may not be set. Defaulting to height: 100%.
Set style.height to any appropriate value to stop this message.

This is the only thing that pops up but we had that before when it was working

lofty lynx
#

Then maybe the problem isn't with Stripe? It's hard for me to think of every possible thing that could go wrong in a framework I'm not familiar with. I'd suggest adding logging to your code to better track exactly which parts of it run, to try to figure out whether it's crashing/erroring at some point or if it's all running successfully.

winter lodge
#

Ill keep looking around, thanks for the help

#

Update: Well looks like Ive got it working, had to use setState and somehow emulate a future delay before loading the html part