rest - Stripe API: What's my account ID? How to default it in GET /v1/accounts/? -


i'm beginning play stripe api, , i've hit don't understand:

how determine identifer (e.g., acct_abcd1234blablabla) of own stripe account?

i'm not seeing sort of account identifier in temporary stripe test account (although maybe i'm not looking under proper tab of account settings pane).

now, documentation "retrieve account" says:

arguments
account [optional]
identifier of account retrieved. if none provided, default account of api key.

and seems omitting account identifier uri would be reasonable way of getting one's own account identifier, since should property of returned json object. can't figure out how omit argument in way causes account object returned.

given example invocation, explicit account identfier argument, looks like:

curl https://api.stripe.com/v1/accounts/acct_abcd1234blablabla -u sk_test_foobarbaz:

my expectation omitting final element of uri me default. if that:

curl https://api.stripe.com/v1/accounts/ -u sk_test_foobarbaz:

i get:

{   "error": {     "type": "invalid_request_error",     "message": "unrecognized request url (get: /v1/accounts/). please see https://stripe.com/docs or can @ https://support.stripe.com/."       } } 

of course, if silly omit trailing slash well:

curl https://api.stripe.com/v1/accounts -u sk_test_foobarbaz:

i get, understandably enough, (empty) list of connected accounts, not i'm after:

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

so, missing here?

  • what's right way specify "use default" in get /v1/accounts/?
  • or, alternatively, how find account identifier via stripe account dashboard?

(parenthetically, i'll note api examples show me valid account identifier corresponding private key show me, , of may somehow magically coordinated dashboard session, shows me same private key. hardly seems right way obtain one's own account identifier in real application.)

if call retrieve account api without parameter give details own account. if want in curl, you'd hit /v1/account without s @ end:

curl https://api.stripe.com/v1/account -u sk_test_foobar: 

this sdks do. can see php sdk here:

public function instanceurl() {     if ($this['id'] === null) {         return '/v1/account';     } else {         return parent::instanceurl();     } } 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -