#theglobe - Card Expiration
1 messages ยท Page 1 of 1 (latest)
Hi how are you?
I don't know about from the site but you can look up a customer's payment methods via the API and check the expiration dates
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am new to APIs, last week someone from here helped me to create the customer portal (which made my life a lot easier). How would I be able to look up only the expiration date, please?
Okay the only other way I can think of besides using the APIs is to review each of your Customers manually in the Dashboard. You can see the Expires date for each Payment Method saved to them.
I have over 3.000 users. Would be a lot of work to do that. I will check the API documentation again and try to find out how use it.
In that case I would recommend looping over each Customer, retrieving their Payment Methods, and checking the exipration dates in a scripted approach. Are you currently using PHP for your WordPress site?
yes, php
Okay and are you using Stripe's PHP library?
Yes, I am
Okay then you should be able to copy/paste some of the PHP code examples in our reference docs and try out using the APIs to get your information.
So my recommended approach is to
- Loop through customers: https://stripe.com/docs/api/customers/list?lang=php
- Loop through customer payment methods: https://stripe.com/docs/api/customers/list?lang=php
- Send email where Expiration Date is next month or earlier.
Perfect. I will take a look at it. Thank you so much for your help today.