Reputation: 2415
I have an application which uses Stripe. Stripe stores credit card information for every customer. Some of these cards are already expired and not valid anymore.
How can I go through all customers and validate their credit cards (if they are still valid or not)?
Upvotes: 12
Views: 8977
Reputation: 481
From Stripe documentation
In many cases, Stripe will automatically update the cards: https://stripe.com/blog/smarter-saved-cards.
Otherwise, there is no way of checking that a saved card is still valid short of trying to charge it. But you should not try to create charges just to test if a card is still valid -- the credit card networks rules and Stripe's own ToS forbid from creating charges that are not for the actual selling of a good or service.
Although you can always test the card without charging using the "save card" function
More here - https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge
Upvotes: 0
Reputation: 17533
In many cases, Stripe will automatically update the cards: https://stripe.com/blog/smarter-saved-cards.
Otherwise, there is no way of checking that a saved card is still valid short of trying to charge it. But you should not try to create charges just to test if a card is still valid -- the credit card networks rules and Stripe's own ToS forbid from creating charges that are not for the actual selling of a good or service.
Upvotes: 16