Charges API からの移行
Payment Intents API にアップグレードします。
以前に Bank Accounts API を使用して Stripe で顧客の決済詳細を収集している場合、保存されている BankAccount
を引き続き PaymentMethod として使用できます。以下の要件を満たした後、顧客の BankAccount (銀行口座) を Payment Intents API で使用できます。
- 顧客の銀行口座の確認が完了している。
- その銀行口座の有効な同意書が存在している。
Bank Accounts API との互換性
銀行口座を使用して PaymentIntent を作成する
Bank Accounts that are already verified and have been attached to a Customer are usable in any API that accepts a PaymentMethod
object. You can use a saved BankAccount
as a PaymentMethod when creating a PaymentIntent. This eliminates the need to recollect payment details. However, make sure that you also update your integration to begin creating PaymentMethods instead.
同様に、SetupIntent を作成するときに、保存した BankAccount を PaymentMethod として使用できます。
同意書承認を収集する
Confirming a PaymentIntent or SetupIntent requires having your customer authorize a mandate to debit the account. Learn more about SEC codes to understand which authorization type is right for your business.
一部のケースでは、顧客の以前の購入での事前オーソリ、または SetupIntent が存在する可能性があり、これを使用してオフセッションの決済を作成できます。以下に例を挙げます。
- 顧客からオンラインの同意書を収集済みの場合、IP アドレスとユーザーエージェント情報の両方を使用して、Mandate オブジェクトを作成できます。
- If you previously collected payment and mandate information offline on paper, you can create a PPD mandate.
オフセッションの支払いを作成するには、オフラインの同意書承認を使用して、顧客の元の承認に関する記録を提供することができます。
Authorization is only required the first time you use a BankAccount
object with the PaymentIntents API. After that, you can use the BankAccount
object as a PaymentMethod to accept future payments.
PaymentMethod として BankAccount を取得する
Payment Methods API を使用して、保存されている BankAccount を取得できます。
BankAccount を PaymentMethod として使用する場合、新しいオブジェクトは作成されません。Payment Methods API は、基となる同じオブジェクトの異なるビューを提供するだけです。