https://github.com/blankeos/paddle-solid-example
Paddle integration in Solid + Hono.
https://github.com/blankeos/paddle-solid-example
Last synced: 8 months ago
JSON representation
Paddle integration in Solid + Hono.
- Host: GitHub
- URL: https://github.com/blankeos/paddle-solid-example
- Owner: Blankeos
- Created: 2024-07-17T15:31:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T16:10:04.000Z (almost 2 years ago)
- Last Synced: 2025-02-13T08:41:23.198Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# paddle-solid-example
> [!WARNING]
> Currently WIP. I'm using this to learn at the moment but will polish it out as my standard for integrating payments with Paddle.
> This was bootstrapped with [Solid Hop](https://github.com/blankeos/solid-hop).
- Paddle
- SolidJS
- Hono + Vike
A Paddle integration that works in the 🇵🇠Philippines :D. If you're just learning, I recommend cloning this and taking a few hours to study it (even if I don't use similar tech as you).
Concept: A Watercolor Brush Company
Features covered
- [x] Products
- [x] Simple one-time payment with tiers (Basic, Professional Set for Watercolor Brushes)
- [x] Recurring Subscription (Membership)
- [ ] One-time payment with extra units (Watercolor event tickets)
- [ ] Discounts
- [ ] Webhook
- [ ] Non-paddle related: Simple Auth + Database signifiying that the user has paid
## Quickstart
1. Fill environment variables
- `cp .env.example .env`
- `PUBLIC_ENV__PADDLE_SELLER_ID` - From **Paddle > Developer Tools > Authentication**
- `PUBLIC_ENV__PADDLE_CLIENT_SIDE_TOKEN` - From **Paddle > Developer Tools > Authentication**
2. Create Products and Prices in Paddle
- Go to **Paddle > Catalog > Products**
- Make the following:
- Watercolor Brush (Basic) - $4 - One-time payment
- Watercolor Brush (Profesional Set) - $14 - One-time payment
- Watercolor Co Membership - $4 - Recurring Subscription per month
- After creating the products, get their **Price IDs**
- Go to `index/+Page.tsx` of this project and paste the **Price IDs** in the `products.id`.
3. Install deps and run dev server
```sh
bun install
bun dev
```
## Some notes
Paddle-related:
- [x] Get **Seller ID** from \***\*Paddle > Developer Tools > Authentication\*\*** Page
- [x] Create a **Product** and **Price** from **Paddle > Catalog > Products**
- [x] Generate a **Client-Side Token** from **Paddle > Developer Tools > Authentication**
Code-related:
- [x] Install @paddle/paddle-js
- [x] Make a context provider surrounding Paddle.
## Resources
- https://github.com/PaddleHQ/paddle-js-wrapper
- https://developer.paddle.com/build/checkout/build-overlay-checkout
- https://www.youtube.com/watch?v=r7uf_u7tI7k (Super outdated)