## List pay system handlers

`GET /v1/pay-systems/handlers`

Choose a registered REST handler when creating a pay system in your Bitrix24 account.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/pay-systems/handlers" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/pay-systems/handlers" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/pay-systems/handlers', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await response.json()
console.log(data)
```

### JavaScript — OAuth application

```javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/pay-systems/handlers', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data, meta } = await response.json()
console.log(data)
```

## Response fields

| Field | Type | Required | Description |
|---|---|---|---|
| `success` | boolean | yes | `true` for a successful request |
| `data` | array | yes | List of registered REST handlers for pay systems |
| `data[].id` | integer | no | Handler ID |
| `data[].name` | string | no | Handler name |
| `data[].code` | string | no | Handler code |
| `data[].sort` | integer | no | Handler sort value |
| `data[].description` | string | no | Handler description |
| `data[].settings` | object / array | no | Handler settings definition. The structure and nested keys depend on the handler |
| `data[].profiles` | array | no | Handler profile definitions |
| `meta` | object | yes | List metadata |
| `meta.total` | integer | yes | Number of handlers in `data` |

Handler fields are included in the response if they are present in the handler definition. An empty `data` array means there are no registered REST handlers.

## Response example

The example shows the main handler fields. See the [response fields table](#response-fields) for the full structure.

```json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "code": "my_payment_handler",
      "sort": 100
    },
    {
      "id": 3,
      "code": "my_qr_handler",
      "sort": 100
    }
  ],
  "meta": {
    "total": 2
  }
}
```

## Error response example

400 — the request includes the query parameter `limit=1`:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Handlers have no query parameters"
  }
}
```

## Errors

| HTTP | Code | Description |
|---|---|---|
| 400 | `INVALID_PARAMS` | The request includes query parameters. This method accepts none |
| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access to the handlers |
| 422 | `BITRIX_ERROR` | The operation failed in Bitrix24. See `error.message` for details |
| 502 | `BITRIX_RESPONSE_INVALID` | The response has an invalid structure |
| 401 | `TOKEN_MISSING` | The key has no configured Bitrix24 access tokens |
| 403 | `SCOPE_DENIED` | The key lacks the `pay_system` scope |

For the full list of common API errors, see [Errors](/docs/errors).

## See also

- [Pay systems](/docs/entities/pay-systems)
- [Errors](/docs/errors)
