> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://beta-docs.payabli.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server.

# Manage cloud devices

Use Payabli's device management functions to register, unregister, and list cloud devices. This guide covers the key operations for managing devices through the API.

## Register a device

Send a POST request to `/api/Cloud/register/{paypointId}` to register a new cloud device. See the [API reference](/api-reference/cloud/register-cloud-device) for this endpoint for full documentation.

> **Tip**
>
> If you're setting up a PAX A920 device, check out the [PAX A920 Setup Guide](/developer-guides/devices-pax-a920-setup) for more detailed instructions.

The registration code you need varies depending on your device. For an Ingenico device, you need the activation code that appears on the screen after you configure WiFi. For a PAX A920 device, you need the serial number on the back of the device.

This example registers the device with the registration code `YS7DS5` to the `8cfec329267` paypoint, and gives it the description of "Front Desk POS".

### Request

POST [https://api-sandbox.payabli.com/api/Cloud/register/\{entry}](https://api-sandbox.payabli.com/api/Cloud/register/\{entry})

**`Register`**

```curl Register
curl -X POST https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267 \
     -H "requestToken: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "description": "Front Desk POS",
  "registrationCode": "YS7DS5"
}'
```

**`Register`**

```python Register
import requests

url = "https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267"

payload = {
    "description": "Front Desk POS",
    "registrationCode": "YS7DS5"
}
headers = {
    "requestToken": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

**`Register`**

```javascript Register
const url = 'https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267';
const options = {
  method: 'POST',
  headers: {requestToken: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"description":"Front Desk POS","registrationCode":"YS7DS5"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`Register`**

```go Register
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267"

	payload := strings.NewReader("{\n  \"description\": \"Front Desk POS\",\n  \"registrationCode\": \"YS7DS5\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("requestToken", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`Register`**

```ruby Register
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["requestToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"description\": \"Front Desk POS\",\n  \"registrationCode\": \"YS7DS5\"\n}"

response = http.request(request)
puts response.read_body
```

**`Register`**

```java Register
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267")
  .header("requestToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"description\": \"Front Desk POS\",\n  \"registrationCode\": \"YS7DS5\"\n}")
  .asString();
```

**`Register`**

```php Register
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267', [
  'body' => '{
  "description": "Front Desk POS",
  "registrationCode": "YS7DS5"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

**`Register`**

```csharp Register
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267");
var request = new RestRequest(Method.POST);
request.AddHeader("requestToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"description\": \"Front Desk POS\",\n  \"registrationCode\": \"YS7DS5\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

**`Register`**

```swift Register
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "description": "Front Desk POS",
  "registrationCode": "YS7DS5"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

A successful registration returns a response with the device ID in the body.

### Response (200)

```json
{
  "isSuccess": true,
  "responseData": "6c361c7d-674c-44cc-b790-382b75d1xxx",
  "responseText": "Success"
}
```

## List devices

Send a GET request to `/api/Cloud/list/{paypointId}` to retrieve a list of registered devices for a paypoint. See the [API reference](/api-reference/cloud/list-registered-devices-in-cloud) for this endpoint for full documentation.

This example lists devices for the `8cfec329267` paypoint.

### Request

GET [https://api-sandbox.payabli.com/api/Cloud/list/\{entry}](https://api-sandbox.payabli.com/api/Cloud/list/\{entry})

**`ListDevices`**

```curl ListDevices
curl https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267 \
     -H "requestToken: <apiKey>"
```

**`ListDevices`**

```python ListDevices
import requests

url = "https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267"

headers = {"requestToken": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

**`ListDevices`**

```javascript ListDevices
const url = 'https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267';
const options = {method: 'GET', headers: {requestToken: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`ListDevices`**

```go ListDevices
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("requestToken", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`ListDevices`**

```ruby ListDevices
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["requestToken"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

**`ListDevices`**

```java ListDevices
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267")
  .header("requestToken", "<apiKey>")
  .asString();
```

**`ListDevices`**

```php ListDevices
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

**`ListDevices`**

```csharp ListDevices
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267");
var request = new RestRequest(Method.GET);
request.AddHeader("requestToken", "<apiKey>");
IRestResponse response = client.Execute(request);
```

**`ListDevices`**

```swift ListDevices
import Foundation

let headers = ["requestToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Cloud/list/8cfec329267")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

This request returns a list of devices registered to the paypoint.

### Response (200)

```json
{
  "isSuccess": true,
  "responseList": [
    {
      "connected": true,
      "dateRegistered": "2024-03-05T15:56:04Z",
      "deviceId": "36103e24-41d8-47c9-b5f7-119f0000000",
      "deviceNickName": "Front Desk POS",
      "make": "ingenico",
      "model": "LK2500",
      "registered": true,
      "serialNumber": "312345692080000000"
    }
  ],
  "responseText": "Success"
}
```

## Unregister a device

Send a DELETE request to `/api/Cloud/register/{paypointId}/{deviceId}` to remove a device registration. See the [API reference](/api-reference/cloud/unregister-cloud-device) for this endpoint for full documentation.

This example unregisters the device with the deviceId `6c361c7d-674c-44cc-b790-382b75d1xxx` from the `8cfec329267` paypoint.

### Request

DELETE [https://api-sandbox.payabli.com/api/Cloud/register/\{entry}/\{deviceId}](https://api-sandbox.payabli.com/api/Cloud/register/\{entry}/\{deviceId})

**`Unregister`**

```curl Unregister
curl -X DELETE https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx \
     -H "requestToken: <apiKey>"
```

**`Unregister`**

```python Unregister
import requests

url = "https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx"

headers = {"requestToken": "<apiKey>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

**`Unregister`**

```javascript Unregister
const url = 'https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx';
const options = {method: 'DELETE', headers: {requestToken: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**`Unregister`**

```go Unregister
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("requestToken", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

**`Unregister`**

```ruby Unregister
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["requestToken"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

**`Unregister`**

```java Unregister
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx")
  .header("requestToken", "<apiKey>")
  .asString();
```

**`Unregister`**

```php Unregister
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

**`Unregister`**

```csharp Unregister
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx");
var request = new RestRequest(Method.DELETE);
request.AddHeader("requestToken", "<apiKey>");
IRestResponse response = client.Execute(request);
```

**`Unregister`**

```swift Unregister
import Foundation

let headers = ["requestToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

A successful operation returns a 200 response with the device ID in the body.

### Response (200)

```json
{
  "isSuccess": true,
  "responseData": "6c361c7d-674c-44cc-b790-382b75d1xxx",
  "responseText": "Success"
}
```