# Authentication

Multiple authentication options are available, based on your use case:

#### POS

Authentication fields: **deviceId**

Only one field is required for authentication - deviceId, this field represents the unique identifier of the POS in SensePass network.

Device ID can be generated using the "match" API (Pairing) or using SensePass Partner platform.

#### E-Commerce Location API key

Authentication fields: **apiKey**

Location API key identifies the merchant and the location, Location API key is the recommended option for e-commerce.

#### E-Commerce Merchant API key (Deprecated)

Authentication fields: **apiKey + branchNumber**

Merchant API key requires branchId field to be provided.

## Creating Authentication Keys

All of the keys types can be generated using our API or using or Partners Dashboard:

1. Location API key: Developer -> Branch API -> New
2. Merchant API Key: Developer -> Merchant API -> New
3. Device Id: POS/Register -> New

## Examples

### DeviceId Authentication

URL: **/transactions/init**

Request Body:

```json
{
  "deviceId": "2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm"
}
```

### Merchant API Key Authentication

URL: **/transactions/init**

Request Body:

```json
{
  "apiKey": "hjfkf942tiwgkf4w89253rhfgdjnkkf9823qrndcsg",
  "branchNumber": "12"
}
```

### Location API Key Authentication

URL: **/transactions/init**

Request Body:

```json
{
  "apiKey": "hg8t9wwtgehdfjk394oitrjgknfgfknglfsfs43213vbnhf"
}
```
