#crenon-payment-methods
1 messages ยท Page 1 of 1 (latest)
thanks!
I'm hoping to get a list of payment methods of type "card" so that I can check them for upcoming expirations and sent notifications to the cardholders
here's the code that's returning a blank array:
'type' => 'card',
]); ```
any ideas much appreciated
The payment methods are stored under the Customer object
To obtain the stored card of a customer, list a customer's payment methods API should be used: https://stripe.com/docs/api/payment_methods/customer_list?lang=php
ah, so maybe there's no way to list all the payment methods, platform-wide?
i was trying to use this:
do you know if there's a better way to get all the stored cards that are expiring soon? I'm trying to notify customers so they can update their cards before their recurring payments occur
ive explored using the webhook customer.source.expiring but it's not triggerable through the CLI so testing it seems like a beast
Listing all payment methods platform wide is not supported. To retrieve all payment methods, you'll first retrieve the list the customers and retrieve their payment methods
customer.source.expiring is legacy and it's not supported in PaymentMethod object
ok gotcha, thank you!
i'll work on retrieving the customers and then their methods.
thanks for your help!
No problem! Happy to help ๐