Appearance
Props
The AuthentifiedButton is a discriminated union driven by the scope prop. The required props depend on whether you're consigning a single line item (scope="lineItem"), a whole order (scope="order"), or a POS / in-person sale (scope="offline").
source is independent of scope — it tells Authentified how the shop integrates so the right backend tables are scanned. A Shopify App shop can still sell offline; a REST API shop can still consign a whole order.
Common props
These are required on every AuthentifiedButton, regardless of scope.
| Prop | Type | Default | Description |
|---|---|---|---|
scope | "lineItem" | "order" | "offline" | — | Required. What's being consigned: "lineItem" for one item per button, "order" for the whole order, "offline" for a POS / in-person sale. |
shopId | string | number | — | The Authentified shop ID that owns the order. |
customerId | string | number | — | The ID of the customer associated with the order. |
source | "shopify" | "api" | — | Required. How the shop integrates with Authentified. "shopify" for shops that have installed the Authentified Shopify App, "api" for shops integrating directly with the Authentified REST API. |
When scope="lineItem"
Line-item buttons require an orderId and a lineItemId. productId is optional. The rules are the same for source="shopify" and source="api".
| Prop | Type | Required | Description |
|---|---|---|---|
orderId | string | number | yes | The ID of the order containing the item. |
lineItemId | string | number | yes | The line item ID for the item being consigned. |
productId | string | number | no | The ID of the product associated with the line item. |
When scope="order"
Order-level buttons require an orderId and forbid all item-level props. The customer picks which items to consign on the Authentified flow.
| Prop | Type | Required | Description |
|---|---|---|---|
orderId | string | number | yes | The ID of the order being consigned. |
productId | — | — | Must not be supplied. TypeScript rejects it at order scope. |
lineItemId | — | — | Must not be supplied. TypeScript rejects it at order scope. |
variantId | — | — | Must not be supplied. TypeScript rejects it at order scope. |
When scope="offline"
Offline buttons cover POS / in-person sales that have no online order. They require an orderId (your POS / receipt reference) and a variantId. productId is optional.
| Prop | Type | Required | Description |
|---|---|---|---|
orderId | string | number | yes | Your POS / receipt reference (receipt number, transaction ID, etc.). |
variantId | string | number | yes | Variant ID for the purchased item. |
productId | string | number | no | The ID of the product associated with the line item. |
lineItemId | — | — | Must not be supplied. TypeScript rejects it at offline scope. |