# Device Setup

Before connecting the SDK to a PAX D135, you must create a Device resource in Finix and activate it.

## API Credentials

The Finix API credentials you use with the SDK must have the appropriate role:

- `ROLE_MERCHANT` — for single-merchant devices. Recommended for dedicated point-of-sale hardware.
- `ROLE_PARTNER` — required for multi-merchant devices and split transactions.


## Create a Device

Send a POST request to create a Device under the target Merchant. Set `model` to `PAX_D135` and include the physical serial number printed on the device.


```shell
curl -i -X POST \
  -u {your_api_key}:{your_api_secret} \
  https://finix.sandbox-payments-api.com/merchants/{merchant_id}/devices \
  -H 'Accept: application/hal+json' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "Cashier Three",
    "model": "PAX_D135",
    "name": "My PAX_D135 Finix Device",
    "serial_number": "19046260947"
  }'
```

Copy the `id` field from the response. This is the `deviceId` value you supply in [Credentials](/ios/card-present/credentials).

Finding the serial number with the SDK
If you don't have the serial number on hand, you can discover it using the SDK. Call `finixClient.startScan()` and implement `FinixDelegate.didDiscoverDevice(_:)` — the `DeviceInfo` object includes the device's serial number. See [Installation & Initialization](/ios/card-present/installation) for the scan and connect flow.

## Activate a Device

Send a PUT request with `"action": "ACTIVATE"` to enable the device. A successful response returns `enabled: true`.


```shell
curl -i -X PUT \
  -u {your_api_key}:{your_api_secret} \
  https://finix.sandbox-payments-api.com/devices/{device_id} \
  -H 'Accept: application/hal+json' \
  -H 'Content-Type: application/json' \
  -H 'Finix-Version: 2022-02-01' \
  -d '{
    "action": "ACTIVATE"
  }'
```

Set Up Device on Dashboard
Devices can also be created and activated directly in the Finix Dashboard. The API steps above are only required if you prefer to manage devices programmatically.