Treasury と Issuingを使用した金融口座とカードのセットアップ
金融口座を設定し、カードを作成する Treasury と Issuing の導入のサンプルに従います。
Homebox は、HVAC 専門家、クリーニング、配管などのホームサービス企業向けのソフトウェアを構築する架空の業界特化型 SaaS です。Homebox は、Treasury の金融アカウントを設定して、支払いカードを作成することにより、Treasury の導入を開始します。Homebox が外部の銀行口座との間で資金を移動する方法については、Treasury を使用して資金を移動する導入の例をご覧ください。
プラットフォームのアカウント登録
Homebox は、すでに Payments および Connect を利用している Stripe プラットフォームです。Custom 連結アカウントを使用しており、これらの連結アカウントではすでに card_
ケイパビリティが有効になっています。
ケイパビリティを追加
Homebox が Treasury と Issuing のサービスを利用するには、プラットフォームの連結アカウント向けの treasury
ケイパビリティと card_
ケイパビリティの追加をリクエストする必要があります。その後で、事前に各連結アカウントを登録して、Stripe がこうしたユーザーの Treasury の金融口座を作成できるようにする必要があります。
Homebox が Treasury で ACH 送金を使用するには、 us_
ケイパビリティもリクエストする必要があります。
treasury
、card_
、us_
の各ケイパビリティをリクエストするために、Homebox は Accounts API に対してリクエストを行います。
ホスティング登録を使用するために、Homebox は、Account Links (アカウントリンク) を呼び出し、それらの連結アカウントが Treasury 金融口座のアカウント登録情報の送信に使用できる URL を取得します。
レスポンスに、連結アカウントがアプリケーションへのアクセスに使用する URL が示されます。アプリケーションには、リンクの期限が切れる前にアクセスする必要があります。
{ "object": "account_link", "created": 1612927106, "expires_at": 1612927406, "url": "https://connect.stripe.com/setup/s/iCtLfmYb2tEU" }
Homebox は、account.
Webhook をリッスンして、連結アカウントで以下のフィールドとケイパビリティを確認します。
{ "object": { "id": "{{CONNECTED_ACCOUNT_ID}}", "object": "account", "capabilities": { "card_payments": "active", "treasury": "active", "card_issuing": "active", // Only appears if requesting the `card_issuing` capability. "us_bank_account_ach_payments": "active", // Only appears if requesting the `us_bank_account_ach_payments` capability. }, ... } }
FinancialAccount の作成
Stripe が treasury
ケイパビリティをアカウントに追加すると、Homebox はアカウントの FinancialAccount
オブジェクトを作成できます。そのためには、Homebox が FinancialAccounts
を呼び出し、企業が提供する予定の Features
をリクエストします。
レスポンスに、アカウントが処理中であることが示されます。処理が完了して、すべての関連機能が有効になると、Homebox は、treasury.
Webhook リスナーから確認を受信します。
{ "object": "treasury.financial_account", "created": 1612927106, "id": "{{FINANCIAL_ACCOUNT_ID}}", "country": "US", "supported_currencies": ["usd"], "financial_addresses": [ // This field is empty until the "financial_addresses.aba" feature becomes active { "type": "aba", "supported_networks": ["ach", "us_domestic_wire"], "aba": { "account_number_last4": "7890", // Use the expand[] parameter to view the `account_number` field hidden by default "account_number": "1234567890", "routing_number": "000000001", "bank_name": "Bank of Earth" } } ], "livemode": true, // State machine: // open - the account is ready to be used // closed - the account is closed "status": "open", "status_details": { // `closed` is null if financial account is not closed "closed": { // List of one or more reasons why the FinancialAccount was closed: // - account_rejected // - closed_by_platform // - other "reasons": [], } }, active_features: ["card_issuing"], pending_features: ["deposit_insurance", "financial_addresses.aba", "outbound_payments.ach", "us_domestic_wire", "inbound_transfers.ach", "outbound_transfers.ach", "outbound_transfers.us_domestic_wire"], restricted_features: [], "features": { "object": "treasury.financial_account_features", "card_issuing": { "status": "active", "status_details": [], "access": "active", }, "deposit_insurance": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, "financial_addresses": { "aba": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, }, "outbound_payments": { "ach": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, }, "us_domestic_wire": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, "inbound_transfers": { "ach": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, }, "outbound_transfers": { "ach": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, }, "outbound_payments": { "ach": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, }, "outbound_transfers": { "us_domestic_wire": { "requested": true, "status": "pending", // Becomes "active" once the Treasury financial account is set up "status_details": [{"code": "activating", "resolution": nil}], }, }, "platform_restrictions": { "inbound_flows": "unrestricted", "outbound_flows": "unrestricted" }, "metadata": {}, ... }
支払いカード保有者の作成
Homebox は、Treasury の金融口座のカードを作成する前に、カード保有者を作成する必要があります。この例のカード保有者は、Homebox サービスを利用し、プラットフォームの連結アカウントを保有している配管工です。
- ダッシュボードの連結アカウントページにアクセスします。
- カード保有者を作成する連結アカウントを選択して、その詳細を展開します。
- カード発行 タブを選択します。
- カード保有者 の横にある + ボタンをクリックします。
- カード保有者の詳細を入力し、カード保有者を作成 をクリックします。
支払いカードの作成
これで、連結アカウントに FinancialAccount
オブジェクトが関連付けられ、カード保有者を使用できるようになったため、Homebox は、FinancialAccount
の残高をカードの利用可能な残高として使用して支払いカードを作成できます。