Jonathon 255 Posted February 2, 2014 Report Share Posted February 2, 2014 Hi Larry, Just wondered if I could get your thoughts on the best way to offer a user to update a credit card with Stripe. I plan to let Stripe handle everything really. So I never touch or handle any credit card information. I'm going to be using subscriptions. Which is great using checkout, I let Checkout take the information, Stripe creates the customer and assigns them to my plan and bills them each interval. But how then would you suggest is the most user friendly way to allow someone to edit card details? Also, out of interest, what web hooks do you look for with your site or do you just send the whole webhook regardless what it is to yourself? Jonathon Quote Link to post Share on other sites
Larry 428 Posted February 3, 2014 Report Share Posted February 3, 2014 Hey Jonathon, glad you're enjoying Stripe! This is a common enough issue. What you'd do is take the new CC info using Stripe.js or Checkout. Then you'd retrieve the customer from Stripe: https://stripe.com/docs/api/php#retrieve_customer Then you'd do an update, providing the new token as the card value: https://stripe.com/docs/api/php#update_customer This replaces the existing card on file with the new card. As for the web hooks, if you create a web hook script, Stripe sends every event notification there. It's then up to you to decide which ones matter and which ones don't. For subscriptions, the invoice.payment_succeeded event is most meaningful. Quote Link to post Share on other sites
Jonathon 255 Posted February 3, 2014 Author Report Share Posted February 3, 2014 Thanks Larry Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.