#flyingace68
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Can you clarify what it is you are attempting to do?
What APIs are you using, what are they returning?
And thee cards are intended to fail when making a payment. Are you attempting to charge them?
I'm attempting to submit a credit card for approval but not for payment. I need to generate a token for the card. I'm using stripe.createToken and the docs indicate that I should get a promise that returns either result.token or result.error. I want to be able to see the shape of the errors I might get. How can I do this?
The Token API is not the recommended path for saving payment methods at this time. We recommend using Setup Intents https://stripe.com/docs/payments/setup-intents
Right. We're not going to be using the Payment Intents API at the moment because we're moving from a legacy system that still uses it.
Hello? So does this mean that there's no way to simulate errors for stripe.createToken?
๐ hopping in since snufkin had to head out
sorry for the wait
There's no way to "validate" a card is valid or not just be creating a token - you'd have to attach it to a customer or use it in a charge for the validation to actually happen
So then what situations can result in stripe.createToken returning result.error?
I believe it'd fail if you pass a card that wouln't pass the luhn check
luhn check?
Yeah - it's just making sure the card number is a valid format