Pair Mobile Companion Device
curl --request POST \
--url https://{brand_domain}/api/mobile/v1/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pairing_code": "482931",
"device_id": "358291039201921",
"device_name": "Samsung SM-G991B",
"app_version": "v1.2.4",
"platform": "android"
}
'import requests
url = "https://{brand_domain}/api/mobile/v1/devices"
payload = {
"pairing_code": "482931",
"device_id": "358291039201921",
"device_name": "Samsung SM-G991B",
"app_version": "v1.2.4",
"platform": "android"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pairing_code: '482931',
device_id: '358291039201921',
device_name: 'Samsung SM-G991B',
app_version: 'v1.2.4',
platform: 'android'
})
};
fetch('https://{brand_domain}/api/mobile/v1/devices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{brand_domain}/api/mobile/v1/devices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pairing_code' => '482931',
'device_id' => '358291039201921',
'device_name' => 'Samsung SM-G991B',
'app_version' => 'v1.2.4',
'platform' => 'android'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{brand_domain}/api/mobile/v1/devices"
payload := strings.NewReader("{\n \"pairing_code\": \"482931\",\n \"device_id\": \"358291039201921\",\n \"device_name\": \"Samsung SM-G991B\",\n \"app_version\": \"v1.2.4\",\n \"platform\": \"android\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{brand_domain}/api/mobile/v1/devices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pairing_code\": \"482931\",\n \"device_id\": \"358291039201921\",\n \"device_name\": \"Samsung SM-G991B\",\n \"app_version\": \"v1.2.4\",\n \"platform\": \"android\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{brand_domain}/api/mobile/v1/devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pairing_code\": \"482931\",\n \"device_id\": \"358291039201921\",\n \"device_name\": \"Samsung SM-G991B\",\n \"app_version\": \"v1.2.4\",\n \"platform\": \"android\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"device_uuid": "b810d1c8-bc1e-4df1-b2f4-83b9c9d2b2f4",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.refresh...",
"aes_key": "YTI4MzkxOGQyNzM4MTk4MmFjOTIzYjg5...",
"expires_in": 86400
}
}{
"success": false,
"error": "Invalid pairing code",
"errors": [
{
"code": "INVALID_PAIRING_CODE",
"message": "Invalid pairing code",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}{
"success": false,
"error": "Invalid pairing code",
"errors": [
{
"code": "INVALID_PAIRING_CODE",
"message": "Invalid pairing code",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}Pair Mobile Companion Device
Pairs a new physical mobile device running the companion app with a merchant brand profile. Requires a valid numeric pairing code generated from the brand admin dashboard and a unique hardware device identifier. On success, returns the encryption key (AES-256 key) used for local message storage, short-lived JWT access token, and long-lived refresh token.
POST
/
api
/
mobile
/
v1
/
devices
Pair Mobile Companion Device
curl --request POST \
--url https://{brand_domain}/api/mobile/v1/devices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pairing_code": "482931",
"device_id": "358291039201921",
"device_name": "Samsung SM-G991B",
"app_version": "v1.2.4",
"platform": "android"
}
'import requests
url = "https://{brand_domain}/api/mobile/v1/devices"
payload = {
"pairing_code": "482931",
"device_id": "358291039201921",
"device_name": "Samsung SM-G991B",
"app_version": "v1.2.4",
"platform": "android"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pairing_code: '482931',
device_id: '358291039201921',
device_name: 'Samsung SM-G991B',
app_version: 'v1.2.4',
platform: 'android'
})
};
fetch('https://{brand_domain}/api/mobile/v1/devices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{brand_domain}/api/mobile/v1/devices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pairing_code' => '482931',
'device_id' => '358291039201921',
'device_name' => 'Samsung SM-G991B',
'app_version' => 'v1.2.4',
'platform' => 'android'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{brand_domain}/api/mobile/v1/devices"
payload := strings.NewReader("{\n \"pairing_code\": \"482931\",\n \"device_id\": \"358291039201921\",\n \"device_name\": \"Samsung SM-G991B\",\n \"app_version\": \"v1.2.4\",\n \"platform\": \"android\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{brand_domain}/api/mobile/v1/devices")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pairing_code\": \"482931\",\n \"device_id\": \"358291039201921\",\n \"device_name\": \"Samsung SM-G991B\",\n \"app_version\": \"v1.2.4\",\n \"platform\": \"android\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{brand_domain}/api/mobile/v1/devices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pairing_code\": \"482931\",\n \"device_id\": \"358291039201921\",\n \"device_name\": \"Samsung SM-G991B\",\n \"app_version\": \"v1.2.4\",\n \"platform\": \"android\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"device_uuid": "b810d1c8-bc1e-4df1-b2f4-83b9c9d2b2f4",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.refresh...",
"aes_key": "YTI4MzkxOGQyNzM4MTk4MmFjOTIzYjg5...",
"expires_in": 86400
}
}{
"success": false,
"error": "Invalid pairing code",
"errors": [
{
"code": "INVALID_PAIRING_CODE",
"message": "Invalid pairing code",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}{
"success": false,
"error": "Invalid pairing code",
"errors": [
{
"code": "INVALID_PAIRING_CODE",
"message": "Invalid pairing code",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The 6-digit numeric pairing code displayed on the merchant settings dashboard.
Example:
"482931"
Hardware identifier unique to the companion device.
Example:
"358291039201921"
Example:
"Samsung SM-G991B"
Example:
"v1.2.4"
Available options:
android, ios Example:
"android"
Last modified on July 12, 2026
Related topics
List Paired Companion DevicesRevoke Paired DeviceList Companion App NotificationsRetrieve Device Connection StatusSystem Health CheckWas this page helpful?
⌘I