API references

Connect a device with a temporary challenge

Connect a device to the terminal that owns the given 8-digit temporary challenge. The code must be unexpired. On success the device is bound, the temporary challenge is cleared, and the response holds the merchant ID, the terminal ID and a fresh API key token (prefixed with reservepay_).

If the terminal is already bound to a different device, ALREADY_CONNECTED is returned. If it is bound to the same device, the previous key is revoked and a new one is issued.

If the terminal is disabled, NOT_ENABLED is returned.

If the terminal has no installation linked, NOT_CONFIGURED is returned.

Endpoint signature
POST https://api.reservepay.com/terminals/connect-device-by-code HTTP/1.1
Content-Type: application/json
Accept: application/json
{
code: string,
device_id: string,
}
Returns: object
New to Reservepay? Read our guide on how to call endpoints to get started.
Request arguments
code string

Required. 8-digit temporary challenge for the terminal.

device_id string

Required. Device UUID generated on device.

Response attributes
Attribute Description
merchant_id
string

Always present. The merchant ID this terminal belongs to.

terminal_id
string

Always present. Terminal ID (trm_…) the device is connected to.

key
string

Always present. API key token for this device, prefixed with reservepay_.

Errors specific to this endpoint
ALREADY_CONNECTED

The terminal is connected to another device.

INVALID_CHALLENGE

The code is unknown or has expired.

NOT_ENABLED

The terminal exists but is disabled; enable it before connecting a device.

NOT_CONFIGURED

The terminal has no installation linked; assign an installation first.

Errors common to all endpoints
UNHANDLED_ERROR

Raised when the server encounters an unexpected internal error.

INVALID_ARGUMENTS

Raised when the request contains invalid or missing parameters.

BAD_VERSION

Raised when requesting an unsupported or deprecated API version.