コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
開発者向けのツール
始める
支払い
財務の自動化
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
概要
Stripe Payments について
構築済みのシステムをアップグレード
支払いの分析
オンライン決済
概要ユースケースを見つけるManaged Payments
Payment Links を使用する
決済ページを構築
高度なシステムを構築
アプリ内実装を構築
決済手段
決済手段を追加
決済手段を管理
Link による購入の迅速化
支払いインターフェイス
Payment Links
Checkout
Web Elements
アプリ内 Elements
決済シナリオ
カスタムの決済フロー
柔軟なアクワイアリング
オーケストレーション
店頭支払い
端末
    概要
    対面支払いを受け付ける
    導入方法の設計
    リーダーを選択
    導入方法の設計
    クイックスタート
    サンプルアプリケーション
    テスト
    Terminal の設定
    実装方法を設定する
    リーダーに接続する
    決済の受け付け
    カード支払いを回収
    追加の支払い方法
    オフライン決済を受け付ける
    通信販売/電話販売の決済
    地域的な考慮事項
    購入時
    チップを回収する
    将来の使用に備えて支払い情報を収集して保存する
      請求せずに直接保存する
      決済後の保存
    柔軟なオーソリ
    決済後
    返金の取引
    領収書の提供
    Checkout のカスタマイズ
    カートの表示
    画面上の入力を収集
    スワイプで取得されたデータを収集
    NFC 機器のタップによって取得したデータを収集
    Apps on Devices
    リーダーを管理
    リーダーの注文、返品、交換
    リーダーの登録
    場所とゾーンの管理
    リーダーの設定
    暗号化
    リファレンス
    API リファレンス
    モバイルリーダー
    スマートリーダー
    SDK 移行ガイド
    デプロイのチェックリスト
    Stripe Terminal リーダー製品シート
他の Stripe プロダクト
Financial Connections
仮想通貨
Climate
ホーム支払いTerminalCollect and save payment details for future use

注

このページはまだ日本語ではご利用いただけません。より多くの言語で文書が閲覧できるように現在取り組んでいます。準備が整い次第、翻訳版を提供いたしますので、もう少しお待ちください。

請求せずに直接保存

提示されたカードの詳細を収集して、オンライン利用のために保存します。

ページをコピー

SetupIntents を使用して、カードに請求することなくカードまたはモバイルウォレットの詳細を収集できます。SetupIntent で card_present の PaymentMethod を直接保存することはできませんが、ほとんどの場合、同じカードを表す再利用可能な generated_card の PaymentMethod を作成できます。顧客の視点からは、これらは同じ決済手段に捉えられます。

SetupIntents を使用して、Visa、Mastercard、アメリカン・エキスプレス、ディスカバー、および提携ブランドの Interac、eftpos、girocard のカード情報を収集できます。SetupIntents は、単独ブランドである Interac、eftpos、girocard のカードには対応していません。

SetupIntents を使用してStripe Terminal でカードを保存するには、次のようにする必要があります。

  1. Customer オブジェクトを作成または取得します。
  2. プロセスを追跡する SetupIntent (支払い方法設定インテント) オブジェクトを作成します。
  3. 顧客の同意を収集してから、支払い方法を収集します。
  4. Stripe に支払い方法の詳細を送信します。

注

この機能の顧客の同意モデルを変更し、レガシーの customer_consent_collected パラメーターの代わりに allow_redisplay パラメーターを必須にしました。実装で customer_consent_collected を使用している場合は、allow_redisplay を使用するように実装を更新する必要があります。この更新は、2025 年 3 月 31 日に React Native 以外のユーザーには必須になり、React Native ユーザーには 2025 年 9 月 30 日に必須になりました。ガイダンスについては、変更ログエントリーをご覧ください。

注

サーバー主導型の SetupIntents API は、BBPOS WisePOS E および Stripe リーダー S700 と互換性があります。

Create or retrieve a customer

To charge a card saved with Stripe, you must attach it to a Customer.

When you include a customer in your SetupIntent before confirming, Stripe automatically attaches the generated card payment method to the Customer object you provide.

以下のコードをサーバーに含めて、新しい Customer を作成します。

Command Line
cURL
curl -X POST https://api.stripe.com/v1/customers \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"

Create a SetupIntent

注

We recommend providing a customer ID while creating a SetupIntent—doing so attaches the card payment method to the Customer upon successful setup. If you don’t provide a customer ID, you must attach the payment method in a separate call.

A SetupIntent is an object that represents your intent to set up a customer’s payment method for future payments. The SetupIntent tracks the steps of this setup process. For Terminal, this includes collecting and recording cardholder consent.

API リファレンス

  • Create a SetupIntent

You must create the SetupIntent on your server and include card_present on the payment_method_types parameter. Specify usage=on_session if you only intend to reuse the payment method when the customer is in your checkout flow.

The SetupIntent contains a client secret, which is a key that’s unique to the individual SetupIntent. You must obtain the client secret from the SetupIntent on your server and pass it to the client side.

Command Line
cURL
# Request curl https://api.stripe.com/v1/setup_intents \ -u "sk_test_26PHem9AhJZvU623DfE1x4sd:" \ -d "payment_method_types[]"=card # Response { "id": "seti_1234567890abcdefghijklmn", "object": "setup_intent", "client_secret": "seti_1234567890abcdefghijklmn_secret_5678901234opqrstuvwxyz", ... # other SetupIntent fields } # Your server endpoint response { "id": "seti_1234567890abcdefghijklmn", "client_secret": "seti_1234567890abcdefghijklmn_secret_5678901234opqrstuvwxyz" }

Collect a payment method for saving

API リファレンス

  • process_setup_intent

After you create a SetupIntent, you need to collect a payment method and collect customer consent. Pass allow_redisplay as always or limited, indicating the degree to which a payment method can be shown in a customer checkout flow.

After you create a SetupIntent, you need to collect a payment method and collect customer consent. If the customer provides the required form of agreement or consent, set the customer_consent_collected Boolean to true.

注

顧客からの同意を、文書またはアプリケーションのチェックボックスを使用して収集します。ご登録の地域で適用されるすべての法律、規則、および規制に準拠する必要があります。

SetupIntent の収集と確認の両方を処理する process_setup_intent エンドポイントを呼び出す必要があります。顧客が同意した場合は、allow_redisplay を always または limited に設定します。

Command Line
cURL
curl https://api.stripe.com/v1/terminal/readers/{{READER_ID}}/process_setup_intent \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d setup_intent={{SETUP_INTENT_ID}} \ -d allow_redisplay=always

この方法では、接続されたカードリーダーを使用して支払い方法の暗号化データを収集し、その暗号化データを SetupIntent に関連付けます。

注意

支払い方法の収集はローカルで行われ、次のステップまで SetupIntent オブジェクトのオーソリや更新は必要ありません。

Cancel collection

Programmatic cancellation

API リファレンス

  • cancel_action

You can cancel collecting a payment method by calling cancel_action.

Submit the payment method details to Stripe

Your previous call to process_setup_intent handles the confirm for you, so no further action is necessary.

A successful setup returns a succeeded value for the SetupIntent’s status property, along with a SetupAttempt.payment_method_details.card_present.generated_card, which is a reusable card payment method you can use for online payments.

注

The SetupIntent.payment_method is a card_present PaymentMethod that represents the tokenization of the physically present card and isn’t chargeable online. Future payments use the generated card instead. From the customer’s perspective, they’re the same payment method.

The generated_card payment method automatically attaches to the customer you provided during SetupIntent creation. You can retrieve the generated_card payment method by expanding the SetupIntent’s latest_attempt property. Always check for a generated_card value, because for payment methods that don’t allow generated cards, the value is empty.

Command Line
cURL
curl -G https://api.stripe.com/v1/setup_intents/
{{SETUP_INTENT_ID}}
\ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d "expand[]"=latest_attempt

別の方法として、顧客に関連付けられている支払い方法のリストを取得することで、関連付けられた支払い方法を入手することもできます。

Command Line
cURL
curl -G https://api.stripe.com/v1/customers/
{{CUSTOMER_ID}}
/payment_methods
\ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d type=card

SetupIntent の作成時に顧客を指定しなかった場合は、別個のコールで generated_card を Customer オブジェクトに関連付けることができます。

Command Line
cURL
curl https://api.stripe.com/v1/payment_methods/
{{PAYMENT_METHOD_ID}}
/attach
\ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}

設定に失敗したら、返されたエラーを調べて原因を特定します。たとえば、顧客から同意を収集できなかったり、Stripe に顧客の同意を通知できなったりした場合、エラーが発生します。

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_card has allow_redisplay=limited, to indicate its specific usage considerations.

When you attempt to charge a mobile wallet, make sure to pass off_session=true 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.

Compliance

顧客の支払いの詳細を保存する際、適用されるすべての法律、規制、ネットワークの規則に準拠する責任はお客様にあります。たとえば、欧州データ保護委員会は、支払いの詳細の保存に関するガイダンスを発行しています。これらの要件は通常、以降の購入時の決済フローでの顧客の支払い方法を提示する、顧客がお客様のウェブサイトやアプリを使用していないときに請求するなど、将来に備えて顧客の支払い方法を保存する場合に適用されます。

支払い方法の詳細を保存する趣旨、顧客がオプトインできるようにする規約を、ウェブサイトおよびアプリに追加します。顧客がオフラインのときに顧客に請求する予定の場合は、少なくとも以下に関する説明を規約に含めてください。

  • 指定された取引で顧客の代理として単独の支払いまたは一連の支払いを開始することをお客様に許可するという、顧客からお客様への同意
  • 予期される支払い時期と支払い頻度 (たとえば、請求が予定されている分割払いまたはサブスクリプションの決済なのか、あるいは予定されていないトップアップなのか)。
  • 決済金額の決定方法。
  • サブスクリプションサービスに使用される支払い方法を設定する場合は、キャンセルに関するポリシー。

これらの規約に関する顧客の書面による同意の記録を必ず保管してください。

支払い方法を保存した場合、その使用は、規約に記載された特定の用途にのみ使用できます。顧客がオフラインであるときに請求し、さらに顧客の支払い方法を保存して、以降の購入に備えた保存済みの支払方法として顧客に提示する場合は、顧客から明示的に同意を収集する必要があります。そのための方法の 1 つとして、「今後の使用に備えて支払い方法を保存する」チェックボックスの使用があります。

このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc