Paddle helpers
Shared display types, format utilities, and payment method display for Paddle UI components. No SDK dependency — safe to install without @paddle/paddle-js.
Install
pnpm dlx shadcn@latest add @paddle/paddle-helpersyarn dlx shadcn@latest add @paddle/paddle-helpersnpx shadcn@latest add @paddle/paddle-helpersUse an AI agent
Import this component from https://developer.paddle.com/r/paddle-helpers.json and open the code for editing. IMPORTANT: preserve the component exactly as-is. Do NOT change colors, CSS variables, Tailwind classes, spacing, fonts, or any visual styles. Do NOT regenerate or restyle the UI. Create files from the registry JSON verbatim and show the code tree.Props
monthly, every 3 months. Used internally by the pricing and subscription components. 7 days, 1 month) from Paddle's trial structure. Intl.NumberFormat. Handles zero-decimal currencies (JPY, KRW, etc.) correctly. formatMoney. Converts Paddle's string-amount format to a JavaScript number, handling zero-decimal currencies. 1 Feb 2025) for any ISO 8601 date string. prorated_immediately → Prorated, charged today). Paddle client utilities
Paddle.js initialization singleton, SDK type re-exports, checkout event mapper, and SDK-layer hooks used by all client-side Paddle blocks.
Install
pnpm dlx shadcn@latest add @paddle/paddle-clientyarn dlx shadcn@latest add @paddle/paddle-clientnpx shadcn@latest add @paddle/paddle-clientUse an AI agent
Import this component from https://developer.paddle.com/r/paddle-client.json and open the code for editing. IMPORTANT: preserve the component exactly as-is. Do NOT change colors, CSS variables, Tailwind classes, spacing, fonts, or any visual styles. Do NOT regenerate or restyle the UI. Create files from the registry JSON verbatim and show the code tree.Props
Paddle instance, initialising once per token. Subsequent calls with the same token return the cached promise. Also wires up a dispatcher so multiple hooks can subscribe to eventCallback. priceIds. Re-fetches when the IDs or country code change. Returns prices keyed by ID. open / close functions plus a ready flag for when Paddle.js has finished initialising. Usage notes
Create a client-side token at Paddle > Developer Tools > Authentication. Sandbox tokens start with test_ (use sandbox-vendors.paddle.com). Live tokens start with live_ (use vendors.paddle.com). Set NEXT_PUBLIC_PADDLE_ENV to 'sandbox' or 'production' to match your token. See: https://developer.paddle.com/paddlejs/client-side-tokens
About the core components
Most Paddle UI components depend on two shared libraries:
paddle-helpers: includes types, formatters, and payment-method icons.paddle-client: a singleton Paddle.js instance, event dispatcher, and SDK hooks.
You don't usually install these directly. When you add any visual component that needs them, the shadcn CLI pulls them in automatically.