Skip to content

Add fiscalDeviceIdentifier to the POS Device API - #4682

Draft
shopifyzach wants to merge 1 commit into
Shopify:2026-10-rcfrom
shopifyzach:zm/pos-device-fiscal-device-identifier
Draft

Add fiscalDeviceIdentifier to the POS Device API#4682
shopifyzach wants to merge 1 commit into
Shopify:2026-10-rcfrom
shopifyzach:zm/pos-device-fiscal-device-identifier

Conversation

@shopifyzach

Copy link
Copy Markdown

Background

Some countries require every POS installation acting as a cash register to be registered with the tax authority under a Shopify-assigned register identifier (for example, Sweden's manufacturing number / tillverkningsnummer), and fiscal compliance extensions must stamp that identifier on every receipt, journal entry, and report — including while the device is offline.

The GraphQL Admin API exposes this value as PointOfSaleDevice.fiscalDeviceIdentifier (API version 2026-10). Today the only way for a POS UI extension to read it is shopify.session.deviceId → build a GID → query pointOfSaleDevice(id:) via the Direct API. That path is online-only, requires an Admin API access scope, costs a network round-trip before the first fiscal receipt can print, and couples the extension to two API versions.

Solution

Adds an optional, static property to the POS Device API:

shopify.device.fiscalDeviceIdentifier?: string;
  • Lives on device alongside name and registerName, which already mirrors the Admin API's PointOfSaleDevice.handle — same class of Shopify-assigned device identity data. session describes who/where (shop, user, location, staff); device describes the hardware.
  • Same name as the Admin API field, because it is the same value — developers can correlate it across surfaces.
  • Static string rather than a signal: it doesn't change for the lifetime of a device registration (same as registerName).
  • undefined when the device's location doesn't require fiscal device registration. Only available on API version 2026-10 and later; the host exposes it version-gated (same approach as session.deviceId).

Companion changes: the extensibility host devicePlugin reads it from the POS domain bridge and exposes it for 2026-10+; POS Mobile supplies the value it already holds locally after device registration.

Docs generate from the JSDoc; the checked-in generated_docs_data_v2.json is regenerated in the usual docs(pos): generate … PR rather than here.

🎩

  • yarn type-check ✅ · eslint + prettier on the touched files ✅
  • The ui-extensions-tester POS factories don't need a change: the property is optional and the default mock device isn't in a fiscal-registration country.
  • End-to-end: once the host plugin and POS Mobile changes ship, an extension on api_version = "2026-10" running on a POS device at a Swedish location reads shopify.device.fiscalDeviceIdentifier (e.g. "SH-9IX-7"); on any other device it is undefined; on 2026-07 and earlier the property is absent.

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

Assisted-By: devx/1708ff34-a106-41ca-9351-71084c02cdf4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant