> ## Documentation Index
> Fetch the complete documentation index at: https://vas-partner-api-docs.finpaytech.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Login, Refresh, and Bearer Access Tokens for Merchant Integrators

## Login

```http theme={null}
POST https://vas.finpaytech.co/business-api/api/v1/auth/login
Content-Type: application/json

{
  "email": "merchant@example.com",
  "password": "your-password"
}
```

```json theme={null}
{
  "accessToken": "<access-token>",
  "refreshToken": "<refresh-token>",
  "tokenType": "Bearer",
  "user": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "email": "merchant@example.com",
    "firstName": "Ada",
    "lastName": "Mwangi",
    "role": "PLAIN_MERCHANT",
    "merchantId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "subMerchantId": null,
    "active": true
  }
}
```

Send `accessToken` on every later request:

```http theme={null}
Authorization: Bearer <access-token>
```

Merchant collection APIs require `PLAIN_MERCHANT` or `SUPER_MERCHANT` (list/read also allows `MERCHANT_USER`).

Use **Try it** on Login in the API Reference tab.

## Refresh

```http theme={null}
POST https://vas.finpaytech.co/business-api/api/v1/auth/refresh
Content-Type: application/json

{
  "refreshToken": "<refresh-token>"
}
```

The response shape matches login.

## Logout

```http theme={null}
POST https://vas.finpaytech.co/business-api/api/v1/auth/logout
Content-Type: application/json

{
  "refreshToken": "<refresh-token>"
}
```

Returns `204`.

## Current User

```http theme={null}
GET https://vas.finpaytech.co/business-api/api/v1/auth/me
Authorization: Bearer <access-token>
```
