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.
| Area | How it uses a device |
|---|---|
| Locations | A device can be assigned to one active Location. While an active device is assigned there, the Location can't be deactivated or archived. |
| Fulfillment | A 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. |
| Settings | Settings 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 -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" }
}'
{
"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
abcandABCare different fingerprints. - 1 to 255 characters, with no leading or trailing whitespace. Any other value returns
400 INVALID_REQUESTwithparam: "hardware_fingerprint". - Set at creation.
PATCHdoesn'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.cURLcurl -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 withPOST /v1/devices. - 3
Resolve a lost race#
If the create returns
409 ALREADY_EXISTSbecause another registration got there first,PATCHthe device named indetails[0].current_resourceinstead.
Status#
status on deviceactiveIn use. You can change it withPATCH, assign it to a Location, and record it on fulfillments.archivedFinalRetired byDELETE, and final. It stays readable by ID and keeps itslocation_id, but no longer returnshardware_fingerprintand no longer blocks its Location from being deactivated or archived. Lists leave it out unlessstatusnamesarchived.PATCHreturns409 ACTION_NOT_ALLOWEDwith reasonarchived, and so does a fulfillment that setsdevice_idto 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.
{ "expected_version": 3, "location_id": null }
Scopes#
Device routes take an API key. Partner app tokens can't call them.
| Scope | Grants |
|---|---|
accounts.devices.read | Get and list devices. |
accounts.devices.write | Create, update, and archive devices, and everything the read scope allows. |
Errors#
- StatusHTTP 400CodeINVALID_
REQUEST What to doparamnames the field. Common causes are a blankname, ahardware_fingerprintthat is empty, longer than 255 characters, or padded with whitespace, a malformedlocation_id, or aPATCHwith no fields to change. - StatusHTTP 404What to doNo device with this
device_idexists in the credential's environment, orparam: "location_id"names a Location that doesn't exist. - StatusHTTP 409CodeALREADY_
EXISTS What to doAn active device holds thehardware_fingerprint.PATCHthe device indetails[0].current_resource, or look the fingerprint up first. - StatusHTTP 409What to doReason
archived: the device is archived and can't be changed. Reasonunsupported_state:location_idnames a Location that isn't active. - StatusHTTP 409What to doThe device changed since you read it. Read it again, reapply your change, and send the new
versionasexpected_versionwith a newIdempotency-Key.
Related#
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_atstringRequiredRFC3339 timestamp.
device_idstringRequiredStable identifier of the device.
hardware_fingerprintstringIdentifier 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_idstringThe Location the device is assigned to. Omitted when it has none.
merchant_idstringRequiredThe merchant that owns the device.
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
namestringRequiredName you gave the device.
statusenumRequiredWhether the device is in use or retired.
activearchived
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredStarts at 1 and goes up with each update and on archive. Send it as `expected_version` to apply an update only if nothing changed.
{
"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#
/v1/devicesRequires 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_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, 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 enumFilter 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.
activearchived
location_idstringFilter by assigned Flint location ID.
hardware_fingerprintstringExact, case-sensitive match. Archived devices release their fingerprint, so this finds at most the one active device that holds it.
sort_byenumField to sort by. Defaults to created_at; ties are broken by device_id.
namecreated_atupdated_at
sort_directionenumSort direction. Defaults to desc.
ascdesc
Response · 200
A page of devices.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
created_atstringRequiredRFC3339 timestamp.
device_idstringRequiredStable identifier of the device.
hardware_fingerprintstringIdentifier 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_idstringThe Location the device is assigned to. Omitted when it has none.
merchant_idstringRequiredThe merchant that owns the device.
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
namestringRequiredName you gave the device.
statusenumRequiredWhether the device is in use or retired.
activearchived
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredStarts at 1 and goes up with each update and on archive. Send it as `expected_version` to apply an update only if nothing changed.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier 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.
{
"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#
/v1/devicesIdempotentRequires 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_fingerprintstringStable 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_idstringAn active Location to assign the device to.
metadatamap of stringCaller-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.
namestringRequiredName 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.
dataobjectRequiredResource, collection, or operation result returned by this request.
created_atstringRequiredRFC3339 timestamp.
device_idstringRequiredStable identifier of the device.
hardware_fingerprintstringIdentifier 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_idstringThe Location the device is assigned to. Omitted when it has none.
merchant_idstringRequiredThe merchant that owns the device.
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
namestringRequiredName you gave the device.
statusenumRequiredWhether the device is in use or retired.
activearchived
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredStarts at 1 and goes up with each update and on archive. Send it as `expected_version` to apply an update only if nothing changed.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier 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#
/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_idstringRequiredFlint 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.
curl https://api.withflintpay.com/v1/devices/dev_01KEZF7C0051ZP8MZSGHP989F6 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The requested device.
{
"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#
/v1/devices/{device_id}IdempotentRequires 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_idstringRequiredFlint 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_versionintegerThe device version you last read. A different current version returns `409 VERSION_CONFLICT`.
location_idstring or nullSend null to clear it.
metadatamap of string or nullCaller-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.
namestringNew name for the device. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
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#
/v1/devices/{device_id}IdempotentRequires 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_idstringRequiredFlint 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_versionintegerOptional device version last read by the caller.
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?