Order Terminals
Overview
Component to render a form for terminal order requests.
Usage
<justifi-order-terminals
business-id="biz_456"
account-id="acc_123"
auth-token="wct_terminals"
/>
Props, Events & Methods
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
account-id | string | Yes | — | |
auth-token | string | Yes | — | |
business-id | string | Yes | — | |
shipping | boolean | No | false | |
submit-button-text | string | No | 'Submit Order' |
Events
submit-event: Fires when an order is placed; includes order ID and device list.error-event: Emits network or validation errors.
Authorization
Authorization is performed by passing a web component token as auth-token.
- Web Component Token: These tokens are generated by your backend services using the Web Component Tokens API. Each token can be scoped to perform a set number of actions and is active for 60 minutes. When creating a web component token for this specific component you'll need to use the roles:
read:business:business_idandwrite:account:account_id. Make sure the values forbusiness_idandaccount_idmatch the props you also pass separately.
Theming & Layout
| Part | Description | DOM target |
|---|---|---|
::part(buttonPrimary) | — | |
::part(heading4) | — | |
::part(heading5) | — | |
::part(text) | — | |
::part(skeleton) | — | |
::part(buttonLink) | — | |
::part(card) | — | |
::part(image) | — | |
::part(tooltip) | — | |
::part(tooltipIcon) | — | |
::part(tooltipInner) | — |
Usage Example
<!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@6.14.5/dist/webcomponents/webcomponents.esm.js"
></script>
<script
nomodule
src="https://cdn.jsdelivr.net/npm/@justifi/webcomponents@6.14.5/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>