1

I am working on a web app where I have user's stripe customer id. I have checked the docs and found that when we stores users card on stripe, stripe checks if it is valid and working for that time.

On the other hand when payment is made we can check it out if card is valid and working by the response from the stripe.

But in my case I have a flow where I payment is going to complete after the appointment is completed and I have to check if the card is working and valid before creating an appointment in database. If card is working we will create an appointment and if not then we will ask to user to add new card as previous is not working and after successful card addition we will proceed.

ali sufyan
  • 13
  • 3

1 Answers1

0

Unfortunately, there is no way to re-validate a card that is already attached to a Customer.

If you really want to validate a card again, you would need to create a new PaymentMethod with the same card and attach it to the Customer.

alex
  • 1,923
  • 11
  • 9
  • I already have stripe customer id and it was verified when user entered credit card information. How can I make sure that the credit card attached to my customer is still valid? – ali sufyan Sep 08 '21 at 12:33
  • Updated the answer to address the clarification provided. – alex Sep 09 '21 at 03:19
  • Then in that case I have to get the customer card num and data which is not available.... then how can i do that with only stripe_custumer_id? – ali sufyan Sep 10 '21 at 11:13
  • Sorry, I should have been more clear. You would need to bring the Customer back on session to fill up all of their details in Stripe Elements again in order to create a new PaymentMethod and attach it to the Customer - this really isn't really a feasible method. In short, it just isn't possible/feasible to re-validate a card – alex Sep 12 '21 at 13:35