Skip to main content
Glama
PaddleHQ
by PaddleHQ

create_client_side_token

Generate client-side tokens to authenticate Paddle.js integrations for specific applications or environments, enabling secure payment processing.

Instructions

This tool will create a new client-side token in Paddle.

Client-side tokens are needed to authenticate with Paddle.js. A token is provided when initializing Paddle.js.

When creating a client-side token, provide a descriptive name to help identify its purpose. Usually created for each application or environment that needs to authenticate with Paddle.js.

If successful, the response includes a copy of the new client-side token entity. The returned token field is the client-side token that needs to be provided when initializing Paddle.js. Can be exposed client-side safely. If it starts with:

  • test_: The token is a test token for a sandbox environment and shouldn't be used in production.

  • live_: The token is a live token for a production environment. It can be used to test too but Paddle.js checkouts require real cards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of this client-side token.
descriptionNoShort description for this client-side token.

Implementation Reference

  • The handler function that implements the core logic of the 'create_client_side_token' tool by calling paddle.clientTokens.create(params) and handling errors.
    export const createClientSideToken = async (paddle: Paddle, params: z.infer<typeof Parameters.createClientSideTokenParameters>) => { try { const clientSideToken = await paddle.clientTokens.create(params); return clientSideToken; } catch (error) { return error; } };
  • Tool schema definition including the method name, human-readable name, description prompt, Zod parameters schema reference, and required actions for permissions.
    { method: "create_client_side_token", name: "Create a client-side token", description: prompts.createClientSideTokenPrompt, parameters: params.createClientSideTokenParameters, actions: { clientSideTokens: { write: true, create: true, }, }, },
  • src/api.ts:90-90 (registration)
    Registers the createClientSideToken handler function to the tool method constant in the toolMap used by PaddleAPI to dispatch tool calls.
    [TOOL_METHODS.CREATE_CLIENT_SIDE_TOKEN]: funcs.createClientSideToken,
  • Constant defining the string identifier for the 'create_client_side_token' tool method.
    CREATE_CLIENT_SIDE_TOKEN: "create_client_side_token",

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