#andrea-skuola-customers

1 messages ยท Page 1 of 1 (latest)

quaint marten
#

๐Ÿ‘‹ happy to help

#

unfortunately no, live data and test data cannot be copied

#

from one environment to the other

odd ermine
#

can you tell me if via API can you retrieve payment methods of this customer? cus_LcbJZfIcE0Twhr

quaint marten
#

hi, yes you actually can

odd ermine
#

i know I can, but i have problems only for this customer, so I wanted to know if you could do this test for me

keen laurel
#

do what exactly?

odd ermine
#

if you can list via API all payment methods of this user cus_LPmUKlK4Hdzggq

keen laurel
#

this is an anonymous public channel so I don't think that's what we'd do here

#

you can list them in the API yourself, or view them in the dashboard, this is all something you can self-serve. Let me know if you have any coding/development questions as a developer in implementing that, that's the kind of question we answer here!

odd ermine
#

I'm retrieving all payment methods of a customer. If I do
$stripe->customers->allPaymentMethods(
stripe_id,
['type' => 'card']
);
it returns me only 9 records, but in the dashbord (via browser) if I go to user payment methods I see more than 30 methods

#

I expected to receive the same number of records, do you agree?

#

why i'm getting less records?

keen laurel
#

you have to paginate in the API to get more than the first 10 results of a list.

odd ermine
#

ok, so if I take fingerprint of cards like this:
$cards = $stripe->paymentMethods->all([
'customer' => $userStripeId,
'type' => 'card'
]);
foreach ($cards->data as $card) {
$fingerprint = $card->card['fingerprint'];
[......]
}

#

i need to transform the foreach like this?
foreach ($cards->autoPagingIterator() as $card) {
$fingerprint = $card->card['fingerprint'];
[......]
}

keen laurel
#

yep, I think so