支払い後に支払い情報を保存する
対面支払いを受け付け、顧客が不在のときに使用するための支払い情報を保存します。
Stripe Terminal を使用して、店舗購入の支払い情報を保存できます。card_
支払いが成功すると、generated_
属性で再利用可能な card
の PaymentMethod が返されます。以下はそのユースケースです。
- ジムの顧客が初回セッションと会員制サブスクリプションの支払いを対面で行います。取引により、将来のメンバーシップの自動更新に使用する
generated_
が設定されます。card - 衣料品店の顧客が、レジで購入するときにメールアドレスを提供します。取引により、顧客レコードと、関連付けられた保存済み
generated_
が作成されます。これにより、顧客が後でその店のウェブサイトにログインし、同じカードを使用して注文できます。card
初回の対面支払いでは、標準的な Terminal の支払いについて、ライアビリティシフトや、低価格 (特定の市場の場合) という特典を受けられますが、generated_
を使用する後続の支払いは、非対面カード支払いのオンライン取引であり、ライアビリティシフトはありません。
顧客を作成する
将来の支払いに備えてカードを設定するには、カードを Customer (顧客) に関連付ける必要があります。顧客がビジネスでアカウントを作成する際に、Customer オブジェクトを作成します。Customer オブジェクトを使用すると、支払い方法を再利用したり、複数の支払いを追跡したりできます。
作成に成功すると、Customer オブジェクトが返されます。オブジェクトで顧客の id
を調べて、その値を後で取得できるようにデータベースに保存できます。
これらの顧客は、ダッシュボードの顧客ページで見つけることができます。
PaymentIntent を作成する
Request a generated_
when you create a PaymentIntent by specifying a value for setup_future_usage. If you intend to only reuse the payment method when the customer is present in the checkout flow, use on_
. Otherwise, use off_
.
注
Visa, Mastercard, American Express, Discover, co-branded eftpos, co-branded Interac, and co-branded girocard cards are supported as card_
payment methods that can be saved as type card
.
Collect and process a payment method
When the customer is ready to pay and has consented to their payment method details being saved, pass allow_redisplay as always
or limited
into the collectPaymentMethod
call. The value indicates the degree to which a payment method can be shown in a customer checkout flow.
Access the generated_card
A successful payment with a method that supports future use returns a PaymentIntent in the requires_
or succeeded
state. You can retrieve the generated_card payment method by expanding the PaymentIntent’s latest_charge property and viewing payment_method_details.card_present. If you passed the customer ID into the PaymentIntent creation call, the reusable PaymentMethod is automatically attached to the Customer object. Otherwise, you can manually attach it in a separate call.
Always verify that the PaymentIntent.latest_charge contains a generated_
value. Some payments, such as digital wallet payments and single-branded Interac, eftpos, or girocard card payments, might not create a generated card. If that happens, and you require a reusable payment method, you have two options:
- Prompt the customer to save a different payment method using the flow to save a payment method without taking a payment.
- Refund the in-person payment, indicate that the transaction failed, and instruct the customer to use a different payment method.
Mobile wallets considerations 
Saved mobile wallets is only for off_session payments such as future subscription or other payments you initiate on behalf of your customer. When you save a digital wallet payment method, the generated_
has allow_
, to indicate its specific usage considerations.
When you attempt to charge a mobile wallet, make sure to pass off_
during PaymentIntent confirmation. If the customer is present in your checkout flow, you will need to instead use the Apple Pay and Google Pay integrations to re-prompt for payment method presentment.
法令遵守
顧客の支払いの詳細を保存する際、適用されるすべての法律、規制、ネットワークの規則に準拠する責任はお客様にあります。たとえば、欧州データ保護委員会は、支払いの詳細の保存に関するガイダンスを発行しています。これらの要件は通常、以降の購入時の決済フローでの顧客の支払い方法を提示する、顧客がお客様のウェブサイトやアプリを使用していないときに請求するなど、将来に備えて顧客の支払い方法を保存する場合に適用されます。
支払い方法の詳細を保存する趣旨、顧客がオプトインできるようにする規約を、ウェブサイトおよびアプリに追加します。顧客がオフラインのときに顧客に請求する予定の場合は、少なくとも以下に関する説明を規約に含めてください。
- 指定された取引で顧客の代理として単独の支払いまたは一連の支払いを開始することをお客様に許可するという、顧客からお客様への同意
- 予期される支払い時期と支払い頻度 (たとえば、請求が予定されている分割払いまたはサブスクリプションの決済なのか、あるいは予定されていないトップアップなのか)。
- 決済金額の決定方法。
- サブスクリプションサービスに使用される支払い方法を設定する場合は、キャンセルに関するポリシー。
これらの規約に関する顧客の書面による同意の記録を必ず保管してください。
支払い方法を保存した場合、その使用は、規約に記載された特定の用途にのみ使用できます。顧客がオフラインであるときに請求し、さらに顧客の支払い方法を保存して、以降の購入に備えた保存済みの支払方法として顧客に提示する場合は、顧客から明示的に同意を収集する必要があります。そのための方法の 1 つとして、「今後の使用に備えて支払い方法を保存する」チェックボックスの使用があります。