# Payments

## get_payments

`TOOL get_payments`

Get list of payments for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `search` (argument, string, optional) - Search term for payment notes
  Type: string
  
  Search term for payment notes

- `relations` (argument, array, optional) - Relations to include (e.g., ["invoice", "organizationContact", "project", "recordedBy"])
  Type: array
  
  Relations to include (e.g., ["invoice", "organizationContact", "project", "recordedBy"])
  
  Items:
    Type: string

- `status` (argument, string, optional) - Filter by payment status
  Type: string
  
  Filter by payment status
  
  enum: ["PENDING","PROCESSING","COMPLETED","FAILED","CANCELLED","REFUNDED"]

- `paymentMethod` (argument, string, optional) - Filter by payment method
  Type: string
  
  Filter by payment method
  
  enum: ["CREDIT_CARD","DEBIT_CARD","BANK_TRANSFER","PAYPAL","STRIPE","CASH","CHECK","OTHER"]

- `invoiceId` (argument, string, uuid, optional) - Filter by invoice ID
  Type: string, uuid
  
  Filter by invoice ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `organizationContactId` (argument, string, uuid, optional) - Filter by organization contact ID
  Type: string, uuid
  
  Filter by organization contact ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `projectId` (argument, string, uuid, optional) - Filter by project ID
  Type: string, uuid
  
  Filter by project ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `currency` (argument, string, optional) - Filter by currency
  Type: string
  
  Filter by currency
  
  enum: ["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY"]

- `startDate` (argument, string, optional) - Filter payments from this date (ISO format)
  Type: string
  
  Filter payments from this date (ISO format)

- `endDate` (argument, string, optional) - Filter payments until this date (ISO format)
  Type: string
  
  Filter payments until this date (ISO format)

- `overdue` (argument, boolean, optional) - Filter by overdue status
  Type: boolean
  
  Filter by overdue status

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_payments",
    "arguments": {
        "page": 1,
        "limit": 10,
        "search": "string",
        "relations": [
          "string"
        ],
        "status": "PENDING",
        "paymentMethod": "CREDIT_CARD",
        "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
        "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
        "projectId": "550e8400-e29b-41d4-a716-446655440000",
        "currency": "USD",
        "startDate": "string",
        "endDate": "string",
        "overdue": true
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_payments",
  "arguments": {
    "page": 1,
    "limit": 10,
    "search": "string",
    "relations": [
      "string"
    ],
    "status": "PENDING",
    "paymentMethod": "CREDIT_CARD",
    "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
    "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "currency": "USD",
    "startDate": "string",
    "endDate": "string",
    "overdue": true
  }
});
```

### Python

```python
result = await session.call_tool("get_payments", arguments={
  "page": 1,
  "limit": 10,
  "search": "string",
  "relations": [
    "string"
  ],
  "status": "PENDING",
  "paymentMethod": "CREDIT_CARD",
  "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
  "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "currency": "USD",
  "startDate": "string",
  "endDate": "string",
  "overdue": true
})
```


## get_payment_count

`TOOL get_payment_count`

Get payment count in the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `status` (argument, string, optional) - Filter by payment status
  Type: string
  
  Filter by payment status
  
  enum: ["PENDING","PROCESSING","COMPLETED","FAILED","CANCELLED","REFUNDED"]

- `paymentMethod` (argument, string, optional) - Filter by payment method
  Type: string
  
  Filter by payment method
  
  enum: ["CREDIT_CARD","DEBIT_CARD","BANK_TRANSFER","PAYPAL","STRIPE","CASH","CHECK","OTHER"]

- `currency` (argument, string, optional) - Filter by currency
  Type: string
  
  Filter by currency
  
  enum: ["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY"]

- `overdue` (argument, boolean, optional) - Filter by overdue status
  Type: boolean
  
  Filter by overdue status

- `startDate` (argument, string, optional) - Filter payments from this date (ISO format)
  Type: string
  
  Filter payments from this date (ISO format)

- `endDate` (argument, string, optional) - Filter payments until this date (ISO format)
  Type: string
  
  Filter payments until this date (ISO format)

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_payment_count",
    "arguments": {
        "status": "PENDING",
        "paymentMethod": "CREDIT_CARD",
        "currency": "USD",
        "overdue": true,
        "startDate": "string",
        "endDate": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_payment_count",
  "arguments": {
    "status": "PENDING",
    "paymentMethod": "CREDIT_CARD",
    "currency": "USD",
    "overdue": true,
    "startDate": "string",
    "endDate": "string"
  }
});
```

### Python

```python
result = await session.call_tool("get_payment_count", arguments={
  "status": "PENDING",
  "paymentMethod": "CREDIT_CARD",
  "currency": "USD",
  "overdue": true,
  "startDate": "string",
  "endDate": "string"
})
```


## get_payment

`TOOL get_payment`

Get a specific payment by ID

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The payment ID
  Type: string, uuid
  
  The payment ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `relations` (argument, array, optional) - Relations to include (e.g., ["invoice", "organizationContact", "project", "recordedBy"])
  Type: array
  
  Relations to include (e.g., ["invoice", "organizationContact", "project", "recordedBy"])
  
  Items:
    Type: string

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_payment",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "relations": [
          "string"
        ]
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_payment",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "relations": [
      "string"
    ]
  }
});
```

### Python

```python
result = await session.call_tool("get_payment", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "relations": [
    "string"
  ]
})
```


## create_payment

`TOOL create_payment`

Create a new payment in the authenticated user's organization

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

- `payment_data` (required)
  Type: object
  
  The data for creating the payment
  
  - `amount` (required)
    Type: number
    
    The amount (required)
  
  - `currency` (required)
    Type: string
    
    The currency (required)
  
  Additional properties: 
    Type: unknown

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_payment",
    "arguments": {
        "payment_data": {
          "amount": 0,
          "currency": "string"
        }
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "create_payment",
  "arguments": {
    "payment_data": {
      "amount": 0,
      "currency": "string"
    }
  }
});
```

### Python

```python
result = await session.call_tool("create_payment", arguments={
  "payment_data": {
    "amount": 0,
    "currency": "string"
  }
})
```


## update_payment

`TOOL update_payment`

Update an existing payment

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The payment ID
  Type: string, uuid
  
  The payment ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `payment_data` (argument, object, required) - The data for updating the payment
  Type: object
  
  The data for updating the payment
  
  Additional properties: 
    Type: unknown

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_payment",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "payment_data": {}
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "update_payment",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "payment_data": {}
  }
});
```

### Python

```python
result = await session.call_tool("update_payment", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "payment_data": {}
})
```


## update_payment_status

`TOOL update_payment_status`

Update the status of a payment

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The payment ID
  Type: string, uuid
  
  The payment ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `status` (argument, string, required) - The new status for the payment
  Type: string
  
  The new status for the payment
  
  enum: ["PENDING","PROCESSING","COMPLETED","FAILED","CANCELLED","REFUNDED"]

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_payment_status",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "status": "PENDING"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "update_payment_status",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "PENDING"
  }
});
```

### Python

```python
result = await session.call_tool("update_payment_status", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "PENDING"
})
```


## delete_payment

`TOOL delete_payment`

Delete a payment

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The payment ID
  Type: string, uuid
  
  The payment ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_payment",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "delete_payment",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000"
  }
});
```

### Python

```python
result = await session.call_tool("delete_payment", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000"
})
```


## get_payments_by_invoice

`TOOL get_payments_by_invoice`

Get payments for a specific invoice

Authentication: no security requirement declared for this operation.

Parameters:

- `invoiceId` (argument, string, uuid, required) - The invoice ID
  Type: string, uuid
  
  The invoice ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `status` (argument, string, optional) - Filter by payment status
  Type: string
  
  Filter by payment status
  
  enum: ["PENDING","PROCESSING","COMPLETED","FAILED","CANCELLED","REFUNDED"]

- `relations` (argument, array, optional) - Relations to include
  Type: array
  
  Relations to include
  
  Items:
    Type: string

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_payments_by_invoice",
    "arguments": {
        "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
        "page": 1,
        "limit": 10,
        "status": "PENDING",
        "relations": [
          "string"
        ]
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_payments_by_invoice",
  "arguments": {
    "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
    "page": 1,
    "limit": 10,
    "status": "PENDING",
    "relations": [
      "string"
    ]
  }
});
```

### Python

```python
result = await session.call_tool("get_payments_by_invoice", arguments={
  "invoiceId": "550e8400-e29b-41d4-a716-446655440000",
  "page": 1,
  "limit": 10,
  "status": "PENDING",
  "relations": [
    "string"
  ]
})
```


## get_payments_by_client

`TOOL get_payments_by_client`

Get payments for a specific client/organization contact

Authentication: no security requirement declared for this operation.

Parameters:

- `organizationContactId` (argument, string, uuid, required) - The organization contact ID
  Type: string, uuid
  
  The organization contact ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `status` (argument, string, optional) - Filter by payment status
  Type: string
  
  Filter by payment status
  
  enum: ["PENDING","PROCESSING","COMPLETED","FAILED","CANCELLED","REFUNDED"]

- `currency` (argument, string, optional) - Filter by currency
  Type: string
  
  Filter by currency
  
  enum: ["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY"]

- `relations` (argument, array, optional) - Relations to include
  Type: array
  
  Relations to include
  
  Items:
    Type: string

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_payments_by_client",
    "arguments": {
        "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
        "page": 1,
        "limit": 10,
        "status": "PENDING",
        "currency": "USD",
        "relations": [
          "string"
        ]
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_payments_by_client",
  "arguments": {
    "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
    "page": 1,
    "limit": 10,
    "status": "PENDING",
    "currency": "USD",
    "relations": [
      "string"
    ]
  }
});
```

### Python

```python
result = await session.call_tool("get_payments_by_client", arguments={
  "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
  "page": 1,
  "limit": 10,
  "status": "PENDING",
  "currency": "USD",
  "relations": [
    "string"
  ]
})
```


## get_payment_statistics

`TOOL get_payment_statistics`

Get payment statistics for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `startDate` (argument, string, optional) - Start date for statistics (ISO format)
  Type: string
  
  Start date for statistics (ISO format)

- `endDate` (argument, string, optional) - End date for statistics (ISO format)
  Type: string
  
  End date for statistics (ISO format)

- `organizationContactId` (argument, string, uuid, optional) - Filter by specific client ID
  Type: string, uuid
  
  Filter by specific client ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `projectId` (argument, string, uuid, optional) - Filter by specific project ID
  Type: string, uuid
  
  Filter by specific project ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `currency` (argument, string, optional) - Filter by currency
  Type: string
  
  Filter by currency
  
  enum: ["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY"]

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_payment_statistics",
    "arguments": {
        "startDate": "string",
        "endDate": "string",
        "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
        "projectId": "550e8400-e29b-41d4-a716-446655440000",
        "currency": "USD"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_payment_statistics",
  "arguments": {
    "startDate": "string",
    "endDate": "string",
    "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
    "projectId": "550e8400-e29b-41d4-a716-446655440000",
    "currency": "USD"
  }
});
```

### Python

```python
result = await session.call_tool("get_payment_statistics", arguments={
  "startDate": "string",
  "endDate": "string",
  "organizationContactId": "550e8400-e29b-41d4-a716-446655440000",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "currency": "USD"
})
```


## process_payment

`TOOL process_payment`

Process a payment (mark as completed)

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The payment ID
  Type: string, uuid
  
  The payment ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `paymentDate` (argument, string, optional) - The payment date (ISO format)
  Type: string
  
  The payment date (ISO format)

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "process_payment",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "paymentDate": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "process_payment",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "paymentDate": "string"
  }
});
```

### Python

```python
result = await session.call_tool("process_payment", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "paymentDate": "string"
})
```


## refund_payment

`TOOL refund_payment`

Refund a payment

Authentication: no security requirement declared for this operation.

Parameters:

- `id` (argument, string, uuid, required) - The payment ID
  Type: string, uuid
  
  The payment ID
  
  pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"

- `refundAmount` (argument, number, optional) - The refund amount (if partial refund)
  Type: number
  
  The refund amount (if partial refund)

- `reason` (argument, string, optional) - Reason for refund
  Type: string
  
  Reason for refund

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "refund_payment",
    "arguments": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "refundAmount": 0,
        "reason": "string"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "refund_payment",
  "arguments": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "refundAmount": 0,
    "reason": "string"
  }
});
```

### Python

```python
result = await session.call_tool("refund_payment", arguments={
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "refundAmount": 0,
  "reason": "string"
})
```


## get_overdue_payments

`TOOL get_overdue_payments`

Get overdue payments for the authenticated user's organization

Authentication: no security requirement declared for this operation.

Parameters:

- `page` (argument, number, optional) - Page number for pagination
  Type: number
  
  Page number for pagination
  
  default: 1

- `limit` (argument, number, optional) - Number of items per page
  Type: number
  
  Number of items per page
  
  default: 10

- `relations` (argument, array, optional) - Relations to include
  Type: array
  
  Relations to include
  
  Items:
    Type: string

- `currency` (argument, string, optional) - Filter by currency
  Type: string
  
  Filter by currency
  
  enum: ["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY"]

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_overdue_payments",
    "arguments": {
        "page": 1,
        "limit": 10,
        "relations": [
          "string"
        ],
        "currency": "USD"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "get_overdue_payments",
  "arguments": {
    "page": 1,
    "limit": 10,
    "relations": [
      "string"
    ],
    "currency": "USD"
  }
});
```

### Python

```python
result = await session.call_tool("get_overdue_payments", arguments={
  "page": 1,
  "limit": 10,
  "relations": [
    "string"
  ],
  "currency": "USD"
})
```


## search_payments

`TOOL search_payments`

Search payments by notes, invoice number, or client name

Authentication: no security requirement declared for this operation.

Parameters:

- `query` (argument, string, required) - Search query
  Type: string
  
  Search query

- `limit` (argument, number, optional) - Maximum number of results
  Type: number
  
  Maximum number of results
  
  default: 20

- `status` (argument, string, optional) - Filter by payment status
  Type: string
  
  Filter by payment status
  
  enum: ["PENDING","PROCESSING","COMPLETED","FAILED","CANCELLED","REFUNDED"]

- `paymentMethod` (argument, string, optional) - Filter by payment method
  Type: string
  
  Filter by payment method
  
  enum: ["CREDIT_CARD","DEBIT_CARD","BANK_TRANSFER","PAYPAL","STRIPE","CASH","CHECK","OTHER"]

- `currency` (argument, string, optional) - Filter by currency
  Type: string
  
  Filter by currency
  
  enum: ["USD","EUR","GBP","JPY","CAD","AUD","CHF","CNY"]

## Examples

### JSON-RPC

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_payments",
    "arguments": {
        "query": "string",
        "limit": 20,
        "status": "PENDING",
        "paymentMethod": "CREDIT_CARD",
        "currency": "USD"
      }
  }
}
```

### TypeScript

```typescript
const result = await client.callTool({
  "name": "search_payments",
  "arguments": {
    "query": "string",
    "limit": 20,
    "status": "PENDING",
    "paymentMethod": "CREDIT_CARD",
    "currency": "USD"
  }
});
```

### Python

```python
result = await session.call_tool("search_payments", arguments={
  "query": "string",
  "limit": 20,
  "status": "PENDING",
  "paymentMethod": "CREDIT_CARD",
  "currency": "USD"
})
```
