#thecoderhero
1 messages · Page 1 of 1 (latest)
👋 Not sure I fully grasp the question, can you elaborate?
What "sources" are you referring to?
I am pulling PaymentMethod from the Customer object. We have MANY old customers that have a Source for their payment method.
Here is a sample of our code:
public static List<PaymentMethod> getStripePaymentMethodsByStripeCustomerId(String stripeCustomerId)
throws StripeException {
Map<String, Object> params = new HashMap<>();
params.put("customer", stripeCustomerId);
return PaymentMethod.list(params).getData();
}
Does this get only PaymentMethods or does it return all payment methods including Source Objects?
AFAIK I think it only lists PaymentMethod pm_xx objects.
Have you tested it already? If not, running a quick test can confirm the expected result