#JosePersichini
1 messages · Page 1 of 1 (latest)
Hi there
This mostly depends on the integration you are using.
Are you following a particular guide?
Yes
I'm creating a ClientSecret on backend (.NET) and a <PaymentElement> on frontend (react)
With setup intents
Ah okay so you are saving payment methods to take payment at a later date?
Exactly
Got it. In that case you want to pass the PaymentMethod ID to your backend and retrieve it using https://stripe.com/docs/api/payment_methods/customer
Then you can see info like last4 + expiration
You won't have access to stuff like the full PAN or the CVC as that is sensitive info that we handle for you.
Yes, I know
I don't want to store the PAN and the CVV
I just only want to tell Stripe to validate that data during the payment method creation
I was using what you said
But (in live mode) if I try to create a payment method filling the data with a valid CC number + an invalid CVV + an invalid exp date Stripe saves the Payment Method
If you are using a SetupIntent then we already performed the validation
Sure so a couple things here.
And Stripe is saving the Payment Methods without any problem
First, it is up to the issuer whether they care about this "incorrect data". We generally perform a card authorization with the issuer when you confirm a SetupIntent and then the issuer tells us whether it is valid or whether they decline this authorization. We just pass along that result to you.
Second, we don't actually perform this validation every single time. We talk about this here: https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge but basically you have probably started to look like a card tester based on doing a lot of test attempts in live mode which is technically against the card network regulations as well (see: https://stripe.com/docs/testing#use-test-cards) and we strongly do not recommend.
Ok, I see
So there is no way to check if the CC information is valid on EVERY creation of a payment method right?
Correct.