An open API service indexing awesome lists of open source software.

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.

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)