Skip to main content
Glama
PaddleHQ
by PaddleHQ

get_saved_payment_method

Retrieve a customer's saved payment method from Paddle using customer and payment method IDs to access stored checkout details for future purchases.

Instructions

This tool will retrieve a payment method for a customer from Paddle using its ID and related customer ID.

These are payment methods saved by the customer at checkout to be presented for future purchases. They aren't payment methods stored for transactions related to a recurring subscription. View a customers most recently used payment method for purchases or subscriptions by listing transactions (with the list_transactions tool) with a filter of customerId or subscriptionId, and looking at the returned payments[].methodDetails object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customerIdYesPaddle ID of the customer.
paymentMethodIdYesPaddle ID of the payment method.

Implementation Reference

  • The core handler function that executes the tool logic: retrieves a specific saved payment method for a customer using the Paddle SDK's paymentMethods.get method.
    export const getSavedPaymentMethod = async ( paddle: Paddle, params: z.infer<typeof Parameters.getSavedPaymentMethodParameters>, ) => { try { const { customerId, paymentMethodId } = params; const paymentMethod = await paddle.paymentMethods.get(customerId, paymentMethodId); return paymentMethod; } catch (error) { return error; } };
  • Tool schema definition including the method name, description, Zod parameters schema reference, and required actions for the get_saved_payment_method tool.
    method: "get_saved_payment_method", name: "Get a payment method saved for a customer", description: prompts.getSavedPaymentMethodPrompt, parameters: params.getSavedPaymentMethodParameters, actions: { savedPaymentMethods: { read: true, get: true, }, }, },
  • src/api.ts:41-43 (registration)
    Registration of the getSavedPaymentMethod handler in the toolMap object, mapping the tool method constant to its implementation.
    [TOOL_METHODS.LIST_SAVED_PAYMENT_METHODS]: funcs.listSavedPaymentMethods, [TOOL_METHODS.GET_SAVED_PAYMENT_METHOD]: funcs.getSavedPaymentMethod, [TOOL_METHODS.DELETE_SAVED_PAYMENT_METHOD]: funcs.deleteSavedPaymentMethod,
  • Constant definition for the tool method name used across registration and tool definitions.
    LIST_SAVED_PAYMENT_METHODS: "list_saved_payment_methods", GET_SAVED_PAYMENT_METHOD: "get_saved_payment_method", DELETE_SAVED_PAYMENT_METHOD: "delete_saved_payment_method",

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