Skip to main content
Glama
PaddleHQ
by PaddleHQ

list_transactions

Retrieve and filter Paddle transaction records with pagination, sorting, and optional inclusion of related entities like customers, addresses, and adjustments.

Instructions

This tool will list transactions in Paddle.

Use the maximum perPage by default (30) to ensure comprehensive results. Filter transactions by billedAt, collectionMode, createdAt, customerId, id, invoiceNumber, origin, status, subscriptionId, and updatedAt as needed. Results are paginated - use the 'after' parameter with the last ID from previous results to get the next page. Sort and order results using the orderBy parameter. Amounts are in the smallest currency unit (e.g., cents).

Use the include parameter to include related entities in the response:

  • address: An object for the address entity related to this transaction. Only returned if an address is set against the transaction.

  • adjustments: An array of adjustment entities related to this transaction. Only returned if adjustments have been created against the transaction.

  • adjustments_totals: An object containing totals for all adjustments on a transaction. Only returned if adjustments have been created against the transaction.

  • available_payment_methods: An array of payment methods that are available to use for this transaction.

  • business: An object for the business entity related to this transaction. Only returned if a business is set against the transaction.

  • customer: An object for the customer entity related to this transaction. Only returned if a customer is set against the transaction.

  • discount: An object for the discount entity related to this transaction. Only returned if a discount is set against the transaction.

Transactions have a collectionMode that determines how Paddle tries to collect for payment:

  • automatic: Payment is collected automatically using a checkout initially, then using a payment method on file.

  • manual: Payment is collected manually. Customers are sent an invoice with payment terms and can make a payment offline or using a checkout. Requires billingDetails.

Transactions have a status that determines the current state of the transaction:

  • draft: Transaction is missing required fields. Typically the first stage of a checkout before customer details are captured.

  • ready: Transaction has all of the required fields to be marked as billed or completed.

  • billed: Transaction has been updated to billed. Billed transactions get an invoice number and are considered a legal record. They can't be changed. Typically used as part of an invoice workflow.

  • paid: Transaction is fully paid, but has not yet been processed internally.

  • completed: Transaction is fully paid and processed.

  • canceled: Transaction has been updated to canceled. If an invoice, it's no longer due.

  • past_due: Transaction is past due. Occurs for automatically-collected transactions when the related subscription is in dunning, and for manually-collected transactions when payment terms have elapsed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoReturn entities after the specified Paddle ID when working with paginated endpoints.
billedAtNoReturn entities billed at this exact time. Pass an RFC 3339 datetime string.
billedAtLTNoReturn entities billed before this time. Pass an RFC 3339 datetime string.
billedAtLTENoReturn entities billed at or before this time. Pass an RFC 3339 datetime string.
billedAtGTNoReturn entities billed after this time. Pass an RFC 3339 datetime string.
billedAtGTENoReturn entities billed at or after this time. Pass an RFC 3339 datetime string.
collectionModeNoReturn entities that match the specified collection mode.
createdAtNoReturn entities created at this exact time. Pass an RFC 3339 datetime string.
createdAtLTNoReturn entities created before this time. Pass an RFC 3339 datetime string.
createdAtLTENoReturn entities created at or before this time. Pass an RFC 3339 datetime string.
createdAtGTNoReturn entities created after this time. Pass an RFC 3339 datetime string.
createdAtGTENoReturn entities created at or after this time. Pass an RFC 3339 datetime string.
customerIdNoReturn entities related to the specified customer. Use a comma-separated list to specify multiple customer IDs.
idNoReturn only the IDs specified. Use a comma-separated list to get multiple entities.
includeNoInclude related entities in the response. Use a comma-separated list to specify multiple entities.
invoiceNumberNoReturn entities that match the invoice number. Use a comma-separated list to specify multiple invoice numbers.
originNoReturn entities related to the specified origin. Use a comma-separated list to specify multiple origins.
orderByNoOrder returned entities by the specified field and direction.
statusNoReturn entities that match the specified status. Use a comma-separated list to specify multiple status values.
subscriptionIdNoReturn entities related to the specified subscription. Use a comma-separated list to specify multiple subscription IDs. Pass `null` to return entities that aren't related to any subscription.
perPageNoSet how many entities are returned per page.
updatedAtNoReturn entities updated at this exact time. Pass an RFC 3339 datetime string.
updatedAtLTNoReturn entities updated before this time. Pass an RFC 3339 datetime string.
updatedAtLTENoReturn entities updated at or before this time. Pass an RFC 3339 datetime string.
updatedAtGTNoReturn entities updated after this time. Pass an RFC 3339 datetime string.
updatedAtGTENoReturn entities updated at or after this time. Pass an RFC 3339 datetime string.

Implementation Reference

  • The handler function that executes the list_transactions tool. It transforms input parameters using transformParams, calls paddle.transactions.list, fetches the first page with next(), computes pagination info, and returns paginated transactions or error.
    export const listTransactions = async ( paddle: Paddle, params: z.infer<typeof Parameters.listTransactionsParameters>, ) => { try { const transformedParams = transformParams(params); const collection = paddle.transactions.list(transformedParams); const transactions = await collection.next(); const pagination = paginationData(collection); return { pagination, transactions }; } catch (error) { return error; } };
  • Defines the tool schema for list_transactions, including method name, human-readable name, description prompt, Zod input parameters schema, and required actions (read/list on transactions).
    method: "list_transactions", name: "List transactions", description: prompts.listTransactionsPrompt, parameters: params.listTransactionsParameters, actions: { transactions: { read: true, list: true, }, }, },
  • src/api.ts:18-18 (registration)
    Registers the listTransactions handler function to the TOOL_METHODS.LIST_TRANSACTIONS key in the toolMap used by PaddleAPI to execute tools.
    [TOOL_METHODS.LIST_TRANSACTIONS]: funcs.listTransactions,
  • Helper utility to transform query parameters from underscore notation (e.g., 'created_at_lt') to Paddle API bracket notation (e.g., 'created_at[LT]'), specifically used in listTransactions.
    // Example: created_at_lt becomes created_at[LT], updated_at_gte becomes updated_at[GTE] // Other parameters like customer_id, collection_mode are left unchanged const transformParams = (params: Record<string, unknown>) => { const operators = ["lt", "lte", "gt", "gte"]; return Object.entries(params).reduce( (acc, [key, value]) => { const parts = key.split("_"); const lastPart = parts[parts.length - 1]; if (parts.length >= 2 && operators.includes(lastPart)) { const operator = parts.pop()!; const base = parts.join("_"); acc[`${base}[${operator.toUpperCase()}]`] = value; } else { acc[key] = value; } return acc; }, {} as Record<string, unknown>, ); };
  • Helper to extract pagination metadata (hasMore, estimatedTotal) from Paddle paginated collection, used in listTransactions response.
    const paginationData = (collection: PaginatedCollection) => ({ hasMore: collection.hasMore, estimatedTotal: collection.estimatedTotal, });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaddleHQ/paddle-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server