List transactions
deonpay_list_transactionsFilter and retrieve merchant transactions by status, amount, date, card brand, customer email, and more. Returns paginated results with customer and payment details.
Instructions
List transactions for the merchant with rich filtering. Use this for queries like 'how many sales today', 'show failed transactions this week', 'find payments from cliente@x.com', or 'transactions over $1000 MXN with Visa cards'. Filters include status, source_type (link/checkout), customer_email (partial match), merchant_reference (exact), card_brand (visa/mastercard/amex), date_from/to (ISO), and amount_min/max (centavos). Returns paginated results with customer, card, amount, payment_link summary and timestamps. Amounts in centavos.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based). Defaults to 1. | |
| limit | No | Page size. Maximum 100, default 20. | |
| status | No | ||
| source_type | No | Origin of the transaction. | |
| payment_link_id | No | ||
| checkout_session_id | No | ||
| customer_email | No | Partial match on customer email. | |
| merchant_reference | No | Exact merchant_reference filter. | |
| card_brand | No | ||
| date_from | No | ISO 8601 date or datetime string, e.g. 2026-05-15 or 2026-05-15T10:00:00Z. | |
| date_to | No | ISO 8601 date or datetime string, e.g. 2026-05-15 or 2026-05-15T10:00:00Z. | |
| amount_min | No | Minimum amount in centavos. | |
| amount_max | No | Maximum amount in centavos. |
Implementation Reference
- src/tools/transactions.ts:56-58 (handler)The handler function for deonpay_list_transactions. It calls client.get('/transactions', compact(args)) where compact() strips undefined/null/empty values from args before passing them as query parameters. Wrapped in safeHandler which catches errors and returns MCP-formatted results.
safeHandler(async (args) => { return client.get("/transactions", compact(args)); }), - src/tools/transactions.ts:37-54 (schema)Input schema for deonpay_list_transactions with Zod validators. Includes pagination (PageSchema, LimitSchema), filtering by status, source_type, payment_link_id, checkout_session_id, customer_email, merchant_reference, card_brand, date range (IsoDateStringSchema), and amount range in centavos.
inputSchema: { page: PageSchema.optional(), limit: LimitSchema.optional(), status: TransactionStatusSchema.optional(), source_type: z .enum(["link", "checkout", "subscription_auto", "subscription_manual"]) .optional() .describe("Origin of the transaction."), payment_link_id: z.string().uuid().optional(), checkout_session_id: z.string().uuid().optional(), customer_email: z.string().optional().describe("Partial match on customer email."), merchant_reference: z.string().optional().describe("Exact merchant_reference filter."), card_brand: z.enum(["visa", "mastercard", "amex"]).optional(), date_from: IsoDateStringSchema.optional(), date_to: IsoDateStringSchema.optional(), amount_min: z.number().int().min(0).optional().describe("Minimum amount in centavos."), amount_max: z.number().int().min(0).optional().describe("Maximum amount in centavos."), }, - src/tools/transactions.ts:17-25 (schema)Zod enum schema for transaction status values used in the input filter for deonpay_list_transactions.
const TransactionStatusSchema = z.enum([ "pending", "processing", "completed", "failed", "refunded", "partially_refunded", "chargeback", ]); - src/tools/transactions.ts:31-59 (registration)Registration of the tool on the McpServer via server.registerTool() with name, metadata, and handler. Called from registerTransactionTools() which is invoked by registerAllTools() in index.ts.
server.registerTool( "deonpay_list_transactions", { title: "List transactions", description: "List transactions for the merchant with rich filtering. Use this for queries like 'how many sales today', 'show failed transactions this week', 'find payments from cliente@x.com', or 'transactions over $1000 MXN with Visa cards'. Filters include status, source_type (link/checkout), customer_email (partial match), merchant_reference (exact), card_brand (visa/mastercard/amex), date_from/to (ISO), and amount_min/max (centavos). Returns paginated results with customer, card, amount, payment_link summary and timestamps. Amounts in centavos.", inputSchema: { page: PageSchema.optional(), limit: LimitSchema.optional(), status: TransactionStatusSchema.optional(), source_type: z .enum(["link", "checkout", "subscription_auto", "subscription_manual"]) .optional() .describe("Origin of the transaction."), payment_link_id: z.string().uuid().optional(), checkout_session_id: z.string().uuid().optional(), customer_email: z.string().optional().describe("Partial match on customer email."), merchant_reference: z.string().optional().describe("Exact merchant_reference filter."), card_brand: z.enum(["visa", "mastercard", "amex"]).optional(), date_from: IsoDateStringSchema.optional(), date_to: IsoDateStringSchema.optional(), amount_min: z.number().int().min(0).optional().describe("Minimum amount in centavos."), amount_max: z.number().int().min(0).optional().describe("Maximum amount in centavos."), }, }, safeHandler(async (args) => { return client.get("/transactions", compact(args)); }), ); - src/tools/_helpers.ts:83-91 (helper)The compact() helper used by the handler to strip undefined/null/empty-string entries from the args before sending them as query parameters to the DeonPay API.
export function compact<T extends Record<string, unknown>>(obj: T): Partial<T> { const out: Record<string, unknown> = {}; for (const [key, value] of Object.entries(obj)) { if (value === undefined || value === null) continue; if (typeof value === "string" && value.trim() === "") continue; out[key] = value; } return out as Partial<T>; }