#Filip-Elements-Provider

1 messages ยท Page 1 of 1 (latest)

sick sleet
mystic lagoon
#

I intend to take the users card details at sign-up, and then have the flexibility to allow them to pay from relevant parts of the app

sick sleet
#

Hi there! You basically want to wrap any Components that will have Stripe Components within.

mystic lagoon
#

Oh - so are you saying I can have multiple <Element> components within my app?

#

I thought it's just one

sick sleet
#

Well you could use a Card Element and the Payment Request Button Element for instance.

#

So you can use multiple Stripe Elements, you would just use one <Element/> to set your Stripe Promise.

#

But the level just depends where you are using Payment Element for example.

mystic lagoon
#

Got it! So I should technically avoid wrapping the root of my app, and if possible, narrow it down to wrapping the parent component that would have the stripe elements contained within

#

While you are still here however, what happens if rather than just taking a payment, I only want to store the card details provided ?

sick sleet
#

It really is up to you for where you want to wrap it, as long as it is outside of any Stripe Components.

#

You can store card details via a SetupIntent

mystic lagoon
#

Which is the up-to-date version? ๐Ÿ˜„

sick sleet
#

Yours is the legacy version ๐Ÿ™‚

#

Charges/tokens are legacy, PaymentIntents/SetupIntents/PaymentMethods are new(er)

mystic lagoon
#

(Y)

#

Thanks for the help!