Skip to main content
Glama
PaddleHQ
by PaddleHQ

create_customer_portal_session

Generate authenticated customer portal links for Paddle customers to manage subscriptions, view transactions, update payment methods, and download invoices securely.

Instructions

This tool will create a customer portal session for a customer in Paddle.

The customer portal is a secure, Paddle-hosted site that allows customers and authorized individuals to:

  • View transaction history

  • Download invoices

  • Update saved payment methods for future purchases

  • Update stored payment methods for subscriptions

  • Manage their subscriptions including cancellations

  • Revise details on completed transactions

Don't use this tool without checking with the user first. Avoid using before gaining explicit approval.

Authenticated links are returned which automatically sign in the customer. Ensure those creating a customer portal session are authorized to access the customer portal.

  • urls.general.overview: Allows the customer to view their account information, transactions, and subscriptions.

Provide subscriptionIds to return urls.subscriptions[] to manage one or more subscriptions directly:

  • urls.subscriptions[].updateSubscriptionPaymentMethod: Allows the customer to update the payment method for a subscription.

  • urls.subscriptions[].cancelSubscription: Allows the customer to cancel a subscription.

If subscriptions are paused or canceled, links open the overview page for a subscription.

If successful, the response includes a copy of the new customer portal session entity with the urls to open up the customer portal for access. Customer portal sessions are temporary and shouldn't be cached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customerIdYesPaddle ID of the customer.
subscriptionIdsYesList of subscriptions to create authenticated customer portal deep links for.

Implementation Reference

  • The main handler function implementing the tool logic: extracts customerId and optional subscriptionIds, calls Paddle SDK's customerPortalSessions.create, and returns the session or error.
    export const createCustomerPortalSession = async ( paddle: Paddle, params: z.infer<typeof Parameters.createCustomerPortalSessionParameters>, ) => { try { const { customerId, subscriptionIds } = params; const customerPortalSession = await paddle.customerPortalSessions.create(customerId, subscriptionIds); return customerPortalSession; } catch (error) { return error; } };
  • src/tools.ts:674-684 (registration)
    Registers the MCP tool with method name, human-readable name, prompt description, input schema (parameters), and required permissions/actions.
    method: "create_customer_portal_session", name: "Create a customer portal session", description: prompts.createCustomerPortalSessionPrompt, parameters: params.createCustomerPortalSessionParameters, actions: { customerPortalSessions: { write: true, create: true, }, }, },
  • src/api.ts:44-44 (registration)
    In the toolMap, maps the tool method constant to the imported handler function for execution in PaddleAPI.
    [TOOL_METHODS.CREATE_CUSTOMER_PORTAL_SESSION]: funcs.createCustomerPortalSession,
  • src/constants.ts:36-36 (registration)
    Constant definition for the tool method string identifier used across the codebase.
    CREATE_CUSTOMER_PORTAL_SESSION: "create_customer_portal_session",

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