#Sergey Glazyrin-create-token

1 messages · Page 1 of 1 (latest)

spring jungle
#

Hey there 👋 apologies for the delay! So are you receiving an error with what you're trying currently?

stone halo
#

You must provide a Stripe Element or a valid token type to create a Token.

#

this is for the code:
const stripe = Stripe(environment.stripe);
stripe.createToken(card,
(response: any) => {
console.log('response', response);
if (response.error) {
reject(response.error);
} else {
resolve(response);
}
});

#

and I understand that I need to migrate properly to the new approach, but new js library works with Stripe elements. It's complicated for me. Is there a way to create a token using js and raw data: hashmap with details {cvc: , etc, etc}

spring jungle
#

Apologies, I'll need to do a bit of digging as this process isn't typically used (because I believe you handing raw card information shifts the PCI compliance requirements onto you)

stone halo
#

so, do you suggest to start using element approach ?

#

ok, will do