#neil3rd-list-customers
1 messages ยท Page 1 of 1 (latest)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and uses this >>> list.data[0].name
That will get you the first entry in the list, yes
So this is correct code >>> list = (stripe.Customer.list(api_key=stripe.api_key)) cus = list.data[0].name
?
Which library are you using?
Sure, that'll work
ok, so how will Stripe know what 'acct_xxx' I am intending to get list of 'cus_xxx'?
Stripe Connect*
Ah, ok. Didn't realise you were using Connect! My bad
You'll pass the stripe_account parameter: https://stripe.com/docs/api/connected_accounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
code like this >>> stripe_account="acct_xxx" list = (stripe.Customer.list(acctid=stripe_account, api_key=stripe.api_key)) cus = list.data[0].name
like this, right?
No, stripe.Customer.list(stripe_account=stripe_account, api_key=stripe.api_key
may I ask what's happening in this >>> stripe_account=stripe_account
why mirror the words "stripe_account" at both ends?
How is Python understanding this?
stripe_account is the parameter the library expects and also the name of your variable
Np!