I try this code
Stripe::setApiKey("sk_test_eDpXMPqKt0zD1hr55Sw*****");
Stripe::setApiVersion("2015-02-18");
$account = Account::create([
"country" => "US",
"managed" => true,
"email" => "gven****@gmail.com",
]);
$account_ret = Account::retrieve($account->id);
$account_ret->support_phone = '555-666-7777';
$account_ret->legal_entity->dob = [
'day' => '10',
'month' => '01',
'year' => '1988'
];
$account_ret->legal_entity->address = [
'city' => 'San Clemente',
'line1' => '100',
'line2'=>'Avenida Presidio',
'postal_code' => '92672',
'state' => 'CA',
'country' => 'US'
];
$account_ret->legal_entity->ssn_last_4 = '4242';
$account_ret->legal_entity->first_name = "Gven";
$account_ret->legal_entity->last_name = "Pzikyan";
$account_ret->legal_entity->type = "individual";
$account_ret->tos_acceptance = [
'date' => time(),
'ip' => $_SERVER['REMOTE_ADDR']
];
$account_ret->save();
I use Laravel 5.1 and Stripe library for php strype php
I receive this response
{
"status": "success",
"data": {
"id": "acct_18ygr2BKalvVkIRU",
"object": "account",
"bank_accounts": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/accounts/acct_18ygr2BKalvVkIRU/bank_accounts"
},
"business_logo": null,
"business_name": null,
"business_url": null,
"charges_enabled": true,
"country": "US",
"debit_negative_balances": false,
"decline_charge_on": {
"avs_failure": false,
"cvc_failure": false
},
"default_currency": "usd",
"details_submitted": false,
"display_name": null,
"email": "gven****@gmail.com",
"external_accounts": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/accounts/acct_18ygr2BKalvVkIRU/external_accounts"
},
"legal_entity": {
"additional_owners": null,
"address": {
"city": "San Clemente",
"country": "US",
"line1": "100",
"line2": "Avenida Presidio",
"postal_code": "92672",
"state": "CA"
},
"address_kana": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": null,
"town": null
},
"address_kanji": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": null,
"town": null
},
"business_name": null,
"business_name_kana": null,
"business_name_kanji": null,
"business_tax_id_provided": false,
"dob": {
"day": 10,
"month": 1,
"year": 1988
},
"first_name": "Gven",
"first_name_kana": null,
"first_name_kanji": null,
"gender": null,
"last_name": "Pzikya",
"last_name_kana": null,
"last_name_kanji": null,
"maiden_name": null,
"personal_address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"personal_address_kana": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": null,
"town": null
},
"personal_address_kanji": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": null,
"town": null
},
"personal_id_number_provided": false,
"phone_number": null,
"ssn_last_4_provided": false,
"type": "individual",
"verification": {
"details": null,
"details_code": null,
"document": null,
"status": "unverified"
}
},
"managed": true,
"metadata": [],
"product_description": null,
"statement_descriptor": null,
"support_email": null,
"support_phone": "555-666-7777",
"timezone": "Etc/UTC",
"tos_acceptance": {
"date": 1475064486,
"ip": "127.0.0.1",
"user_agent": ""
},
"transfer_schedule": {
"delay_days": 2,
"interval": "daily"
},
"transfers_enabled": false,
"verification": {
"disabled_reason": null,
"due_by": null,
"fields_needed": [
"legal_entity.personal_id_number",
"bank_account"
],
"contacted": false
},
"currencies_supported": [
"usd",
"aed",
"afn",
"all",
"amd",
"ang",
"aoa",
"ars",
"aud",
"awg",
"azn",
"bam",
"bbd",
"bdt",
"bgn",
"bif",
"bmd",
"bnd",
"bob",
"brl",
"bsd",
"bwp",
"bzd",
"cad",
"cdf",
"chf",
"clp",
"cny",
"cop",
"crc",
"cve",
"czk",
"djf",
"dkk",
"dop",
"dzd",
"egp",
"etb",
"eur",
"fjd",
"fkp",
"gbp",
"gel",
"gip",
"gmd",
"gnf",
"gtq",
"gyd",
"hkd",
"hnl",
"hrk",
"htg",
"huf",
"idr",
"ils",
"inr",
"isk",
"jmd",
"jpy",
"kes",
"kgs",
"khr",
"kmf",
"krw",
"kyd",
"kzt",
"lak",
"lbp",
"lkr",
"lrd",
"lsl",
"ltl",
"mad",
"mdl",
"mga",
"mkd",
"mnt",
"mop",
"mro",
"mur",
"mvr",
"mwk",
"mxn",
"myr",
"mzn",
"nad",
"ngn",
"nio",
"nok",
"npr",
"nzd",
"pab",
"pen",
"pgk",
"php",
"pkr",
"pln",
"pyg",
"qar",
"ron",
"rsd",
"rub",
"rwf",
"sar",
"sbd",
"scr",
"sek",
"sgd",
"shp",
"sll",
"sos",
"srd",
"std",
"svc",
"szl",
"thb",
"tjs",
"top",
"try",
"ttd",
"twd",
"tzs",
"uah",
"ugx",
"uyu",
"uzs",
"vnd",
"vuv",
"wst",
"xaf",
"xcd",
"xof",
"xpf",
"yer",
"zar",
"zmw"
]
}
}
Great question! When you see "bank_account" under "fields_needed", that means that the managed account does not have bank account information attached. In order to complete the account verification, you will have to submit account information through the "update account" API call:
https://stripe.com/docs/api/curl#update_account-external_account
In the latest version of the API "bank_account" is called "external_account", see the note here: https://stripe.com/docs/upgrades#2015-10-01
It looks like your Stripe account was created some time ago, so its API version is not up to date. If you are still working on your solution, I would consider upgrading your API version. The API documentation only covers the latest API version, so if you're on an older version you may notice some discrepancies. Be sure to read through the upgrade notes: /docs/upgrades
You can upgrade your API version from the dashboard here: /account/apikeys
Hope that clears things up! Please let me know if you have any further questions, I'm happy to help.
Add following rows to your request. This will solve your problem.
$account_ret->legal_entity->business_name = 'test_business_name ';
$account_ret->legal_entity->business_tax_id = '000000000';
$account_ret->legal_entity->type = "sole_prop";
$account_ret->external_account = array(
"object" => "bank_account",
"country" => "US",
"currency" => "usd",
"account_holder_name" => 'Gven Pzikyan',
"account_holder_type" => 'individual',
"routing_number" => "110000000",
"account_number" => "000123456789"
);
$file = FileUpload::create([
"purpose" => "identity_document",
"file" => fopen('/path/to/file/file.jpeg', 'r')
],
[
"stripe_account" => $account->id
]);
$account_ret->legal_entity->verification->document = $file->id;
$account_ret->save();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.