A modern checkout page implementation using Paddle for payment processing, built with Next.js and TypeScript.
- Frontend Framework: Next.js 15.3.1 (React 19)
- Styling: TailwindCSS 4
- Language: TypeScript
- Node.js (latest LTS version recommended)
- A Paddle account with:
- Vendor ID
- API keys
- Configured products
-
Clone the repository:
git clone https://github.com/jedpattersonpaddle/paddle-dynamic-checkout-example cd paddle-dynamic-checkout-example
-
Install dependencies:
npm install # or yarn install # or pnpm install # or bun install
-
Create a
.env.local
file in the root directory and add your Paddle configuration:NEXT_PUBLIC_PADDLE_CLIENT_TOKEN=your_client_id NEXT_PUBLIC_PADDLE_ENV="sandbox" or "production"
-
Run the development server:
npm run dev # or yarn dev # or pnpm dev # or bun dev
-
Open http://localhost:3000 with your browser to see the result.
- Sign up for a Paddle account
- Get your Vendor ID and API keys from the Paddle dashboard
- Configure your products in the Paddle dashboard
- Update the checkout configuration in
src/checkout-config.ts
-
Build the project:
npm run build
-
Start the production server:
npm run start
- The main checkout page is located in
src/app/page.tsx
- Paddle configuration is in
src/checkout-config.ts
- Custom hooks for Paddle integration are in
src/hooks/
- Utility functions are in
src/lib/
Before going live:
- Test the checkout flow in Paddle's sandbox environment
- Verify all error handling and success callbacks
- Test different payment methods and currencies
- Ensure proper handling of failed transactions
- Never commit your Paddle API keys to the repository
- Use environment variables for all sensitive configuration
- Follow Paddle's security best practices
- Keep dependencies updated
For Paddle-specific questions, refer to the Paddle Documentation. For Next.js questions, check the Next.js Documentation.
This project is licensed under the MIT License - see the LICENSE file for details.