#Zesh-payment-methods
1 messages · Page 1 of 1 (latest)
Hello! Just to make sure I have this right - you have a Payment Method ID and you're asking how to check which customer it's attached to?
I want to extract all customer_ids paired with their default payment_method_id. I want to fill an SQL table with those relations for all of our customers.
So you just want to retrieve all your customers and their default payment methods?
Yes.
Gotcha - so you can just list all your customers (https://stripe.com/docs/api/customers/list?event_types-payment_intent.payment_failed) and then check invoice_settings.default_payment_method to grab the default Payment Method ID for each one (https://stripe.com/docs/api/customers/object?event_types-payment_intent.payment_failed#customer_object-invoice_settings-default_payment_method)