#stricks
1 messages · Page 1 of 1 (latest)
some context, I'm talking about this https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement
Hi, yes if you're looking to validate the CVV you'd need to pass this data.
should I use the cardElement that handles the CVV? Should the key be 'cvv'? on the data objects on this document it just says the optionals are:
name
address_line1
address_line2
address_city
address_state
address_zip
address_country
currency
Should I pass on the data an object like this:
{
name: credit_card.name,
cvv: credit_card.card_cvv
}
credit_card being the cardElements from stripe?
Hello! I'm taking over and catching up...
ok, thanks Rubeus
One thing I want to flag is that stripe.createToken with cards is a deprecated approach, and you should avoid building new things with it if possible.
That said, when using stripe.createToken with the Card Element, when you set the cardElement property to the Card Element you're using, the Token will be created using the card info in that Card Element (including the CVC).
thanks, so there is no need to pass any optional param for CVV in this case, passing any element from the cardElement as the first param (and enabling CVV verification on stripe dashboard) should be enough?
And what should be the updated way of creating the tokens?
Yep, that's correct. Our newer Payment Method API has replaced the Tokens API. You can read more about that here: https://stripe.com/docs/payments/payment-intents/migration
thanks, one last question. Is it possible to test the cvv verification on a test environment or this validation is just on live?