#Filip-npm-install
1 messages ยท Page 1 of 1 (latest)
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?
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?
Card Element includes expiry, CVC, and Postal Code
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 />?
Hrmm I'm not very familiar with Next.js. Let me check on that
Or it could be React in this case, same thing ๐
Yeah it would be <CardElement />
You can see the React JS Elements here: https://stripe.com/docs/stripe-js/react#available-element-components
Got it! Cheers!
๐
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?
I've implemented this in React (PaymentElement) - I can show you my code, if you like
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
yep. KK.
@sacred harness take a look at https://stripe.com/docs/stripe-js/react for how to wrap the components like I mentioned above.
We also have a React guide for Card Element in our docs here: https://stripe.com/docs/payments/accept-card-payments?platform=web&ui=elements#set-up-stripe-elements