getAllPayments
Retrieve all payments by filtering based on payment IDs, customer IDs, bill IDs, creation/consumption date ranges, payment states, or pagination settings.
Instructions
Returns all payments based on filter parameters
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| BillIds | No | Filter by bill IDs | |
| ConsumedUtc | No | Date range filter for payment consumption | |
| CreatedUtc | No | Date range filter for payment creation | |
| CustomerIds | No | Filter by customer IDs | |
| Limitation | No | Pagination settings | |
| PaymentIds | No | Filter by specific payment IDs | |
| States | No | Filter by payment states |
Implementation Reference
- The execute handler function that implements the core logic of the getAllPayments tool by preparing request data and calling the Mews payments API endpoint.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const inputArgs = args as Record<string, unknown>; const requestData = { Limitation: { Count: 100 }, ...inputArgs }; const result = await mewsRequest(config, '/api/connector/v1/payments/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- The inputSchema defining the parameters for filtering and paginating payments in the getAllPayments tool.inputSchema: { type: 'object', properties: { PaymentIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific payment IDs', maxItems: 1000 }, CustomerIds: { type: 'array', items: { type: 'string' }, description: 'Filter by customer IDs', maxItems: 1000 }, BillIds: { type: 'array', items: { type: 'string' }, description: 'Filter by bill IDs', maxItems: 1000 }, CreatedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of creation date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of creation date range (ISO 8601)' } }, description: 'Date range filter for payment creation' }, ConsumedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of consumption date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of consumption date range (ISO 8601)' } }, description: 'Date range filter for payment consumption' }, States: { type: 'array', items: { type: 'string' }, description: 'Filter by payment states' }, Limitation: { type: 'object', properties: { Count: { type: 'number', description: 'Maximum number of payments to return' }, Cursor: { type: 'string', description: 'Pagination cursor for next page' } }, description: 'Pagination settings' } }, additionalProperties: false },
- src/tools/index.ts:43-43 (registration)Import statement for the getAllPaymentsTool.import { getAllPaymentsTool } from './payments/getAllPayments.js';
- src/tools/index.ts:128-128 (registration)Registration of getAllPaymentsTool in the allTools array used for MCP tool registry.getAllPaymentsTool,