Skip to content

Devices

Devices represent merchant hardware or app installations that belong to your account: a register, kiosk, or terminal app instance. A device can be assigned to one active Location, and a fulfillment can record the device that handled it.

Registering a device doesn't take payments. To take card payments, register a reader: a countertop reader or a Tap to Pay phone. A reader can name the device it takes payments for, and a device that an active reader names can't be archived.

A device has a name, an optional location_id, optional metadata, and an optional hardware_fingerprint that ties it to one piece of hardware. Each environment keeps its own devices, so a test key sees only sandbox devices; see which credential reaches which environment.

AreaHow it uses a device
LocationsA device can be assigned to one active Location. While an active device is assigned there, the Location can't be deactivated or archived.
FulfillmentA fulfillment's device_id records the device that handled it. The device must be active, and when the fulfillment also names a location_id, the device must be assigned to that Location.
SettingsSettings belong to the merchant. Devices can't override them, and assigning a device to a Location doesn't change them.

Register a device#

name is the only required field. Flint trims spaces around it, and a blank name returns 400 INVALID_REQUEST. Send an Idempotency-Key so that retrying a create that already succeeded returns the same device instead of creating another or returning a conflict.

cURL
curl -X POST https://api.withflintpay.com/v1/devices \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: register-7f3c9a2e-first-launch" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Front counter iPad",
    "hardware_fingerprint": "7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a3f70",
    "location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
    "metadata": { "register": "front_counter" }
  }'
Response
{
  "data": {
    "device_id": "dev_01K0P8B3M7Q2W5X9Z4C6V1N8RT",
    "merchant_id": "mer_01K0NZ4H8T2R6W9C3M5Q7X1B4D",
    "name": "Front counter iPad",
    "status": "active",
    "version": 1,
    "location_id": "loc_01K0P7W6A4N9F3J2T8Q5R1C6XM",
    "hardware_fingerprint": "7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a3f70",
    "metadata": { "register": "front_counter" },
    "created_at": "2026-10-28T15:04:00Z",
    "updated_at": "2026-10-28T15:04:00Z"
  },
  "request_id": "req_01K0P8B3MA7Y2F6H9J4K1N5S8V"
}

A create returns 201 with the new device in data. A location_id must name a Location in the same environment: an unknown one returns 404 RESOURCE_NOT_FOUND, and an inactive or archived one returns 409 ACTION_NOT_ALLOWED with reason unsupported_state. Both use param: "location_id".

Hardware fingerprints#

A fingerprint gives a device a stable hardware identity, such as a UUID your app generates on first launch and keeps in secure storage. It is optional, and a device without one has no uniqueness check.

  • Unique among active devices. Only one active device in a merchant's environment can hold a fingerprint.
  • Compared exactly, including case and accents, so abc and ABC are different fingerprints.
  • 1 to 255 characters, with no leading or trailing whitespace. Any other value returns 400 INVALID_REQUEST with param: "hardware_fingerprint".
  • Set at creation. PATCH doesn't accept it. To give hardware a new fingerprint, archive its device and create another.
  • Released on archive. An archived device no longer returns its fingerprint, and the same hardware can register again as a new device.

Creating a device with a fingerprint that an active device holds returns 409 ALREADY_EXISTS with param: "hardware_fingerprint", details[0].reason: "hardware_fingerprint_already_exists", and details[0].current_resource naming the existing device by resource_type and resource_id. The request changes nothing: the existing device keeps its name, Location, and metadata. When two registrations with the same fingerprint race, one creates the device and the other gets the conflict.

Register hardware again#

After an app reinstall, or any time hardware may already have a device, look it up before creating one:

  1. Look up the fingerprint#

    List devices with hardware_fingerprint. The filter takes one value, uses the same exact comparison, and returns at most the one active device that holds it.

    cURL
    curl -G https://api.withflintpay.com/v1/devices \
      -H "Authorization: Bearer YOUR_API_KEY" \
      --data-urlencode "hardware_fingerprint=7f3c9a2e-5b1d-4e8a-9c6f-2d4b8e1a3f70"
    
  2. Update the device, or create one#

    If the list returns a device, PATCH /v1/devices/{device_id} with the name, Location, and metadata you want. If it's empty, create the device with POST /v1/devices.

  3. Resolve a lost race#

    If the create returns 409 ALREADY_EXISTS because another registration got there first, PATCH the device named in details[0].current_resource instead.

Status#

status on device
Final values do not change again
  • active
    In use. You can change it with PATCH, assign it to a Location, and record it on fulfillments.
  • archivedFinal
    Retired by DELETE, and final. It stays readable by ID and keeps its location_id, but no longer returns hardware_fingerprint and no longer blocks its Location from being deactivated or archived. Lists leave it out unless status names archived. PATCH returns 409 ACTION_NOT_ALLOWED with reason archived, and so does a fulfillment that sets device_id to it.

Update or archive a device#

PATCH /v1/devices/{device_id} changes name, location_id, and metadata, alone or together. Fields you leave out keep their values, and a request that sends none of them returns 400 INVALID_REQUEST with detail code REQUIRED. name can't be null. Sending "location_id": null detaches the device from its Location without archiving it. A new location_id follows the same rules as on create.

DELETE /v1/devices/{device_id} archives the device and returns it with status: "archived". Repeating the DELETE on an archived device returns it again unchanged.

Versions#

Every device returns a version, a positive integer that starts at 1 and increases with every accepted PATCH and with archiving. To refuse a write when the device changed since you read it, send that value as expected_version: in the body for PATCH, and as a query parameter for DELETE. Both are optional. The check also runs when you repeat DELETE on an archived device. A stale value returns 409 VERSION_CONFLICT with the current version in details[0].current_version, and nothing changes.

JSON
{ "expected_version": 3, "location_id": null }

Scopes#

Device routes take an API key. Partner app tokens can't call them.

ScopeGrants
accounts.devices.readGet and list devices.
accounts.devices.writeCreate, update, and archive devices, and everything the read scope allows.

Errors#

  • HTTP 400
    param names the field. Common causes are a blank name, a hardware_fingerprint that is empty, longer than 255 characters, or padded with whitespace, a malformed location_id, or a PATCH with no fields to change.
  • HTTP 404
    No device with this device_id exists in the credential's environment, or param: "location_id" names a Location that doesn't exist.
  • HTTP 409
    An active device holds the hardware_fingerprint. PATCH the device in details[0].current_resource, or look the fingerprint up first.
  • HTTP 409
    Reason archived: the device is archived and can't be changed. Reason unsupported_state: location_id names a Location that isn't active.
  • HTTP 409
    VERSION_CONFLICTRefresh, then retry
    The device changed since you read it. Read it again, reapply your change, and send the new version as expected_version with a new Idempotency-Key.
LocationsCreate the stores and warehouses that devices are assigned to.FulfillmentRecord which Location and device handled each fulfillment.IdempotencyRetry creates and updates safely with an Idempotency-Key.

The Device object#

A device registered to the merchant account by hardware fingerprint, optionally assigned to a location. Registering a device doesn't take payments; a reader does.

Returned by GET /v1/devices/{device_id} and carried by the endpoints below.

Attributes

created_atstringRequired

RFC3339 timestamp.

device_idstringRequired

Stable identifier of the device.

hardware_fingerprintstring

Identifier of the physical hardware, compared exactly. Only one active device can hold a fingerprint. Archiving the device releases it, so the field is omitted on archived devices and a new device can register the same hardware.

location_idstring

The Location the device is assigned to. Omitted when it has none.

merchant_idstringRequired

The merchant that owns the device.

metadatamap of string

Stored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.

namestringRequired

Name you gave the device.

statusenumRequired

Whether the device is in use or retired.

  • active
  • archived
updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Starts at 1 and goes up with each update and on archive. Send it as `expected_version` to apply an update only if nothing changed.

JSON
{
  "created_at": "2026-03-17T14:30:00Z",
  "device_id": "dev_01KEZF7C00ZRD9DNGWFJYRA9NF",
  "hardware_fingerprint": "ios-device-uuid-123",
  "location_id": "loc_01KEZF7C00G0VBJJ8VMFCQ5YVG",
  "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
  "metadata": {
    "register": "front_counter"
  },
  "name": "Front Counter iPad",
  "status": "active",
  "updated_at": "2026-03-17T14:30:00Z",
  "version": 1
}

List devices#

GET/v1/devices

Requires scope accounts.devices.read or accounts.devices.write

Rate limit: read

Returns a paginated list of devices for the authenticated merchant. Default order: created_at descending, then device_id descending.

Query parameters

page_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.

statusarray of enum

Filter by status. Omitted, the list leaves out archived rows; name archived to include them. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.

  • active
  • archived
location_idstring

Filter by assigned Flint location ID.

hardware_fingerprintstring

Exact, case-sensitive match. Archived devices release their fingerprint, so this finds at most the one active device that holds it.

sort_byenum

Field to sort by. Defaults to created_at; ties are broken by device_id.

  • name
  • created_at
  • updated_at
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc

Response · 200

A page of devices.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl https://api.withflintpay.com/v1/devices \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

A page of devices.

JSON
{
  "data": [
    {
      "created_at": "2026-03-17T14:30:00Z",
      "device_id": "dev_01KEZF7C00ZRD9DNGWFJYRA9NF",
      "hardware_fingerprint": "ios-device-uuid-123",
      "location_id": "loc_01KEZF7C00G0VBJJ8VMFCQ5YVG",
      "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
      "metadata": {
        "register": "front_counter"
      },
      "name": "Front Counter iPad",
      "status": "active",
      "updated_at": "2026-03-17T14:30:00Z",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM63GYXSJ2TZ4DZAVYNM9YT"
}

Create device#

POST/v1/devicesIdempotent

Requires scope accounts.devices.write

Rate limit: write

Creates a device. If an active device already has the hardware_fingerprint, fails with `ALREADY_EXISTS` and reason `hardware_fingerprint_already_exists`, and changes nothing. The details[0].current_resource field names the existing device.

Request body

hardware_fingerprintstring

Stable hardware identity. Must have no leading or trailing whitespace and is compared exactly, including case and accents. Only one active device in this merchant and environment can hold it.

location_idstring

An active Location to assign the device to.

metadatamap of string

Caller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.

namestringRequired

Name for the device, such as Front register. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

Response · 201

The created device.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl -X POST https://api.withflintpay.com/v1/devices \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "hardware_fingerprint": "ios-device-uuid-123",
    "location_id": "loc_01KEZF7C00G0VBJJ8VMFCQ5YVG",
    "metadata": {
      "register": "front_counter"
    },
    "name": "Front Counter iPad"
  }'

Get device#

GET/v1/devices/{device_id}

Requires scope accounts.devices.read or accounts.devices.write

Rate limit: read

Returns a single device by ID.

Path parameters

device_idstringRequired

Flint device ID. Must be a valid ID with prefix dev_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

The requested device.

Same response as Create device.

curl https://api.withflintpay.com/v1/devices/dev_01KEZF7C0051ZP8MZSGHP989F6 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

The requested device.

JSON
{
  "data": {
    "created_at": "2026-03-17T14:30:00Z",
    "device_id": "dev_01KEZF7C00ZRD9DNGWFJYRA9NF",
    "hardware_fingerprint": "ios-device-uuid-123",
    "location_id": "loc_01KEZF7C00G0VBJJ8VMFCQ5YVG",
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "metadata": {
      "register": "front_counter"
    },
    "name": "Front Counter iPad",
    "status": "active",
    "updated_at": "2026-03-17T14:30:00Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6CB1VJ7BAVH9C4VRQDBD8"
}

Update device#

PATCH/v1/devices/{device_id}Idempotent

Requires scope accounts.devices.write

Rate limit: write

Applies a sparse update to a device. Send null to clear location_id or all metadata. The name field cannot be null. Archived devices return ACTION_NOT_ALLOWED with reason archived and current_status archived.

Path parameters

device_idstringRequired

Flint device ID. Must be a valid ID with prefix dev_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

The device version you last read. A different current version returns `409 VERSION_CONFLICT`.

location_idstring or null

Send null to clear it.

metadatamap of string or null

Caller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API. This operation also limits the metadata object you send, before merging: at most 50 keys, counting null deletions, each key 1 to 256 Unicode code points, and at most 32768 UTF-8 bytes of keys plus values.

namestring

New name for the device. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

Response · 200

The updated device.

Same response as Create device.

curl -X PATCH https://api.withflintpay.com/v1/devices/dev_01KEZF7C0051ZP8MZSGHP989F6 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1,
    "metadata": {
      "floor": "1",
      "register": "front_counter"
    },
    "name": "Front Counter iPad 2"
  }'

Delete device#

DELETE/v1/devices/{device_id}Idempotent

Requires scope accounts.devices.write

Rate limit: write

Archives a device and releases its hardware_fingerprint for reuse. The archived device no longer returns hardware_fingerprint. A device that an active reader names returns `409 RESOURCE_IN_USE` with those readers in `blocking_resources`: archive them or clear their `device_id` first.

Path parameters

device_idstringRequired

Flint device ID. Must be a valid ID with prefix dev_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Query parameters

expected_versioninteger

Optional device version last read by the caller.

Response · 200

The archived device.

Same response as Create device.

curl -X DELETE https://api.withflintpay.com/v1/devices/dev_01KEZF7C0051ZP8MZSGHP989F6 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Was this helpful?