コンテンツにスキップ
アカウントを作成
または
サインイン
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
ホーム支払いTerminal

注

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

Stripe Terminal をテストする

Terminal の組み込みを効果的にテストする方法をご紹介します。

ページをコピー

注

Stripe Terminal をテストするプロセスの大半は、Stripe のオンライン決済のテストと類似しています。また、テスト環境では Stripe Terminal でモバイルウォレット (Apple Pay や Google Pay など) を使用することはできません。詳細については、Stripe の一般テストガイドをご覧ください。

Terminal のデプロイを成功させる最善の方法は、システムの各部分をテストすることです。Stripe は各ステージ用のテストツールを用意しています。

  1. リーダーを注文する前に、リーダーシミュレーターで組み込みをテストします。
  2. 物理テストカードでハードウェアの組み込みをテストします。

シミュレーションされたリーダー

参照番号

  • discoverReaders (JavaScript)
  • DiscoveryConfiguration (iOS)
  • DiscoveryConfiguration (Android)
  • Discover リーダー

Stripe Terminal SDK およびサーバー主導型の連携にはシミュレーションされた内蔵カードリーダーが付属しているため、物理ハードウェアに接続することなくアプリを開発してテストすることができます。連携が完了している場合も、構築中であっても、シミュレーションされたリーダーを使用してアプリ内のすべての Terminal フローをエミュレートします。

The simulated reader doesn’t provide a UI. After connecting to it in your app, you can see it working when calls to the Stripe SDK or API succeed.

SDK のシミュレーションされたリーダーは、必要に応じて自動的にカード提示をシミュレーションします。サーバー主導型のシステムでは、構築済みのシステムを更新して、カード提示をシミュレーションします。

シミュレーションされたテストカード

シミュレーションされたリーダーは、シミュレーションされたテストカードを使用するよう設定できます。これにより、POS アプリケーション内のさまざまなフローをテストできるようになります。

支払い方法を収集する前に、以下のテストカード番号またはテスト支払い方法のいずれかを使用して特定のレスポンスを生成するよう、シミュレーションされたリーダーを設定します。

標準的なテストカード

テストカード番号Test payment methodブランド
visaVisa
visa_debitVisa (デビット)
mastercardMastercard
mastercard_debitMastercard (デビット)
mastercard_prepaidMastercard (プリペイド)
amexアメリカン・エキスプレス
amex2アメリカン・エキスプレス
discoverディスカバー
discover2ディスカバー
dinersダイナースクラブ
diners_14digitsダイナースクラブ (14 桁のカード)
jcbJCB
unionpay銀聯
interacInterac
eftpos_au_debiteftpos オーストラリア
eftpos_au_visa_debiteftpos オーストラリア/Visa
eftpos_au_mastercard_debiteftpos オーストラリア/Mastercard

特定の成功のためのテストカード

テストカード番号Test payment method結果
offline_pin_cvmSimulates the cardholder being prompted for and entering an offline PIN. The resulting charge has cardholder_verification_method set to offline_pin.
offline_pin_sca_retrySimulates an SCA-triggered retry flow where a cardholder’s initial contactless charge fails and the reader then prompts the user to insert their card and enter their offline PIN. The resulting charge has cardholder_verification_method set to offline_pin.
online_pin_cvmSimulates a cardholder being prompted for and entering an online PIN. The resulting charge has cardholder_verification_method set to online_pin.
online_pin_sca_retrySimulates an SCA-triggered retry flow where a cardholder’s initial contactless charge fails and the reader then prompts the user to input their online PIN. The final charge has cardholder_verification_method set to online_pin.

特定のエラーのためのテストカード

注

Using these specific cards for saving directly without charging and SetupIntents returns a setup_intent_authentication_failure response.

テストカード番号Test payment method結果
charge_declined支払いは card_declined コードで拒否されます。
charge_declined_insufficient_funds支払いは card_declined コードで拒否されます。decline_code 属性は insufficient_funds です。
charge_declined_lost_card支払いは card_declined コードで拒否されます。decline_code 属性は lost_card です。
charge_declined_stolen_card支払いは card_declined コードで拒否されます。decline_code 属性は stolen_card です。
charge_declined_expired_card支払いは expired_card コードで拒否されます。
charge_declined_processing_error支払いは processing_error コードで拒否されます。
refund_failCharge succeeds but refunding a captured charge fails asynchronously with a failure_reason of expired_or_canceled_card. Because refund failures are asynchronous, the refund will appear to be successful at first and will only have the failed status on subsequent fetches. We also notify you of refund failures using the refund.failed webhook event. This simulated error is only supported in the JavaScript SDK.

シミュレーションされたカード提示

サーバー主導型の実装を使用する場合、リーダーでのカード保有者のタップまたはリーダーへのカードの挿入をシミュレーションするには、present_payment_method エンドポイントを使用します。

Command Line
cURL
curl -X POST https://api.stripe.com/v1/test_helpers/terminal/readers/tmr_xxx/present_payment_method \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
{ "id": "tmr_xxx", "object": "terminal.reader", "action": { "failure_code": null, "failure_message": null, "process_payment_intent": { "payment_intent": "pi_xxx" }, "status": "succeeded", "type": "process_payment_intent" }, … }

パラメーターを指定しない場合、シミュレーションされた支払いは、PaymentIntent の支払い方法のタイプに基づき、デフォルトで有効なテストカードになります。以下は、Terminal 支払い方法タイプ用のデフォルトのテストカードです。

支払い方法のタイプテストカード番号Test payment method
card_presentvisa
card_present と interac_presentvisa
interac_presentinterac

標準的なテストカードでは、テスト金額を使用して失敗シナリオをシミュレーションすることもできます

シミュレーションされたリーダーの更新

シミュレーションされた Bluetooth リーダーに接続している間に、シミュレーションされたリーダーの更新を設定できます。

Set the Terminal.shared.simulatorConfiguration.availableReaderUpdate to any of the following configurations. Calling connectReader triggers a simulated reader update.

Update configuration結果
SimulateReaderUpdateNone更新はないため、ユーザに何も伝える必要はありません。
SimulateReaderUpdateRequired必須の更新が提供され、更新に 1 分かかります。BluetoothReaderDelegate は didStartInstallingUpdate コールバックを受信します。
SimulateReaderUpdateRequiredForOfflineA required update is past due and takes 1 minute. If operating offline, reader connection is unavailable. Your BluetoothReaderDelegate receives the didStartInstallingUpdate callback.
SimulateReaderUpdateAvailableオプションの更新を利用できます。更新が利用可能であることをユーザーに伝え、requiredAt の日付をハイライト表示します。
SimulateReaderUpdateLowBattery必要な更新のインストールが開始されますが、リーダーのバッテリー残量が少ないため失敗します。リーダーへの接続も失敗します。これにより、以前のバージョンのソフトウェアを実行するリーダーがシミュレーションされます。
SimulateReaderUpdateLowBatterySucceedConnectA required update starts to install but fails due to the reader running low on battery. Connecting to the reader succeeds. This simulates the reader running a recent version of software that’s still acceptable. Installing the update is retried when connecting to the reader again.
SimulateReaderUpdateRandom上記のシナリオのランダムな選択。

テスト用の法人カード

テスト用の法人カードを使用し、Stripe Terminal リーダーで支払いをテストします。Stripe ダッシュボードの Terminal タブからリーダーおよびテスト用の法人カードを購入できます。

This physical test card supports both chip entry and contactless payments. It only works with Stripe’s pre-certified readers, and only against the Stripe API in a sandbox. If you attempt to use your physical test card in live mode, the Stripe API returns an error. Unless stated otherwise, use the PIN 1234 when prompted.

テスト用の法人カードを使用して支払いを作成する際は、末尾が以下の値になる金額を使用して特定のレスポンスを生成します。

小数結果
00支払いは承認されます。
01支払いは call_issuer コードで拒否されます。
02When using readers featuring a cardholder-facing screen, insert (or tap, if supported) the test card. If the card requires a PIN, the payment declines with offline_pin_required and requests PIN entry if the reader supports chip entry. Enter 1234 to complete the test payment.
03When using readers featuring a cardholder-facing screen, insert (or tap, if supported) the test card. If the card requires a PIN, the payment declines with online_or_offline_pin_required and requests PIN entry. Enter any 4-digit PIN to complete the test payment.
05支払いは generic_decline コードで拒否されます。
55支払いは incorrect_pin コードで拒否されます。
65支払いは withdrawal_count_limit_exceeded コードで拒否されます。
75支払いは pin_try_exceeded コードで拒否されます。

For example, a payment processed using a physical test card for the amount 25.00 USD succeeds; a payment processed for the amount 10.05 USD is declined.

Interac テストカード カナダのみ

To test your Interac integration, you can use the simulated interac test card or an Interac physical test card. You can order it from the Terminal hardware shop in the Dashboard. You can’t use the Stripe-branded physical test as an Interac card.

Interac テストカードは、interac_present 支払いと interac_present 返金の両方で機能します。card_present 支払いをテストする際に使用するのと同じテスト金額を使用できます。特に記載がない限り、要求された場合は PIN 1234 を使用してください。拒否された返金をテストするには、末尾が 01、05、55、65 または 75 の金額で一部返金を作成します。

注

Interac テストカードは、非接触型決済に対応していません。

eftpos テストカード オーストラリアのみ

To test your eftpos integration, you can use the simulated eftpos test card or an eftpos physical test card. You can order it from the Terminal hardware shop in the Dashboard. You can’t use the Stripe-branded physical test card as an eftpos card.

card_present 支払いをテストする際に使用するのと同じテスト金額を使用できます。特に記載がない限り、要求された場合は PIN 1234 を使用してください。

参照情報

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