List all Readers

Returns a list of Reader objects.

Parameters

  • device_typeenum

    Filters readers by device type

  • locationstring

    A location ID to filter the response list to only readers at the specific location

  • serial_numberstring

    Filters readers by serial number

  • statusenum

    A status filter to filter readers to only offline or online readers

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A object with a data property that contains an array of up to limit readers, starting after reader starting_after. Each entry in the array is a separate Terminal Reader object. If no more readers are available, the resulting array will be empty.

GET /v1/terminal/readers
const stripe = require('stripe')('sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc');
const readers = await stripe.terminal.readers.list({
limit: 3,
});
Response
{
"object": "list",
"url": "/v1/terminal/readers",
"has_more": false,
"data": [
{
"id": "tmr_FDOt2wlRZEdpd7",
"object": "terminal.reader",
"action": null,
"device_sw_version": "",
"device_type": "simulated_wisepos_e",
"ip_address": "0.0.0.0",
"label": "Blue Rabbit",
"last_seen_at": 1681320543815,
"livemode": false,
"location": "tml_FDOtHwxAAdIJOh",
"metadata": {},
"serial_number": "259cd19c-b902-4730-96a1-09183be6e7f7",
"status": "online"
}
{...}
{...}
],
}

Delete a Reader

Deletes a Reader object.

Parameters

No parameters.

Returns

Returns the Reader object that was deleted.

DELETE /v1/terminal/readers/:id
const stripe = require('stripe')('sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc');
const deleted = await stripe.terminal.readers.del('tmr_FDOt2wlRZEdpd7');
Response
{
"id": "tmr_FDOt2wlRZEdpd7",
"object": "terminal.reader",
"deleted": true
}

Cancel the current reader action

Cancels the current reader action.

Parameters

No parameters.

Returns

Returns an updated Reader resource.

POST /v1/terminal/readers/:id/cancel_action
const stripe = require('stripe')('sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc');
const reader = await stripe.terminal.readers.cancelAction('tmr_FDOt2wlRZEdpd7');
Response
{
"id": "tmr_FDOt2wlRZEdpd7",
"object": "terminal.reader",
"action": null,
"device_sw_version": "",
"device_type": "simulated_wisepos_e",
"ip_address": "0.0.0.0",
"label": "Blue Rabbit",
"last_seen_at": 1695402450407,
"livemode": false,
"location": "tml_FDOtHwxAAdIJOh",
"metadata": {},
"serial_number": "259cd19c-b902-4730-96a1-09183be6e7f7",
"status": "online"
}

Collect inputs using a ReaderPreview feature

Initiates an input collection flow on a Reader.

Parameters

  • inputsarray of objectsRequired

    List of inputs to be collected using the Reader

  • metadataobject

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Returns

Returns an updated Reader resource.

POST /v1/terminal/readers/:id/collect_inputs
// This example uses the beta SDK. See https://github.com/stripe/stripe-node#beta-sdks
const stripe = require('stripe')('sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc');
const reader = await stripe.terminal.readers.collectInputs(
'tmr_OXYJvwsea7PDiDHNciXRkytb',
{
inputs: [
{
type: 'signature',
custom_text: {
title: 'Signature',
description: 'Please sign below',
submit_button: 'Submit',
skip_button: 'Skip',
},
required: false,
},
{
type: 'selection',
custom_text: {
title: 'Selection',
description: 'Please select one',
},
required: true,
selection: {
choices: [
{
style: 'primary',
value: 'choice_1',
},
{
style: 'secondary',
value: 'choice_2',
},
],
},
},
{
type: 'email',
custom_text: {
title: 'Enter your email',
description: 'We\'ll send updates on your order and occasional deals',
submit_button: 'Submit',
skip_button: 'Skip',
},
required: false,
},
],
}
);
Response
{
"id": "tmr_OXYJvwsea7PDiDHNciXRkytb",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"collect_inputs": {
"inputs": [
{
"type": "signature",
"custom_text": {
"title": "Signature",
"description": "Please sign below",
"submit_button": "Submit",
"skip_button": "Skip"
},
"required": false,
"value": null
},
{
"type": "selection",
"custom_text": {
"title": "Selection",
"description": "Please select one"
},
"required": true,
"selection": {
"choices": [
{
"style": "primary",
"value": "choice_1"
},
{
"style": "secondary",
"value": "choice_2"
}
],
"value": null
}
},
{
"type": "email",
"custom_text": {
"title": "Enter your email",
"description": "We'll send updates on your order and occasional deals",
"submit_button": "Submit",
"skip_button": "Skip"
},
"required": false,
"value": null
}
]
},
"status": "in_progress",
"type": "collect_inputs"
},
"device_deploy_group": null,
"device_sw_version": null,
"device_type": "bbpos_wisepos_e",
"ip_address": "192.168.2.2",
"label": "Blue Rabbit",
"livemode": false,
"location": null,
"metadata": {},
"serial_number": "123-456-789",
"software": null,
"status": "online"
}

Confirm a PaymentIntent on the ReaderPreview feature

Finalizes a payment on a Reader.

Parameters

  • payment_intentstringRequired

    PaymentIntent ID

Returns

Returns an updated Reader resource.

POST /v1/terminal/readers/:id/confirm_payment_intent
// This example uses the beta SDK. See https://github.com/stripe/stripe-node#beta-sdks
const stripe = require('stripe')('sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc');
const reader = await stripe.terminal.readers.confirmPaymentIntent(
'tmr_FDOt2wlRZEdpd7',
{
payment_intent: 'pi_1NrpbFBHO5VeT9SUiCEDMdc8',
}
);
Response
{
"id": "tmr_FDOt2wlRZEdpd7",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"collect_payment_method": {
"payment_intent": "pi_1NrpbFBHO5VeT9SUiCEDMdc8"
},
"status": "in_progress",
"type": "confirm_payment_intent"
},
"device_sw_version": "",
"device_type": "simulated_wisepos_e",
"ip_address": "0.0.0.0",
"label": "Blue Rabbit",
"last_seen_at": 1681320543815,
"livemode": false,
"location": "tml_FDOtHwxAAdIJOh",
"metadata": {},
"serial_number": "259cd19c-b902-4730-96a1-09183be6e7f7",
"status": "online"
}
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$