cartalyst / stripe-laravel

Cartalyst Stripe package integration for Laravel.
BSD 3-Clause "New" or "Revised" License
335 stars 58 forks source link

Updating a connected account #27

Closed kezern closed 7 years ago

kezern commented 7 years ago

I have created a connected account setting managed attribute to true. I can see It información my connected accounts list but stripe says i have to verify it using API. How can I do that? Reading documentation i have found how to update charges. But not about accounts.

brunogaspar commented 7 years ago
$accountId = 'the-account-id-here';

$verificationFile = __DIR__.'/path-to-some-file.jpg';

Stripe::account()->verify($accountId, $verificationFile, 'identity_document');

Hope it helps.

kezern commented 7 years ago

Thanks, one more question. I have to enter both sides of the id card. Only one image is entered in the example. How do I put the other one? Thank you

brunogaspar commented 7 years ago

I can be wrong, but as far as i know, Stripe only allows one file to be sent for account verification.

Our verify method is just a simple easy way to perform this action.

If a more custom request needs to be done, you'll can mimic what we're doing here and perform the file upload yourself using the API and then perform the account update.

kezern commented 7 years ago

Thanks! That works!! Is there any doc where I can find this functions? I couldnt find the verify function. Now I need to accept terms for that account and I don't know how to do that.

brunogaspar commented 7 years ago

Is there any doc where I can find this functions? I couldnt find the verify function.

It's not documented, only if you look into the source code at this moment :)

Now I need to accept terms for that account and I don't know how to do that.

You'll need to perform an update on that account and pass an array with:

Stripe::account()->update('account-id-here', [
    'tos_acceptance' => [
        'date' => 1504735739,
        'ip => '8.8.8.8',
    ],
]);

To find update parameters you can pass, it's always good to check the Official Stripe API documentation, for your case it's here.

Hope it helps.

kezern commented 7 years ago

Thank you very much! Now I have to add external account to this account. I will try by my self.

Thanks again!