When any user need to deposit amount into another users account then amount is debited from the user but not credited into another account.
We need to verify stripe user account. using below legal_entity.
- address
- postal_code
- ssn_last_4
- personal_id_number
- identity_document
and for check the status is verified or not we need to fetch account details as below:
<?php \Stripe\Stripe::setApiKey('stripe_test_secret_key'); $account = \Stripe\Account::retrieve('stripe_account'); //from here we can check the status if status is unverified then we have to add all the deatails. to verify. if($account['legal_entity']->verification->status == 'unferified'){ try { $account->legal_entity->address->line1 = $model->line1; $account->legal_entity->address->postal_code = $model->postal_code; $account->legal_entity->ssn_last_4 = $model->ssn_last_4; $account->legal_entity->personal_id_number = $model->personal_id_number; $account->legal_entity->verification->document = $files->id; $account->save(); } catch (\Stripe\Error\InvalidRequest $e){ // Check any error for saving the data $body = $e->getJsonBody(); $error = $body['error']; echo $error; } ?>
after verifying amount will be deposited in next two days in user’s account