简体   繁体   English

无法在条带中创建用于向该帐户汇款的托管帐户

[英]Can not create managed account in stripe for sending money to that account

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 我将Laravel 5.1和Stripe库用于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"
    ]
  }
}
  1. What does bank_account represent in the response? bank_account在响应中代表什么?
  2. Is there any request example I can follow? 有什么可以跟我要求的例子吗?

Great question! 好问题! When you see "bank_account" under "fields_needed", that means that the managed account does not have bank account information attached. 当您在“ fields_needed”下看到“ bank_account”时,表示该托管帐户未附加银行帐户信息。 In order to complete the account verification, you will have to submit account information through the "update account" API call: 为了完成帐户验证,您将必须通过“更新帐户” API调用提交帐户信息:

https://stripe.com/docs/api/curl#update_account-external_account 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 在API的最新版本中,“ bank_account”称为“ external_account”,请参见此处的注释: 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. 您的Stripe帐户似乎是在一段时间之前创建的,因此其API版本不是最新的。 If you are still working on your solution, I would consider upgrading your API version. 如果您仍在解决方案中,我将考虑升级您的API版本。 The API documentation only covers the latest API version, so if you're on an older version you may notice some discrepancies. API文档仅涵盖最新的API版本,因此,如果您使用的是旧版本,则可能会发现一些差异。 Be sure to read through the upgrade notes: /docs/upgrades 请务必通读升级说明:/ docs / upgrades

You can upgrade your API version from the dashboard here: /account/apikeys 您可以在以下位置从信息中心升级API版本:/ 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();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM