create_customer
Create new customer records in Paddle Billing to store purchaser information for transactions, invoices, and business associations.
Instructions
This tool will create a new customer in Paddle.
Customer entities hold information about the people and businesses that make purchases.
Customers have two sub-entities:
addresses: Customers require an address to make a purchase, which can be created through the create_address tool. Can have multiple addresses.
businesses: Customers can optionally be associated with businesses, which can be created through the create_business tool.
Ensure you have all the information needed before making the call. Don't fabricate, imagine, or infer details and parameter values unless explicitly asked to. If anything is ambiguous, unknown, or unclear, ask the user for clarification or details before you proceed.
If successful, the response includes a copy of the new customer entity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Full name of this customer. Required when creating transactions where `collectionMode` is `manual` (invoices). | |
| Yes | Email address for this customer. | ||
| customData | No | Any structured custom key-value data needed outside of Paddle's standard fields. Occasionally used by third-parties. | |
| locale | No | Valid IETF BCP 47 short form locale tag. If omitted, defaults to `en`. |
Implementation Reference
- src/functions.ts:271-278 (handler)The main handler function for the 'create_customer' tool. It uses the Paddle SDK to create a new customer with the provided parameters.export const createCustomer = async (paddle: Paddle, params: z.infer<typeof Parameters.createCustomerParameters>) => { try { const customer = await paddle.customers.create(params); return customer; } catch (error) { return error; } };
- src/tools.ts:241-251 (schema)The tool schema definition in the tools array, specifying the method name, description, parameters schema (Zod), and required actions for 'create_customer'.method: "create_customer", name: "Create a customer", description: prompts.createCustomerPrompt, parameters: params.createCustomerParameters, actions: { customers: { write: true, create: true, }, }, },
- src/api.ts:30-30 (registration)Registration of the 'create_customer' tool in the toolMap, mapping TOOL_METHODS.CREATE_CUSTOMER to the createCustomer handler function.[TOOL_METHODS.CREATE_CUSTOMER]: funcs.createCustomer,
- src/constants.ts:22-22 (registration)Constant definition for the tool method name 'create_customer' used in registration and tool definitions.CREATE_CUSTOMER: "create_customer",