#Kais
1 messages ยท Page 1 of 1 (latest)
Hi, yes - in test mode, things will work find even with those warning.
Alright. Another question. When a user has completed the onboarding process he gets redirected back to a website which checks if the user has successfully walked through the onboarding phase using PHP. I'm using the StripeClient package for this. When i try to retrieve the account using his id and check for details submitted i always get a false. Is this also normal in test mode or am i doing it wrong?
$stripe = new StripeClient('token');
$account = $stripe->accounts->retrieve(
$user->stripe_id,
[]
);
if($account->details_submitted){
$linkedBankAccount = true;
} else {
$linkedBankAccount = false;
}
Digged a little deeper. Seems like charges_enabled = true but payouts_enabled = false. Is this also due to it being a test account?
well it depends on the requirements hash
fetch the Account object
and look at the requirements hash
you should see details being required under currently_due or eventually_due hash
meaning more onboarding details are required from the connected accounts
I assume you never connected an external bank account for payouts to the Connect account?
Both hashes has an array with external_account inside of it. I have never connected an bank account and instead used the test bank account from Stripe
but what does the requirements hash have
you can paste the full hash
here, (redact any personal details) but that will tell me what is missing
Alright give me a minut to check for personal details
typically the requirements hash shouldn't have any personal details
Ah alright i will send that then
"requirements": Object {
"alternatives": Array [],
"current_deadline": null,
"currently_due": Array [
"external_account",
],
"disabled_reason": "requirements.past_due",
"errors": Array [],
"eventually_due": Array [
"external_account",
],
"past_due": Array [
"external_account",
],
"pending_verification": Array [],
},
"external_account",
],```
that is the missing requireemnt
that is why payouts_enabled: false
you never attached an external bank account to this account
Ah my bad. I thought on live mode the bank account is requested with https://stripe.com/docs/api/account_links/create?lang=php. What is the best way to attach an external bank to the 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.
what type of Connect account is this? Custom? Express?
custom
yeah then you need to call the update Account endpoint to update with a test external account
grabbing you the link
these are the test IBANs or account numbers etc: https://stripe.com/docs/connect/testing#account-numbers
that you can use in test mode to onboard an account with an external account
Let me take a look at the endpoint real quick
So just to verify. The request should be something like
$stripe->accounts->update(
'ACCOUNT ID',
['external_account' => ['object' => 'bank_account', 'country' => 'NL', 'currency' => 'EUR', 'account_number' => 'IBAN or some other test account number']]
That should work, yes
Alright i will try it out. Thanks again so much for the help boys! Really appreciate it ๐