xero_payments_list
List payments from Xero with pagination. Optionally filter by status to view authorized or deleted payments.
Instructions
List payments in Xero with pagination. Optionally filter by status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based, default: 1). Each page returns up to 100 payments. | |
| Status | No | Filter by payment status |
Implementation Reference
- src/domains/payments.ts:89-101 (handler)Handler case for 'xero_payments_list' inside handlePaymentTool. Extracts optional 'page' and 'Status' args, builds query params, calls GET 'Payments' endpoint, and returns the JSON response.
case "xero_payments_list": { const { page, Status } = args as { page?: number; Status?: string; }; const params: Record<string, string> = {}; if (page !== undefined) params.page = String(page); if (Status) params.where = `Status=="${Status}"`; const response = await client.get("Payments", params); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; - src/domains/payments.ts:13-29 (schema)Schema definition for 'xero_payments_list' tool. Defines inputSchema with optional 'page' (number) and 'Status' (string enum: AUTHORISED, DELETED) properties.
name: "xero_payments_list", description: "List payments in Xero with pagination. Optionally filter by status.", inputSchema: { type: "object", properties: { page: { type: "number", description: "Page number (1-based, default: 1). Each page returns up to 100 payments.", }, Status: { type: "string", enum: ["AUTHORISED", "DELETED"], description: "Filter by payment status", }, }, }, - src/index.ts:261-262 (registration)Registration/routing for all payment tools in CallToolRequestSchema handler. Routes 'xero_payments_*' tool calls (including 'xero_payments_list') to handlePaymentTool.
if (name.startsWith("xero_payments_")) { return await handlePaymentTool(name, toolArgs); - src/index.ts:79-80 (registration)Tool registration: paymentTools array is included in the tool list returned by getAllDomainTools() via getDomainTools('payments').
case "payments": return paymentTools; - src/utils/client.ts:83-84 (helper)Helper: XeroClient.get() makes authenticated GET requests to the Xero API, used by the handler to call 'Payments' endpoint.
async get(path: string, params?: Record<string, string>): Promise<unknown> { return this.request("GET", path, params);