transaction_list
Retrieve paginated lists of financial transactions from your Iaptic account, filtered by date or purchase ID.
Instructions
List financial transactions from your Iaptic account.
Returns a paginated list of transactions
Use limit and offset for pagination (default: 100 per page)
Filter by date range using startdate and enddate (ISO format)
Filter by purchaseId to see transactions for a specific purchase
Results include transaction status, amount, currency, and payment details
Results are ordered by transaction date (newest first)
Important: Use date filtering to avoid retrieving too many records
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of transactions to return (default: 100, max: 1000) | |
| offset | No | Number of transactions to skip for pagination | |
| startdate | No | Filter transactions after this date (ISO format, e.g. 2024-01-01) | |
| enddate | No | Filter transactions before this date (ISO format, e.g. 2024-12-31) | |
| purchaseId | No | Filter transactions by purchase ID |
Implementation Reference
- src/tools/transactions.ts:127-145 (handler)Handler for 'transaction_list' tool. Calls this.api.getTransactions() with limit (capped at 1000), offset, startdate, enddate, purchaseId, and appName args, then returns the result as JSON text content.
private async _handleTool(name: string, args: any) { switch (name) { case 'transaction_list': console.error(`Fetching transactions with params:`, args); const transactions = await this.api.getTransactions({ limit: Math.min(args.limit || 100, 1000), // Cap at 1000 offset: args.offset, startdate: args.startdate, enddate: args.enddate, purchaseId: args.purchaseId, appName: args.appName }); console.error(`Retrieved ${transactions.rows?.length || 0} transactions`); return { content: [{ type: "text", text: JSON.stringify(transactions, null, 2) }] }; - src/tools/transactions.ts:34-65 (schema)Input schema for 'transaction_list' tool. Defines parameters: limit (number, max 1000), offset (number), startdate (string, ISO format), enddate (string, ISO format), purchaseId (string), and optionally appName when using master key.
inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of transactions to return (default: 100, max: 1000)" }, offset: { type: "number", description: "Number of transactions to skip for pagination" }, startdate: { type: "string", description: "Filter transactions after this date (ISO format, e.g. 2024-01-01)" }, enddate: { type: "string", description: "Filter transactions before this date (ISO format, e.g. 2024-12-31)" }, purchaseId: { type: "string", description: "Filter transactions by purchase ID" }, ...(appNameRequired ? { appName: { type: "string", description: "Name of the app to fetch data from. Required when using master key." } } : {}) }, required: appNameRequired ? ["appName"] : undefined } - src/tools/transactions.ts:24-33 (registration)Registration of the 'transaction_list' tool with its name and description. Part of the array returned by TransactionTools.getTools().
{ name: "transaction_list", description: `List financial transactions from your Iaptic account. - Returns a paginated list of transactions - Use limit and offset for pagination (default: 100 per page) - Filter by date range using startdate and enddate (ISO format) - Filter by purchaseId to see transactions for a specific purchase - Results include transaction status, amount, currency, and payment details - Results are ordered by transaction date (newest first) - Important: Use date filtering to avoid retrieving too many records${appNameRequired ? '\n- Requires appName parameter when using master key' : ''}`, - src/server.ts:94-97 (registration)Routing of 'transaction_' prefixed tool calls to TransactionTools.handleTool() in the server's CallToolRequestSchema handler.
return await this.tools.purchases.handleTool(name, args); } if (name.startsWith('transaction_')) { return await this.tools.transactions.handleTool(name, args); - src/iaptic-api.ts:195-202 (helper)Helper method IapticAPI.getTransactions() that makes the actual HTTP GET request to /transactions endpoint on the Iaptic API.
async getTransactions(params?: ListParams & { purchaseId?: string }) { const defaultParams = { limit: 100, // Reasonable default limit ...params }; const response = await this.client.get('/transactions', { params: defaultParams }); return response.data; }