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-helpersProps
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-clientProps
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.