#Creamed - Connect API
1 messages · Page 1 of 1 (latest)
Hello! Yep, you can list Payment Methods on a Connected account. What version of stripe-node are you using?
8.132.0
I believe you want stripe.paymentMethods.list instead.
can I filter it by customer?
Something like this:
const paymentMethods = await stripe.paymentMethods.list({
customer: customerID,
type: 'card',
}, {
stripeAccount: connectedAccountID,
});
Oh yes I see it now
Here's the API reference link: https://stripe.com/docs/api/payment_methods/list#list_payment_methods
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What is the purpose of this ^?
Huh. I dunno! Let me find out...
It looks like one hits /v1/payment_methods and the other hits /v1/customers/:customer/payment_methods behind the scenes, but I don't believe there's any function difference between the two. Checking more though...
Ah, okay, the latter is newer and will eventually replace the former (but that won't happen for a while). The newer one is only in the latest client libraries, which is why you got an error when you tried to use it.