#clement2931

1 messages · Page 1 of 1 (latest)

magic juncoBOT
tawdry geyser
#

Hi, this API is a bit uncommon one and yes it expects a customer id

Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the List a Customer’s PaymentMethods API instead.

#

There are currently no way to list all Payment Methods of all customer

atomic mica
#

Ok, but it says that the customer parameter is optional

#

And it does return a response even without providing a customer id

#

It doesn't make sense that adding some filters would result in more results being returned, does it?

#

@tawdry geyser are you still here?

tawdry geyser
#

Yes, I know it says optional but it's an UI bug we needed to fix, sorry

#

(We have received similar asks in the past)

atomic mica
#

are you saying that the doc should say that the customer is a required parameter instead of optional?

tawdry geyser
#

a bit different. Requied means if you don't supply it, the API will error. Here it doesn't error but return an empty list. I know it's meaningless and that's something we will improve

atomic mica
#

I guess I don't see the point of making it optional, if the result is always an empty list when it's not provided?

tawdry geyser
#

Yes you are right. It's Doc issue. What are you trying to achieve? Do you want to get all Payment Methods regardless of customer id?

atomic mica
#

I'm trying to list all payment methods of all customers

tawdry geyser
#

Yeah you would need to go for each customer unfortunately. api.stripe.com/v1/customers/<customer_id>/payment_methods? is the recommended API. The other one is on a Treasury flow which is uncommon

atomic mica
#

Do they not return the same results?

#

Both endpoints?

tawdry geyser
#

Theoretically yes. But my advice is just don't use the Treasury one

atomic mica
#

that's scary when an API returns results only in theory. please update your documentation, it's extremely confusing.

tawdry geyser
#

Yes I will forward your feedback

atomic mica
#

thanks