Is there any method or parameter from stripe where I get the information every time when I get card details of the customer to identify this card is valid/Stop or not because in my case user added his card and after that, he stops his credit card then after he his able to do the payment.
I already check user card expiry detail(month/year) that I get from stripe API.
ExternalAccountCollection externalAccountCollection =
Customer.retrieve(user.getCustomer_id()).getSources().list(cardParams;
List<ExternalAccount> externalAccounts = new ArrayList<>();
externalAccounts.addAll(externalAccountCollection.getData());
Card card = (Card) externalAccounts.get(0);
I get below parameters from card object.
addressCity, addressCountry, addressLine1, addressLine1Check; addressLine2, addressState, addressZip, addressZipCheck, availablePayoutMethods brand country currency cvcCheck
defaultForCurrency dynamicLast4 Month Year fingerprint
funding last4 name recipient status tokenizationMethod