#afonso

1 messages · Page 1 of 1 (latest)

wispy ingotBOT
tall sapphire
#

I'm doing the following to update the value

#
                this.stripe.elements.update({
                    amount: this.price * 100,
                    mode: this.isSubscription ? 'subscription' : 'payment'
                })
```
warm lance
#

Hi there, can you show me the how you create the payment request?

tall sapphire
#

I'm using the new flow

#
            const elements = stripe.elements({ 
                mode: 'setup', 
                currency: 'usd', 
                paymentMethodCreation: 'manual'
            });
#

But on the UI shows $0, even after I update with correct price.

#

Do I need to mount the element again?

#

Or should it just work?

warm lance
#

How did you update the amount?

tall sapphire
#

I just showed you

warm lance
#

Sorry I missed that part

#

Hmm, wait you are using setup mode?

tall sapphire
#

In the beginning yes

#

But shouldn't matter because then I update it right?

#

My flow is that the payment element is rendered, and then the user decides which plan he wants (if a one-time or subscription).

#

Ah nevermind, I think my code is just wrong.

#

Sorry to bother you 😓

#

Yeah just fixed, I wasn't triggering the update properly.

#

Can close.