画面上の入力を収集する
Terminal を使用して、顧客から入力を収集します。
Readers: Stripe Reader S700 and BBPOS WisePOS E
With Terminal smart readers, you can display input forms and collect information from your customers. You can choose from six input types and they can be used in a variety of use cases.
- Collect your customer identifier for loyalty redemption with the
phone
oremail
input and process it on your backend. - Have your customer acknowledge a waiver or agreement with the
signature
input. - Ask your customer to fill out a questionnaire with the
selection
ortext
input.
You can display input forms anytime before payment, post payment and outside of a payment cycle.

対応している入力タイプ。
注
collect_
を使用して、機密データ (保護された健康情報や顧客の決済カード情報など)、または法律によって制限されている情報を収集することはできません。
入力を収集する
To collect inputs using Terminal’s smart readers, call collectInputs
with the Terminal SDK, the SDK communicates with the reader to display a prebuilt UI. You can specify up to 5 inputs at a time, and the reader collects them in sequence. After the customer inputs their data, the SDK returns the collected data with a promise.
const collectInputsParameters = { inputs: [ { formType: 'signature', title: 'Please sign', description: 'Please sign if you agree to the terms and conditions', skipButtonText: 'skip', submitButtonText: 'Submit signature', }, { formType: 'selection', title: 'Choose an option', description: 'Were you happy with our customer service?', required: true, selectionButtons: [ { style: 'primary', text: 'Yes', }, { style: 'secondary', text: 'No', }, ], toggles: [ { title: 'Sign up for promotional emails', defaultValue: 'enabled', }, ], }, ], }; const result = await this.terminal.collectInputs(collectInputsParameters); if ('error' in result) { // Placeholder for handling exception } // Placeholder for handling collected inputs
カスタマイズ
すべての入力タイプでデザインと動作をカスタマイズすることができます。
- Set important inputs as
required
to ensure they’re collected. For required inputs, the Skip button is hidden. - Provide context to your customer by specifying the text you want to display on the reader screen for each input using
title
anddescription
.
フィールド名 | Maximum characters |
title | 40 |
description | 500 when used with the selection form, 100 when used with any other form type |
submit_ | 30 |
skip_ | 14 |
- Use line breaks
\n
in your text for better formatting. - Add up to 4 toggles that customers can enable or disable for Boolean options, agreements, or opt-ins.

トグルを含むメールアドレスと選択フォーム
フィールド名 | Maximum characters |
title | 50, 25 when used with toggle description |
description | 50, 25 when used with toggle title |
- For
selection
type inputs, you can emphasize or de-emphasizechoices
using thestyle
parameter.

プライマリ選択とセカンダリ選択の項目スタイル。
顧客とのやり取り
When the reader begins collecting inputs, it displays the first input from the list.
After the customer has completed all the inputs, the reader changes to a transitional state for 3 seconds, waiting for a subsequent request. If there is no subsequent request after 3 seconds, the reader changes back to the splash screen.
注
お客様は、この機能の使用に対して適用され、該当する法律と規制のすべてを理解してこれに準拠する責任をすべて負うものとされ、その使用に関連して、規定に従い、必要なすべての同意、承認、ライセンス、権利および許可を取得する必要があります。Terminal スマートリーダ-によって収集される入力、またはスマートリーダーから表示される出力を使用して顧客と契約を結ぶ場合、または顧客に通知を提供する場合、その契約または通知の法的な妥当性と法的強制力を確保することは、お客様の責任になります。
入力データを受信する
When all inputs have been collected or skipped, the Terminal SDK returns the collected data.
- 署名タイプの入力に対して返されるデータは、SVG 形式の文字列になります。
- For selection type inputs, the returned data are the selected button’s
text
andid
fields. - 電話、メール、テキスト、数値の各入力に対して返されるデータは、顧客のレスポンスの文字列になります。
- If an optional input is skipped by the customer, the
skipped
Boolean is set totrue
. - トグルごとに、入力トグルリストのインデックスに対応する
enabled
、disabled
、またはskipped
が返されます。
The Terminal SDK returns an error in the event of a canceled action, timed out collection, or other error.
構築したシステムをテストする
You can test your integration by using the SDK’s simulated reader. Before you can test input collection, you must first connect to a simulated reader.
The simulated reader supports simulating the following scenarios:
- Successful input collection without skipping any inputs
- Successful input collection with skipping all non-required inputs
- Failed input collection because of a timeout
When simulating successful input collection, the SDK returns a hard-coded value for each input based on the type.
// Simulated internet reader must already be connected collectInputsResult = { resultType: 'succeeded' as SimulatedCollectInputsResultType, skipBehavior: 'none' as SimulatedCollectInputsSkipBehavior, } as ISimulatedCollectInputsResultSucceeded; this.terminal.setSimulatorConfiguration({ collectInputsResult }); const collectInputsParameters = { inputs: // Placeholder for specifying the inputs you want to simulate collecting }; const result = await this.terminal.collectInputs(collectInputsParameters); if ('error' in result) { // Placeholder for handling exception } else { // Placeholder for handling collected inputs }