#Filip-npm-install

1 messages ยท Page 1 of 1 (latest)

mint ore
#

Hi there! No, you should just need to npm install Stripe and you should have access to all Elements. Are you running into an error or issue?

sacred harness
#

No, not really - I'm about to give it a go. I do have a question however

#

What's the difference between the card element and any of the other ones like expiry date, cad number

#

does the card include all of them?

mint ore
#

Card Element includes expiry, CVC, and Postal Code

sacred harness
#

I'm also not sure how to use it withing a Next.js render method. Would const cardElement = elements.create('card'); have to be initialised as: <Card />?

mint ore
#

Hrmm I'm not very familiar with Next.js. Let me check on that

sacred harness
#

Or it could be React in this case, same thing ๐Ÿ˜‰

mint ore
#

Yeah it would be <CardElement />

sacred harness
#

Got it! Cheers!

mint ore
#

๐Ÿ‘

sacred harness
#

I'm back.

#

I've just implemented it, I get no error, but no element is showing. Is this expected?

#

Do I need to style it?

soft dome
#

I've implemented this in React (PaymentElement) - I can show you my code, if you like

mint ore
#

You should not need to style it. Did you wrap that component within Elements and pass your Stripe promise as a stripe prop for Elements?

#

Thanks @soft dome! It sounds like they are interested in Card Element which will be slightly different

soft dome
#

yep. KK.

mint ore