Get a preview of a TerminalHardwareOrder without creating it.

Parameters

  • hardware_order_itemsarray of objectsRequired

    An array of line items to order.

  • payment_typeenumRequired

    The method of payment for this order.

  • shippingobjectRequired

    Shipping address for the order.

  • shipping_methodstringRequired

    The Shipping Method for the order.

  • 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.

More parameters

  • po_numberstring

Returns

Returns a TerminalHardwareOrder object (that has not been created) if the preview succeeds.

GET /v1/terminal/hardware_orders/preview
cURL
curl -G https://api.stripe.com/v1/terminal/hardware_orders/preview \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d "shipping[name]"="Jenny Rosen" \
-d "shipping[address][line1]"="1234 Main Street" \
-d "shipping[address][city]"="San Francisco" \
-d "shipping[address][state]"=CA \
-d "shipping[address][country]"=US \
-d "shipping[address][postal_code]"=94111 \
-d "shipping[company]"="Rocket Rides" \
-d "shipping[phone]"=15555555555 \
--data-urlencode "shipping[email]"="test@example.com" \
-d shipping_method=thsm_MfuTjLaPEgXMa4 \
-d payment_type=monthly_invoice \
-d "hardware_order_items[0][terminal_hardware_sku]"=thsku_L5fys7HZ5o02Nc \
-d "hardware_order_items[0][quantity]"=2
Response
{
"object": "terminal.hardware_order",
"amount": 13602,
"currency": "usd",
"hardware_order_items": [
{
"amount": 11800,
"currency": "usd",
"quantity": 2,
"terminal_hardware_sku": {
"id": "thsku_L5fys7HZ5o02Nc",
"amount": 450,
"country": "AT",
"currency": "eur",
"product": "thpr_MJfof7SLvdkG6T"
}
}
],
"livemode": true,
"metadata": {},
"payment_type": "monthly_invoice",
"po_number": null,
"shipment_tracking": [],
"shipping": {
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"amount": 800,
"company": "Rocket Rides",
"currency": "usd",
"email": "test@example.com",
"name": "Jenny Rosen",
"phone": "15555555555"
},
"shipping_method": "standard",
"status": "pending",
"tax": 1002,
"total_tax_amounts": [
{
"amount": 1002,
"inclusive": false,
"rate": {
"display_name": "Sales Tax",
"jurisdiction": "LOS ANGELES",
"percentage": 8.25
}
}
]
}

Updates a test mode TerminalHardwareOrder object’s status as ready_to_ship.

Parameters

No parameters.

Returns

Returns a TerminalHardwareOrder object.

POST /v1/test_helpers/terminal/hardware_orders/:id/mark_ready_to_ship
cURL
curl -X POST https://api.stripe.com/v1/test_helpers/terminal/hardware_orders/thor_1Nj6mu2eZvKYlo2CRG74vB9n/mark_ready_to_ship \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "thor_1Nj6mu2eZvKYlo2CRG74vB9n",
"object": "terminal.hardware_order",
"amount": 13602,
"created": 1692995962,
"currency": "usd",
"hardware_order_items": [
{
"amount": 11800,
"currency": "usd",
"quantity": 2,
"terminal_hardware_sku": {
"id": "thsku_L5fys7HZ5o02Nc",
"amount": 450,
"country": "AT",
"currency": "eur",
"product": "thpr_MJfof7SLvdkG6T"
}
}
],
"livemode": true,
"metadata": {},
"payment_type": "monthly_invoice",
"po_number": null,
"shipment_tracking": [],
"shipping": {
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"amount": 800,
"company": "Rocket Rides",
"currency": "usd",
"email": "test@example.com",
"name": "Jenny Rosen",
"phone": "15555555555"
},
"shipping_method": "standard",
"status": "ready_to_ship",
"tax": 1002,
"total_tax_amounts": [
{
"amount": 1002,
"inclusive": false,
"rate": {
"display_name": "Sales Tax",
"jurisdiction": "LOS ANGELES",
"percentage": 8.25
}
}
],
"updated": null
}

Updates a test mode TerminalHardwareOrder object’s status as delivered.

Parameters

No parameters.

Returns

Returns a TerminalHardwareOrder object.

POST /v1/test_helpers/terminal/hardware_orders/:id/deliver
cURL
curl -X POST https://api.stripe.com/v1/test_helpers/terminal/hardware_orders/thor_1Nj6mu2eZvKYlo2CRG74vB9n/deliver \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "thor_1Nj6mu2eZvKYlo2CRG74vB9n",
"object": "terminal.hardware_order",
"amount": 13602,
"created": 1692995962,
"currency": "usd",
"hardware_order_items": [
{
"amount": 11800,
"currency": "usd",
"quantity": 2,
"terminal_hardware_sku": {
"id": "thsku_L5fys7HZ5o02Nc",
"amount": 450,
"country": "AT",
"currency": "eur",
"product": "thpr_MJfof7SLvdkG6T"
}
}
],
"livemode": true,
"metadata": {},
"payment_type": "monthly_invoice",
"po_number": null,
"shipment_tracking": [],
"shipping": {
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"amount": 800,
"company": "Rocket Rides",
"currency": "usd",
"email": "test@example.com",
"name": "Jenny Rosen",
"phone": "15555555555"
},
"shipping_method": "standard",
"status": "delivered",
"tax": 1002,
"total_tax_amounts": [
{
"amount": 1002,
"inclusive": false,
"rate": {
"display_name": "Sales Tax",
"jurisdiction": "LOS ANGELES",
"percentage": 8.25
}
}
],
"updated": null
}

Updates a test mode TerminalHardwareOrder object’s status as shipped.

Parameters

No parameters.

Returns

Returns a TerminalHardwareOrder object.

POST /v1/test_helpers/terminal/hardware_orders/:id/ship
cURL
curl -X POST https://api.stripe.com/v1/test_helpers/terminal/hardware_orders/thor_1Nj6mu2eZvKYlo2CRG74vB9n/ship \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "thor_1Nj6mu2eZvKYlo2CRG74vB9n",
"object": "terminal.hardware_order",
"amount": 13602,
"created": 1692995962,
"currency": "usd",
"hardware_order_items": [
{
"amount": 11800,
"currency": "usd",
"quantity": 2,
"terminal_hardware_sku": {
"id": "thsku_L5fys7HZ5o02Nc",
"amount": 450,
"country": "AT",
"currency": "eur",
"product": "thpr_MJfof7SLvdkG6T"
}
}
],
"livemode": true,
"metadata": {},
"payment_type": "monthly_invoice",
"po_number": null,
"shipment_tracking": [],
"shipping": {
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"amount": 800,
"company": "Rocket Rides",
"currency": "usd",
"email": "test@example.com",
"name": "Jenny Rosen",
"phone": "15555555555"
},
"shipping_method": "standard",
"status": "shipped",
"tax": 1002,
"total_tax_amounts": [
{
"amount": 1002,
"inclusive": false,
"rate": {
"display_name": "Sales Tax",
"jurisdiction": "LOS ANGELES",
"percentage": 8.25
}
}
],
"updated": null
}

Updates a test mode TerminalHardwareOrder object’s status as undeliverable.

Parameters

No parameters.

Returns

Returns a TerminalHardwareOrder object.

POST /v1/test_helpers/terminal/hardware_orders/:id/mark_undeliverable
cURL
curl -X POST https://api.stripe.com/v1/test_helpers/terminal/hardware_orders/thor_1Nj6mu2eZvKYlo2CRG74vB9n/mark_undeliverable \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "thor_1Nj6mu2eZvKYlo2CRG74vB9n",
"object": "terminal.hardware_order",
"amount": 13602,
"created": 1692995962,
"currency": "usd",
"hardware_order_items": [
{
"amount": 11800,
"currency": "usd",
"quantity": 2,
"terminal_hardware_sku": {
"id": "thsku_L5fys7HZ5o02Nc",
"amount": 450,
"country": "AT",
"currency": "eur",
"product": "thpr_MJfof7SLvdkG6T"
}
}
],
"livemode": true,
"metadata": {},
"payment_type": "monthly_invoice",
"po_number": null,
"shipment_tracking": [],
"shipping": {
"address": {
"city": "San Francisco",
"country": "US",
"line1": "1234 Main Street",
"line2": "",
"postal_code": "94111",
"state": "CA"
},
"amount": 800,
"company": "Rocket Rides",
"currency": "usd",
"email": "test@example.com",
"name": "Jenny Rosen",
"phone": "15555555555"
},
"shipping_method": "standard",
"status": "undeliverable",
"tax": 1002,
"total_tax_amounts": [
{
"amount": 1002,
"inclusive": false,
"rate": {
"display_name": "Sales Tax",
"jurisdiction": "LOS ANGELES",
"percentage": 8.25
}
}
],
"updated": null
}