# 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"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sensepass.com/sensepay/transaction-api/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
