既存の銀行口座を移行する
既存の銀行口座を Payment Intents API または Checkout Sessions API に移行する方法をご紹介します。
Stripe is removing support for ACH Direct Debit using legacy integrations.
If you create legacy ACH Direct Debit payments, you must migrate to the Payment Intents API or Checkout Sessions API.
If you previously collected customer payment details with Stripe using the Tokens API, you can continue using the saved BankAccount as a PaymentMethod.
You can only use customer bank accounts with the Payment Intents API or Checkout Sessions API after you meet the following requirements:
Checkout Sessions API: 顧客の銀行口座が確認されました。
Payment Intents API: 顧客の銀行口座が確認されており、その銀行口座に対して有効な同意書が存在します。
Payment Intents または Checkout Sessions を使用するに当たり、認証済みの銀行口座を再認証する必要はありません。
Checkout Sessions を使用する
Checkout で以前に保存および確認された銀行口座を表示するには、以下を行う必要があります。
customerパラメーターを指定して Checkout セッションを作成する- フィルターを
['unspecified', 'always']に設定する payment_にmethod_ types us_を指定bank_ account
これらの要件が満たされると、Checkout は自動的にその顧客に関連付けられたすべての保存済みかつ確認済みの銀行口座を検出して表示するため、支払い情報を再度収集する必要がなくなります。
customer にメールアドレスが紐付いている場合、セッションに顧客のメールアドレスが事前入力され、変更することはできません。メールアドレスの有無を確認し、それに応じてメール入力欄を表示する必要があります。
PaymentMethod として BankAccount を取得する
Payment Methods API を通じて、保存されている BankAccounts を取得できます。
BankAccount を PaymentMethod として使用する場合、新しいオブジェクトは作成されません。Payment Methods API は、基となる同じオブジェクトの異なるビューを提供するだけです。
請求書
委任状の取得後に Invoicing を利用して継続するには、顧客のデフォルトの決済方法を更新するか、default_ パラメーターを設定する必要があります。
顧客の初期設定の決済方法を更新するには:
決済方法として銀行口座を指定して請求書を作成するには、以下のようにします。
サブスクリプション
委任状の取得後に Subscriptions を利用して継続するには、顧客のデフォルトの決済方法を更新するか、default_ パラメーターを設定する必要があります。
顧客の初期設定の決済方法を更新するには:
決済方法として銀行口座を指定してサブスクリプションを作成する方法は以下の通りです。
Identify Legacy ACH Payments
On a Charge object, the payment_ property is ach_ for the legacy integration and us_ for the newer integration.
A legacy ACH payment is created when a legacy BankAccount is the payment source. This happens when:
- You call the Create Charge API.
- A Subscription or Invoice charges a customer whose
default_is a legacy BankAccount, and nosource default_is set on the customer, subscription, or invoice.payment_ method - You call the Create PaymentIntent API with
sourceset to a legacy BankAccount.