list_adjustments
Retrieve and filter transaction adjustments in Paddle Billing, including credits, refunds, and chargebacks, with pagination and sorting options.
Instructions
This tool will list adjustments in Paddle.
Use the maximum perPage by default (50) to ensure comprehensive results. Filter adjustments by action, customerId, status, subscriptionId, transactionId, and id 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).
Adjustments have an action that determines how the adjustment impacts the related transaction:
credit: Credits some or all the related transaction. Can be created manually.
refund: Refunds some or all the related transaction. Must be approved by Paddle in most cases. Can be created manually.
chargeback: Chargeback for the related transaction. Automatically created by Paddle when a customer successfully disputes a charge.
chargeback_reverse: Reversal of a chargeback for the related transaction. Automatically created by Paddle when Paddle contests a chargeback successfully.
chargeback_warning: Warning of an upcoming chargeback for the related transaction. Automatically created by Paddle.
chargeback_warning_reverse: Reversal of a chargeback warning for the related transaction. Automatically created by Paddle.
credit_reverse: Reversal of a credit for the related transaction. Automatically created by Paddle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Return entities for the specified action. | |
| after | No | Return entities after the specified Paddle ID when working with paginated endpoints. | |
| customerId | No | Return entities related to the specified customer. Use a comma-separated list to specify multiple customer IDs. | |
| 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. | |
| status | No | Return entities that match the specified status. Use a comma-separated list to specify multiple status values. | |
| subscriptionId | No | Return entities related to the specified subscription. Use a comma-separated list to specify multiple subscription IDs. | |
| transactionId | No | Return entities related to the specified transaction. Use a comma-separated list to specify multiple transaction IDs. | |
| id | No | Return only the IDs specified. Use a comma-separated list to get multiple entities. |
Implementation Reference
- src/functions.ts:207-216 (handler)The main handler function that executes the list_adjustments tool. It calls paddle.adjustments.list(params), fetches the first page, adds pagination info, and handles errors.export const listAdjustments = async (paddle: Paddle, params: z.infer<typeof Parameters.listAdjustmentsParameters>) => { try { const collection = paddle.adjustments.list(params); const adjustments = await collection.next(); const pagination = paginationData(collection); return { pagination, adjustments }; } catch (error) { return error; } };
- src/tools.ts:469-479 (schema)Defines the tool metadata including name, description, input parameters schema (via params.listAdjustmentsParameters), and required actions for the list_adjustments tool.method: "list_adjustments", name: "List adjustments", description: prompts.listAdjustmentsPrompt, parameters: params.listAdjustmentsParameters, actions: { adjustments: { read: true, list: true, }, }, },
- src/api.ts:25-25 (registration)Registers the listAdjustments handler function in the toolMap under the LIST_ADJUSTMENTS key for execution via PaddleAPI.run().[TOOL_METHODS.LIST_ADJUSTMENTS]: funcs.listAdjustments,
- src/constants.ts:17-17 (registration)Defines the constant string identifier for the list_adjustments tool method.LIST_ADJUSTMENTS: "list_adjustments",