#Tom Catchesides
1 messages · Page 1 of 1 (latest)
Hi there, you can check the account's capabilities list (https://stripe.com/docs/api/accounts/object#account_object-capabilities) and see what payment capabilities are active
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks @royal gyro ! Is it possible to do this without using Connect?
You can use this API to retrieve your own account object, if that's what you ask.
Thanks, @royal gyro . Using the Stripe PHP library, I've just tried calling $stripe->accounts->all(); for an account I'm using to test my work and the result doesn't seem to contain any accounts:
object(Stripe\Collection)#637 (4) { ["object"]=> string(4) "list" ["data"]=> array(0) { } ["has_more"]=> bool(false) ["url"]=> string(12) "/v1/accounts" }
https://stripe.com/docs/api/accounts/retrieve#retrieve_account you can just call retrieve account API and pass your Stripe account ID to get your own account.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thanks, @royal gyro . Apologies if I'm asking something very basic, but as a platform we've been able to do everything we need by using a user's secret and public API keys. If all we have is those keys, which API call do we use to fetch the account's ID? (that's what I was trying to do with $stripe->accounts->all(); )
Just to be clear, do you intent to retrieve your own account, or a list of your connected account?
As a platform, I would like to use a user's API key to retrieve their account ID.
If the user's API key means the connected account's API key, you shouldn't do that.
You should always use your own API key, and specify a Stripe-Account ID to make API requests on behalf of a connected account. https://stripe.com/docs/connect/authentication
OK, thanks Jack: we're not using Connect, so I think that means that we can't do this.