Haven't tried doing this, but when something gets successfully charged, it puts their stripe_id in the subscription table for the user. I don't think there is any guarantee that they have a "valid" card though until you actually try to charge something.
Sep 1, 2017
4
Level 1
[Stripe] How do I check if a creditcard is attached?
Hi spark (or cashier) developers,
I am playing around with a Spark setup and Stripe and most of the stuff is working quite well. I can add an credit card as well as start subscriptions. However, I also want users to be able to pay single payments. If a credit card has been entered, the $user->charge(100); command works perfect. However, in my single payment view I would like to know if a user has any active credit cards so that I can display a message if they are not available. Is there a way of checking this?
Thanks in advance for your reply
Please or to participate in this conversation.