create_address
Add a billing address to a customer's Paddle account, enabling them to complete purchases and meet tax and compliance requirements.
Instructions
This tool will create a new address for a customer in Paddle.
Address entities hold billing address information for a customer. Customers must have an address to make a purchase. A transaction can be created without an address, but it can't go past a status of draft until an address is added.
To make buying as frictionless as possible, Paddle only requires a country. For tax calculation, fraud prevention, and compliance purposes, postalCode is required when creating addresses for some countries, like ZIP codes in the USA and postcodes in the UK.
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 address entity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customerId | Yes | Paddle ID of the customer. | |
| description | No | Memorable description for this address. | |
| firstLine | No | First line of this address. | |
| secondLine | No | Second line of this address. | |
| city | No | City of this address. | |
| postalCode | No | ZIP or postal code of this address. Required for some countries. | |
| region | No | State, county, or region of this address. | |
| countryCode | Yes | Two-letter ISO 3166-1 alpha-2 country code. | |
| customData | No | Any structured custom key-value data needed outside of Paddle's standard fields. Occasionally used by third-parties. |
Implementation Reference
- src/functions.ts:312-320 (handler)The core handler function that executes the create_address tool logic by destructuring customerId and address data from params and calling paddle.addresses.create.export const createAddress = async (paddle: Paddle, params: z.infer<typeof Parameters.createAddressParameters>) => { try { const { customerId, ...updateData } = params; const address = await paddle.addresses.create(customerId, updateData); return address; } catch (error) { return error; } };
- src/tools.ts:288-298 (schema)Tool definition including the method name, description, parameters schema reference (params.createAddressParameters), and required actions for the create_address tool.{ method: "create_address", name: "Create an address for a customer", description: prompts.createAddressPrompt, parameters: params.createAddressParameters, actions: { addresses: { write: true, create: true, }, },
- src/api.ts:34-34 (registration)Registers the createAddress handler function under the TOOL_METHODS.CREATE_ADDRESS key in the toolMap for tool invocation.[TOOL_METHODS.CREATE_ADDRESS]: funcs.createAddress,
- src/constants.ts:26-26 (helper)Defines the string constant for the create_address tool method name.CREATE_ADDRESS: "create_address",