Skip to main content

Bootstrap

POST /pos/bootstrap

The bootstrap endpoint is the first step in the POS device activation flow. It acts as a connectivity check and returns the server time and minimum supported POS app version. Call this when the POS device first powers on or connects to the network.

Purpose

  • Verify that the device can reach the VioPay API
  • Get the current server time (for clock synchronization)
  • Get the minimum supported POS app version (to enforce updates)
  • Validate that the device exists in the system (pre-provisioned)

Authentication

POS Activation Auth — requires device identification headers only. No Bearer token or signature needed.

HeaderRequiredFormatDescription
X-Device-IdYesPOS-{8_HEX_CHARS}Unique identifier for the physical POS device. Assigned when the device is pre-provisioned by a merchant or reseller. Example: POS-8F3A2C91
User-AgentYesViopay-POS/{version} ({OS}; {model})Identifies the POS app version, OS, and hardware model. Must start with Viopay-POS/. Example: Viopay-POS/1.4.2 (Android 12; PAX-A920)
X-Client-TypeYesposClient type identifier. Always set to pos for POS devices.
Prerequisites

The device must already be provisioned in the system by a merchant or reseller before calling bootstrap. The X-Device-Id must match an existing device_id in the database.

See the Headers Reference for complete details on all POS headers.

Request

No request body is required. Authentication is entirely header-based.

Response

200 OK

{
"status": "ok",
"server_time": "2025-12-13T14:25:30Z",
"min_supported_version": "1.3.5"
}
FieldTypeDescription
statusstringAlways "ok" on success
server_timestringCurrent server time in RFC3339 format
min_supported_versionstringMinimum POS app version that is supported

400 Bad Request

Returned when required headers are missing or invalid.

{
"error": {
"code": "4000",
"message": "X-Device-Id header is required",
"trace_id": "abc123..."
}
}

404 Not Found

Returned when the device ID does not exist in the system.

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

Code Examples

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

What's Next?

After a successful bootstrap, the device should proceed to generate a pairing code:

Next step → Generate Pairing Code