---
id: order-terminals
title: Order Terminals
description: Guided purchasing flow for ordering in-person terminals and accessories.
sidebar_position: 50
---

import {
  CodeBlock,
  PropsMarkdownTable,
  PartsMarkdownTable,
  getPropsFromDocs,
  getComponentParts,
  getWebcomponentsVersion,
  ComponentBox,
  setUpMocks,
} from '../helpers';
import docsJson from '../docs.json';
import componentTreeJson from '../component-tree.json';
import '@justifi/webcomponents/dist/module/justifi-order-terminals';

{setUpMocks()}

## Overview

Component to render a form for terminal order requests.

## Usage

<CodeBlock>{`<justifi-order-terminals
  business-id="biz_456"
  account-id="acc_123"
  auth-token="wct_terminals"
/>`}</CodeBlock>

## Props, Events & Methods

<PropsMarkdownTable
  props={getPropsFromDocs('justifi-order-terminals', docsJson)}
/>

### Events

- `submit-event`: Fires when an order is placed; includes order ID and device list.
- `error-event`: Emits network or validation errors.

## Theming & Layout

<PartsMarkdownTable
  parts={getComponentParts('justifi-order-terminals', componentTreeJson)}
/>

# Usage Example

---

<ComponentBox>
  <justifi-order-terminals
    business-id="biz_123"
    account-id="acc_123"
    auth-token="123abc"
  />
</ComponentBox>

---

<CodeBlock>{`<!DOCTYPE html>
<html dir="ltr" lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
  <title>justifi-order-terminals</title>

<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@justifi/webcomponents@${getWebcomponentsVersion()}/dist/webcomponents/webcomponents.esm.js"
></script>

<script
  nomodule
  src="https://cdn.jsdelivr.net/npm/@justifi/webcomponents@${getWebcomponentsVersion()}/dist/webcomponents/webcomponents.js"
></script>

  <style>
      ::part(font-family) {
        font-family: georgia;   
      }
        
      ::part(color) {
        color: darkslategray;
      }

      ::part(background-color) {
        background-color: transparent;
      }
    </style>

</head>

<body>
  <justifi-order-terminals
    business-id="biz_123"
    account-id="acc_123"
    auth-token="authToken"
  />
</body>

<script>
  (function () {
    const orderTerminals = document.querySelector('justifi-order-terminals');

    orderTerminals.addEventListener('error-event', (event) => {
      // here is where you would handle the error
      console.error('error-event', event.detail);
    });

    orderTerminals.addEventListener('submit-event', (event) => {
      // here is where you would handle the submit event
      console.log('submit-event', event.detail);
    });
  })();
</script>

</html>`}</CodeBlock>
