A simple implementation of Paddle's checkout system using their v2 JavaScript library. This project consists of a frontend HTML page for the checkout interface and a Node.js backend server to securely handle the Paddle client token.
- Node.js and npm installed
- A Paddle account with API credentials
- Basic knowledge of HTML and JavaScript
- Clone the repository:
git clone [your-repo-url]
cd [your-repo-name]
- Install dependencies:
npm install
- Create a
.env
file in the root directory and add your Paddle client token:
PADDLE_CLIENT_TOKEN=your_paddle_client_token_here
paddle.html
- Frontend checkout pageserver.js
- Backend server for secure token handling
- Start the backend server:
node server.js
- Open
paddle.html
in your browser
The server will run on http://localhost:5000
- Secure handling of Paddle client token through backend
- Sandbox mode for testing
- Simple checkout button implementation
- CORS enabled for local development
- Built-in VAT handling
- Multiple payment methods (PayPal, Google Pay, Credit Card)
Here's what your customers will experience:
-
Customer Details Entry
Customers enter their contact information and location for VAT calculations. -
Payment Method Selection
Multiple payment options including PayPal, Google Pay, and credit card. -
Order Confirmation
Successful transaction confirmation with email notification.
- The frontend loads the Paddle.js library and initialises it with your client token
- Click the checkout button to open Paddle's checkout modal
- Complete the purchase flow in the modal
- The project uses Paddle's sandbox environment by default
- To switch to production, remove or modify the
Paddle.Environment.set("sandbox")
line - Update the
priceId
in the checkout button to match your product
- Never expose your Paddle client token directly in frontend code
- Always serve the token through a secure backend
- Use environment variables for sensitive data