# Credentials

The `MerchantData` object holds the credentials used to initialize the SDK. Pass it to the `MPOSFinix` constructor.

```kotlin
class MerchantData(
    val merchantId: String,
    val mid: String,
    val deviceId: String,
    val currency: Currency = Currency.USD,
    val env: Environment = Environment.SB,
    val userId: String,
    val password: String
)
```

| Field | Type | Description |
|  --- | --- | --- |
| `merchantId` | `String` | Your Finix Merchant ID (`MU...`). |
| `mid` | `String` | Merchant identifier number. Pass an empty string if not required. |
| `deviceId` | `String` | The Finix Device ID (`DV...`) created during [device setup](/android/card-present/device-setup). |
| `currency` | `Currency` | Transaction currency. Defaults to `Currency.USD`. |
| `env` | `Environment` | `Environment.SB` for sandbox, `Environment.PROD` for production. |
| `userId` | `String` | Your Finix user ID (`US...`). |
| `password` | `String` | Your Finix API password. |


## Creating API Credentials

Use `ROLE_MERCHANT` credentials to scope a device to a single merchant. Use `ROLE_PARTNER` credentials if the device will process payments across multiple merchants. Note that split transactions require `ROLE_PARTNER` credentials.

Once created, you can use `ROLE_MERCHANT` credentials across multiple devices as long as the devices are associated to the same Merchant.

1. Log in to the Finix dashboard.
2. Select the environment for which you would like to create API credentials (Sandbox or Live).
3. In the bottom left corner, select the **Developer** section.
4. In the API Keys section, select **Create API Key**.


## Sandbox and Production

Set `env` to match the environment your device is designated for. Devices cannot switch environments after designation.