#richie138-last4

1 messages ยท Page 1 of 1 (latest)

craggy sinew
brave plank
#

If the limit is 100, how can i hope to find the right card out of thousands?

craggy sinew
#

You would want to use Pagination

#

The easiest way is auto-pagination

brave plank
#

Hmm it seems to be returning nothing

#

$cards = $stripe->paymentMethods->all(['type' => 'card','limit' => 100]);

#

{
"object": "list",
"data": [],
"has_more": false,
"url": "/v1/payment_methods"
}

craggy sinew
#

Double-checked you should have PaymentMethod in your account? Test/Live mode?

brave plank
#

Live mode

craggy sinew
#

You can confirm in your Dashboard

brave plank
#

Certainly have hundreds of active customers

craggy sinew
#

Oh sorry, I think this API expects a Customer Id

brave plank
#

It's optional though which is odd then

craggy sinew
#

Yeah admit that it's odd

#

Let me report internally about this, but I also can confirm that it returns nothing without specifying Customer Id, but as soon as I pass some Customer it started returns result

#

hmm

#

I am sorry there is no efficient way to do this. You definitely can 1. List all customer 2. For each customer list all PaymentMethod 3. Filter the result on its last4. But that is very inefficient and can make your call rate-limited, so I can't recommend

#

I will conduct an investigation for the List PaymentMethod above

brave plank
#

Would be great to be able to mirror certain things that are possible in the dashboard

#

This last4 is a good example

#

Another is finding a customer by email address (case INSENSITIVE!)

#

Not sure how to get Stripe to take these things seriously ๐Ÿ˜ฆ

craggy sinew
#

File support request to Support and it would be well recorded ๐Ÿ™‚

brave plank
#

I've now sent an email

#

When will you let me know about the investigation?

craggy sinew
#

I filled the task internally. Can you give me the email you just used? Will link in there