Set reader display

Sets the reader display to show cart details.

Parameters

  • typeenumRequired

    Type of information to display. Only cart is currently supported.

  • cartobject

    Cart details to display on the reader screen, including line items, amounts, and currency.

Returns

Returns an updated Reader resource.

POST /v1/terminal/readers/:id/set_reader_display
curl https://api.stripe.com/v1/terminal/readers/tmr_FDOt2wlRZEdpd7/set_reader_display \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d type=cart \
-d "cart[currency]"=usd \
-d "cart[line_items][0][amount]"=5100 \
-d "cart[line_items][0][description]"="Red t-shirt" \
-d "cart[line_items][0][quantity]"=1 \
-d "cart[tax]"=100 \
-d "cart[total]"=5200
Response
{
"id": "tmr_FDOt2wlRZEdpd7",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"set_reader_display": {
"cart": {
"currency": "usd",
"line_items": [
{
"amount": 5100,
"description": "Red t-shirt",
"quantity": 1
}
],
"tax": 100,
"total": 5200
},
"type": "cart"
},
"status": "in_progress",
"type": "set_reader_display"
},
"device_sw_version": "2.37.2.0",
"device_type": "simulated_wisepos_e",
"ip_address": "0.0.0.0",
"label": "Blue Rabbit",
"last_seen_at": 1695166525506,
"livemode": false,
"location": "tml_FDOtHwxAAdIJOh",
"metadata": {},
"serial_number": "259cd19c-b902-4730-96a1-09183be6e7f7",
"status": "online"
}

Simulate a successful input collectionTest helper

Use this endpoint to trigger a successful input collection on a simulated reader.

Parameters

  • skip_non_required_inputsenum

    This parameter defines the skip behavior for input collection.

Returns

Returns an updated Reader resource.

POST /v1/test_helpers/terminal/readers/:id/succeed_input_collection
curl https://api.stripe.com/v1/test_helpers/terminal/readers/tmr_FDOt2wlRZEdpd7/succeed_input_collection \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d skip_non_required_inputs=none
Response
{
"id": "tmr_FDOt2wlRZEdpd7",
"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,
"signature": {
"value": "file_abcd"
}
},
{
"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": "choice_1"
}
},
{
"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,
"email": {
"value": "[email protected]"
}
}
]
},
"status": "succeeded",
"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",
"status": "online"
}

Simulate an input collection timeoutTest helper

Use this endpoint to complete an input collection with a timeout error on a simulated reader.

Parameters

No parameters.

Returns

Returns an updated Reader resource.

POST /v1/test_helpers/terminal/readers/:id/timeout_input_collection
curl -X POST https://api.stripe.com/v1/test_helpers/terminal/readers/tmr_FDOt2wlRZEdpd7/timeout_input_collection \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "tmr_FDOt2wlRZEdpd7",
"object": "terminal.reader",
"action": {
"failure_code": "collect_inputs_timeout",
"failure_message": "collect inputs was timed out",
"collect_inputs": {
"inputs": [
{
"type": "signature",
"custom_text": {
"title": "Signature",
"description": "Please sign below",
"submit_button": "Submit",
"skip_button": "Skip"
},
"required": false,
"signature": {
"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,
"email": {
"value": null
}
}
]
},
"status": "failed",
"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",
"status": "online"
}

Simulate presenting a payment methodTest helper

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

Parameters

  • card_presentobject

    Simulated data for the card_present payment method.

  • typeenum

    Simulated payment type.

    Possible enum values
    card

    Simulate a card payment method

    card_present

    Simulate a card_present payment method

    interac_present

    Simulate a interac_present payment method

More parameters

  • amount_tipinteger

  • cardobject

  • interac_presentobject

Returns

Returns an updated Reader resource.

POST /v1/test_helpers/terminal/readers/:id/present_payment_method
curl -X POST https://api.stripe.com/v1/test_helpers/terminal/readers/tmr_gLeqlF03xvlBympS9RfZqdpF/present_payment_method \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "tmr_gLeqlF03xvlBympS9RfZqdpF",
"object": "terminal.reader",
"action": {
"failure_code": null,
"failure_message": null,
"process_payment_intent": {
"payment_intent": "pi_1Gt0582eZvKYlo2CGSidzWqK"
},
"status": "succeeded",
"type": "process_payment_intent"
},
"device_sw_version": null,
"device_type": "bbpos_wisepos_e",
"ip_address": "192.168.2.2",
"label": "Blue Rabbit",
"last_seen_at": null,
"livemode": false,
"location": null,
"metadata": {},
"serial_number": "123-456-789",
"status": "online"
}