#pxrxnoid - card element

1 messages · Page 1 of 1 (latest)

misty steeple
#

Hi there. You should be able to use stripe.js

mental glacier
#

yep, i got it, but don't get what to do after loadStripe

jade patrol
#

I've also tried to do it for intent based implementation via stripe-js but it din't work.

misty steeple
#

@mental glacier Well what is your end goal? Have you tried looking at some of our integration guides with stripe.js?

mental glacier
#

yep, looked at it, it says i have to write something like
const stripe = Stripe(key); const elements = stripe.elements(), but I can't get reference for Stripe()

End goal just to create card element to pass card info into it and store it as future payment method on backend

misty steeple
#
const stripe = await loadStripe('pk_123');```
#

That's how you'd set it up

#

With loadStripe you don't need const stripe = Stripe(key);

mental glacier
misty steeple
#

const elements = stripe.elements()

#

Same way

#

But you can try using the wrapper above

#

It's easier

mental glacier