#n0ah9080
1 messages ยท Page 1 of 1 (latest)
Hello there
Hey ๐ ๐
This card is to be used for an external account?
Yes! ^^
Gotcha! The recommended way is to create a Token using Stripe.JS (https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement) and then pass it to your server to create the external account: https://stripe.com/docs/api/external_account_cards/create
That way you don't have to handle any sensitive card data on your server
@loud flax
Okay I read a bunch ๐
I still cant wrap my head around how the CardElement is working (even after reading about it here: https://stripe.com/docs/js/element?type=cardElement)
I understand that the elements.create('payment'); creates and instance of the Payment Element that I can later use to tokenize... but I can't find how/where to input the credit card number in such element etc. ๐ค
Payment Element and Card Element are actually two separate types of Elements
You want to do var cardElement = elements.create('card');
And then you need to mount the Element
Basically cardElement.mount('#card-element');
That will render the Card Element in one of your divs
After that, when you call createToken() it will automatically grab the data out of the Card Element
Oh okay perfect! Just what I was looking for! ๐ฅฐ
Thanks a bunch! โ๏ธ