list_subscriptions
Retrieve and filter subscriptions from your Paddle account with pagination, sorting, and parameters like customer ID, price ID, status, and scheduled changes. Manage subscription data efficiently.
Instructions
This tool will list subscriptions from your Paddle account.
Use the maximum perPage by default (200) to ensure comprehensive results. Filter subscriptions by address ID, customer ID, price ID, collection mode, scheduled change action, and status as needed. Results are paginated - use the 'after' parameter with the last ID from previous results to get the next page. Sort results using orderBy parameter. Amounts are in the smallest currency unit (e.g., cents).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addressId | No | Return entities related to the specified address. | |
| after | No | Return entities after the specified Paddle ID when working with paginated endpoints. | |
| collectionMode | No | Return entities that match the specified collection mode. | |
| customerId | No | Return entities related to the specified customer. | |
| id | No | Return only the IDs specified. | |
| orderBy | No | Order returned entities by field and direction. | |
| perPage | No | Set how many entities are returned per page. Default: 50; Maximum: 200. | |
| priceId | No | Return entities related to the specified price. | |
| scheduledChangeAction | No | Return subscriptions that have a scheduled change. | |
| status | No | Return entities that match the specified status. |
Implementation Reference
- src/functions.ts:836-848 (handler)The main handler function for the 'list_subscriptions' tool. It takes a Paddle instance and parameters, lists subscriptions using paddle.subscriptions.list(params), fetches the first page with next(), computes pagination data, and returns paginated subscriptions or an error.export const listSubscriptions = async ( paddle: Paddle, params: z.infer<typeof Parameters.listSubscriptionsParameters>, ) => { try { const collection = paddle.subscriptions.list(params); const subscriptions = await collection.next(); const pagination = paginationData(collection); return { pagination, subscriptions }; } catch (error) { return error; } };
- src/tools.ts:542-552 (schema)Tool schema definition for 'list_subscriptions', including method name, human-readable name, prompt description, Zod parameters schema reference, and required permissions/actions.method: "list_subscriptions", name: "List subscriptions", description: prompts.listSubscriptionsPrompt, parameters: params.listSubscriptionsParameters, actions: { subscriptions: { read: true, list: true, }, }, },
- src/api.ts:77-77 (registration)Registration of the listSubscriptions handler function in the toolMap under the LIST_SUBSCRIPTIONS key, mapping method name to the executor.[TOOL_METHODS.LIST_SUBSCRIPTIONS]: funcs.listSubscriptions,
- src/constants.ts:69-69 (helper)Constant definition for the tool method name 'list_subscriptions' used across the codebase for consistency.LIST_SUBSCRIPTIONS: "list_subscriptions",