Skip to main content
Glama
PaddleHQ
by PaddleHQ

get_transaction_invoice

Retrieve a temporary link to download or view transaction invoice PDFs from Paddle for payment verification and tax reporting purposes.

Instructions

This tool will retrieve a link to an invoice PDF for a transaction from Paddle.

Invoice PDFs are available for both automatically and manually-collected transactions:

  • The PDF for manually-collected transactions includes payment terms, purchase order number, and notes for the customer. It's a demand for payment from the customer. Available for transactions billed or completed.

  • The PDF for automatically-collected transactions lets the customer know that payment was taken successfully. Customers may require this for for tax-reporting purposes. Available for transactions completed.

Invoice PDFs aren't available for zero-value transactions.

The link returned isn't a permanent link. It expires after an hour.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionIdYesPaddle ID of the transaction.
dispositionNoDetermine whether the generated URL should download the PDF as an attachment saved locally, or open it inline in the browser. If omitted, defaults to `attachment`.

Implementation Reference

  • The main handler function that retrieves the invoice PDF for a given transaction ID using the Paddle SDK. Handles optional query parameters and returns the result or error.
    export const getTransactionInvoice = async ( paddle: Paddle, params: z.infer<typeof Parameters.getTransactionInvoiceParameters>, ) => { try { const { transactionId, ...queryParams } = params; const hasQueryParams = Object.keys(queryParams).length > 0; const transaction = await paddle.transactions.getInvoicePDF( transactionId, hasQueryParams ? queryParams : undefined, ); return transaction; } catch (error) { return error; } };
  • Defines the tool configuration including the method name, human-readable name, description prompt, Zod input schema reference, and required permissions (read and get on transactions). Used for MCP tool registration.
    method: "get_transaction_invoice", name: "Get a PDF invoice for a transaction", description: prompts.getTransactionInvoicePrompt, parameters: params.getTransactionInvoiceParameters, actions: { transactions: { read: true, get: true, }, }, },
  • src/api.ts:65-65 (registration)
    Registers the getTransactionInvoice handler function under the tool method constant in the toolMap. This mapping is used by PaddleAPI.run() to dispatch calls to the correct function.
    [TOOL_METHODS.GET_TRANSACTION_INVOICE]: funcs.getTransactionInvoice,
  • Exports the string constant for the tool method name, used in tool mappings, registrations, and configurations across the codebase.
    GET_TRANSACTION_INVOICE: "get_transaction_invoice",
  • Provides the detailed description/prompt for the tool, explaining usage, availability conditions, and link expiration. Referenced in tools.ts.
    export const getTransactionInvoicePrompt = ` This tool will retrieve a link to an invoice PDF for a transaction from Paddle. Invoice PDFs are available for both automatically and manually-collected transactions: - The PDF for manually-collected transactions includes payment terms, purchase order number, and notes for the customer. It's a demand for payment from the customer. Available for transactions billed or completed. - The PDF for automatically-collected transactions lets the customer know that payment was taken successfully. Customers may require this for for tax-reporting purposes. Available for transactions completed. Invoice PDFs aren't available for zero-value transactions. The link returned isn't a permanent link. It expires after an hour. `;

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