簡體   English   中英

無法在條帶中創建用於向該帳戶匯款的托管帳戶

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

我嘗試這段代碼

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();

我將Laravel 5.1和Stripe庫用於php strype php

我收到這個回應

{
  "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. bank_account在響應中代表什么?
  2. 有什么可以跟我要求的例子嗎?

好問題! 當您在“ fields_needed”下看到“ bank_account”時,表示該托管帳戶未附加銀行帳戶信息。 為了完成帳戶驗證,您將必須通過“更新帳戶” API調用提交帳戶信息:

https://stripe.com/docs/api/curl#update_account-external_account

在API的最新版本中,“ bank_account”稱為“ external_account”,請參見此處的注釋: https ://stripe.com/docs/upgrades#2015-10-01

您的Stripe帳戶似乎是在一段時間之前創建的,因此其API版本不是最新的。 如果您仍在解決方案中,我將考慮升級您的API版本。 API文檔僅涵蓋最新的API版本,因此,如果您使用的是舊版本,則可能會發現一些差異。 請務必通讀升級說明:/ docs / upgrades

您可以在以下位置從信息中心升級API版本:/ account / apikeys

希望這能說明問題! 如果您還有其他問題,請告訴我,我們很樂意為您提供幫助。

在您的請求中添加以下行。 這樣可以解決您的問題。

    $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