list_subscriptions
Retrieve and filter subscription data from Paddle Billing. Use pagination, sorting, and parameters like status, customer ID, or price ID to manage subscription information.
Instructions
This tool will list subscriptions in Paddle.
Use the maximum perPage by default (200) to ensure comprehensive results. Filter subscriptions by addressId, collectionMode, customerId, id, priceId, scheduledChangeAction, and status 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).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addressId | No | Return entities related to the specified address. Use a comma-separated list to specify multiple address IDs. | |
| 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. Use a comma-separated list to specify multiple customer IDs. | |
| id | No | Return only the IDs specified. Use a comma-separated list to get multiple entities. | |
| orderBy | No | Order returned entities by the specified field and direction. | |
| perPage | No | Set how many entities are returned per page. Returns the maximum number of results if a number greater than the maximum is requested. | |
| priceId | No | Return entities related to the specified price. Use a comma-separated list to specify multiple price IDs. | |
| scheduledChangeAction | No | Return subscriptions that have a scheduled change. Use a comma-separated list to specify multiple scheduled change actions. | |
| status | No | Return entities that match the specified status. Use a comma-separated list to specify multiple status values. |
Implementation Reference
- src/functions.ts:836-848 (handler)The handler function that executes the list_subscriptions tool logic, using the Paddle SDK to list subscriptions with pagination.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:541-552 (schema)The tool schema definition for list_subscriptions, including name, description, input parameters schema (Zod object), and required 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 for the LIST_SUBSCRIPTIONS method.[TOOL_METHODS.LIST_SUBSCRIPTIONS]: funcs.listSubscriptions,
- src/constants.ts:69-69 (helper)Constant definition for the LIST_SUBSCRIPTIONS tool method string.LIST_SUBSCRIPTIONS: "list_subscriptions",