#IGMontero

1 messages · Page 1 of 1 (latest)

twin cloakBOT
sly flicker
#

Hi there!

#

Are you following a Stripe guide? If so, can you share the link?

high nexus
sly flicker
#

Thanks! Can you share more of your code, inclusing how you create the Element?

high nexus
#

My app is wrapped in an <Elements> component configured like this:

#

Then, in the component I want to use the Payment element, I do this

#

not sure if this is enough info. Basically I set up the payments element at the top and just render it

#

All of this is wrapped in <Elements> component I sent you above. I wonder if that's the problem

sly flicker
#

So you are trying to use the defeered intent with React and subscriptions. Give me a few minutes to look into this.

high nexus
#

Okay thanks. Just to be clear, my intention is to replace my old credit card form with the payments element which looks very cool. Then manage everything else manually as I was

sly flicker
#

The documentation shows this code for React:

high nexus
#

Right. But my app is already wrapped in an <Elements> component

#

Then I collect payment info and use them for different subscriptions (so the amount variable varies)

#

I can't use the elements component with a set amount

#

My current setup is like this. I'm able to use card elements separately to capture payment info from the client. My intention is to use the PaymenElement instead

pulsar aurora
#

Hi there 👋 jumping in as my teammate needs to step away soon. I believe you're able to update the amount field as the amount of the first payment for the Subscription changes.
https://stripe.com/docs/js/elements_object/update#elements_update-options-amount

My understanding is the amount variable there is largely used for populating amounts in wallet based payment methods like for Google or Apple Pay.

Would you be able to set amount to an arbitrary value and then update it accordingly as your customer progresses through your flow?

high nexus
#

So in that case I shouldn't give other options to the PaymentElement component?

#

Okay now with this setup I got a new errror: No valid payment method types for this configuration. Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard

#

Looks like I have to set that up in Stripe dashboard

#

Just turned them on but I'm still getting that same error

pulsar aurora
#

Try raising the amount, right now the amount you have set is below our minimum threshold for processing a payment. Can you try setting that amount to at least 100?

high nexus
#

Okay that works!

#

Thank you very much. I'll continue by myself and ask if I need anything. Thanks for your help!

pulsar aurora
#

Any time!