コンテンツにスキップ
アカウントを作成
または
サインイン
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 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 のシミュレーションされたリーダーは、必要に応じて自動的にカード提示をシミュレーションします。サーバー主導型のシステムでは、構築済みのシステムを更新して、カード提示をシミュレーションします。

To use the simulated reader, call discoverReaders to search for readers, with the simulated option set to true. When discoverReaders returns a result, call connectReader to connect to the simulated reader.

When connecting to a mobile reader or to a Tap to Pay reader, your integration must include the locationId in the connection configuration, even for the simulated reader. Because the simulated reader can’t be associated with a real location, provide the simulated reader’s mock locationId instead.

DiscoverReadersViewController.swift
Swift
import UIKit import StripeTerminal class DiscoverReadersViewController: UIViewController, DiscoveryDelegate { var discoverCancelable: Cancelable? // ... // Action for a "Discover Readers" button func discoverReadersAction() throws { let config = try BluetoothScanDiscoveryConfigurationBuilder().setSimulated(true).build() self.discoverCancelable = Terminal.shared.discoverReaders(config, delegate: self) { error in if let error = error { print("discoverReaders failed: \(error)") } else { print("discoverReaders succeeded") } } } // ... // MARK: DiscoveryDelegate // This delegate method can get called multiple times throughout the discovery process. // You might want to update a UITableView and display all available readers. // Here, we're automatically connecting to the first reader we discover. func terminal(_ terminal: Terminal, didUpdateDiscoveredReaders readers: [Reader]) { // Select the first reader we discover guard let selectedReader = readers.first else { return } // Since the simulated reader is not associated with a real location, we recommend // specifying its existing mock location. guard let locationId = selectedReader.locationId else { return } // Only connect if we aren't currently connected. guard terminal.connectionStatus == .notConnected || terminal.connectionStatus == .discovering else { return } // Replace 'yourMobileReaderDelegate' with your actual MobileReaderDelegate implementation let mobileReaderDelegate = yourMobileReaderDelegate do { connectionConfig = try BluetoothConnectionConfigurationBuilder( // When connecting to a physical reader, your integration should specify either the // same location as the last connection (selectedReader.locationId) or a new location // of your user's choosing. delegate: mobileReaderDelegate, locationId: locationId ) .setAutoReconnectOnUnexpectedDisconnect(true) // This is optional as it's the default value .build() } catch { // Handle error building the connection configuration return } // Note `readerDelegate` should be provided by your application. // See our Quickstart guide at https://stripe.com/docs/terminal/quickstart // for more example code. Terminal.shared.connectReader(selectedReader, connectionConfig: connectionConfig) { reader, error in if let reader = reader { print("Successfully connected to reader: \(reader)") } else if let error = error { print("connectReader failed: \(error)") } } } }

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

SDK リファレンス

  • SimulatorConfiguration (iOS)

The simulated reader supports a small amount of configuration, enabling you to test different flows within your point of sale application such as different card brands or error scenarios like a declined charge. To enable this behavior, use the following code before you collect your payment method:

SimulatorSettingsViewController.swift
Swift
let simulatorConfiguration = Terminal.shared.simulatorConfiguration simulatorConfiguration.simulatedCard = SimulatedCard(type: .amex) simulatorConfiguration.simulatedTipAmount = 1000

次のステップ

アプリケーションをリーダーに接続しました。次に、Stripe Terminal の最初の支払いを回収します。

BBPOS および Chipper™ の名称およびロゴは BBPOS Limited の米国および/またはその他の国における商標または登録商標です。Verifone® の名称およびロゴは Verifone の米国および/またはその他の国における商標または登録商標のいずれかです。これらの商標の使用は BBPOS または Verifone による何らかの承認を意味するものではありません。

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