#church_connect-header
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1430310317459509329
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there,
are you talking about a Platform trying to retrieve the Stripe balance of a connected account?
Yes
Ok you would need the Retrieve Balance API https://docs.stripe.com/api/balance/balance_retrieve but need to add Stripe account ID of the connected account to the request header https://docs.stripe.com/api/connected-accounts
The docs said no parameters, and I also actually tried the following (in PHP):
try {
Stripe::setApiKey(Config::get('services.stripe.secret'));
Stripe::setApiVersion(Config::get('services.stripe.api_version'));
$account = Balance::retrieve(
[],
['stripe_account' => $connectID]
);
$stripeResult->success = true;
$stripeResult->stripeObject = $account;
} catch (ApiErrorException $e) {
$stripeResult = $this->processStripeException($e);
}
return $stripeResult;
But it looks like it still come back with the platform's balance, and not the Connect account
Do you have a request ID for me, where the balance did not show correctly?
Yes, it is req_o0ChHO7W7vKy7S. This is in test mode
Ok, let me check...
FYI, I am using Stripe API version: 2022-08-01. Not sure if that's too old
There seems to be an issue with your integration. When I look at your request it shows me that you are requesting the balance from your platform and not the connected account. I just tested this in my own account, and can see the request made by the platform on the connected account. That is missing in your request.
Okay, not sure how to use the PHP SDK to pass in the Stripe Connect account ID
The $connectID above is the customer's Connect ID: acct_1Ro5MLD1tYu2I7jw
I figured it out. AI lied to me.
It shoud be:
$account = Balance::retrieve(
['stripe_account' => $connectID]
);
NOT:
$account = Balance::retrieve(
[],
['stripe_account' => $connectID]
);
Good to hear you figured it out
Thanks for your help.
Always happy to help!
church_connect-header