Skip to main content

Status

GET /pos/status

Checks whether a POS device has been claimed by a merchant after generating a pairing code. The POS device should poll this endpoint at regular intervals (e.g., every 3–5 seconds) until the device is claimed or the pairing code expires. This is the third step in the POS activation flow.

Purpose

  • Check the current device status (inactive, claimed, activated)
  • Determine if the pairing code has been used, is still pending, or has expired
  • The POS device uses this to know when to proceed to the attestation step

Authentication

POS Activation Auth — device identification headers only.

HeaderRequiredFormatDescription
X-Device-IdYesPOS-{8_HEX_CHARS}Unique identifier for the physical POS device. Must match a pre-provisioned device. Example: POS-8F3A2C91
User-AgentYesViopay-POS/{version} ({OS}; {model})POS app version string. Must start with Viopay-POS/. Example: Viopay-POS/1.4.2 (Android 12; PAX-A920)
X-Client-TypeYesposClient type identifier. Always pos for POS devices.

See the Headers Reference for complete details.

Request

No request body or query parameters required.

Response

200 OK

{
"device_status": "claimed",
"is_claimed": true,
"pairing_code_status": "used"
}
FieldTypeDescription
device_statusstringCurrent device status: inactive, claimed, or activated
is_claimedbooleantrue if the device has been claimed by a merchant
pairing_code_statusstringStatus of the latest pairing code (see table below)

Pairing Code Statuses:

StatusMeaning
pendingCode is active, waiting for merchant to enter it
usedMerchant has entered the code — device is claimed
expiredCode expired (5 min passed) — generate a new one
noneNo pairing code has been generated for this device
Polling Strategy

Poll every 3–5 seconds while pairing_code_status is "pending". Once is_claimed becomes true, stop polling and proceed to attestation. If pairing_code_status becomes "expired", generate a new pairing code.

404 Not Found

{
"error": {
"code": "4004",
"message": "Device not found",
"details": {
"device_id": "POS-UNKNOWN"
},
"trace_id": "abc123..."
}
}

Code Examples

curl -X GET https://api.viopay.io/pos/status \
-H "X-Device-Id: POS-8F3A2C91" \
-H "User-Agent: Viopay-POS/1.4.2 (Android 12; PAX-A920)" \
-H "X-Client-Type: pos"

What's Next?

Once is_claimed is true, the POS device should proceed to attest its identity. But first, the merchant must claim the device via the web portal:

Merchant step → Claim Device (web portal)

POS next step → Attest