> paddle
Accept payments with Paddle as merchant of record. Use when a user asks to add subscription billing without handling tax compliance, accept international payments, implement a payment system where Paddle handles VAT/sales tax, or build a SaaS billing system.
curl "https://skillshub.wtf/TerminalSkills/skills/paddle?format=md"Paddle
Overview
Paddle is a merchant of record — it handles payments, tax compliance (VAT, sales tax), invoicing, and fraud protection. Unlike Stripe, you don't need to register for tax in every country. Paddle sells on your behalf and remits taxes globally.
Instructions
Step 1: Checkout Integration
// components/Checkout.tsx — Paddle.js overlay checkout
declare global { interface Window { Paddle: any } }
export function PricingButton({ priceId }: { priceId: string }) {
const handleCheckout = () => {
window.Paddle.Checkout.open({
items: [{ priceId, quantity: 1 }],
customer: { email: 'user@example.com' },
customData: { userId: 'usr_123' },
})
}
return <button onClick={handleCheckout}>Subscribe</button>
}
// Add to layout:
// <script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
// Paddle.Initialize({ token: 'live_xxx' })
Step 2: Webhook Handler
// api/paddle/webhook.ts — Process Paddle events
import { Paddle } from '@paddle/paddle-node-sdk'
const paddle = new Paddle(process.env.PADDLE_API_KEY!)
export async function POST(req: Request) {
const body = await req.text()
const signature = req.headers.get('paddle-signature')!
const event = paddle.webhooks.unmarshal(body, process.env.PADDLE_WEBHOOK_SECRET!, signature)
switch (event.eventType) {
case 'subscription.created':
await db.user.update({
where: { paddleCustomerId: event.data.customerId },
data: { plan: 'pro', subscriptionId: event.data.id },
})
break
case 'subscription.canceled':
await db.user.update({
where: { subscriptionId: event.data.id },
data: { plan: 'free', canceledAt: new Date() },
})
break
case 'transaction.completed':
// Payment received — update invoice records
break
}
return new Response('OK')
}
Step 3: API Usage
// lib/paddle.ts — Manage subscriptions server-side
import { Paddle } from '@paddle/paddle-node-sdk'
const paddle = new Paddle(process.env.PADDLE_API_KEY!)
// Create a customer
const customer = await paddle.customers.create({
email: 'user@example.com',
name: 'John Doe',
})
// List subscriptions
const subscriptions = await paddle.subscriptions.list({
customerId: [customer.id],
})
// Cancel subscription
await paddle.subscriptions.cancel(subscriptionId, {
effectiveFrom: 'next_billing_period',
})
Guidelines
- Paddle is a merchant of record — it handles VAT, sales tax, invoices. You receive net payouts.
- Paddle takes ~5% + payment processing fees. Higher than Stripe, but includes tax compliance.
- Use Paddle Billing for subscriptions, Paddle Checkout for one-time purchases.
- Best for indie devs and small teams who don't want to deal with global tax registration.
> related_skills --same-repo
> zustand
You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.
> zoho
Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.
> zod
You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.
> zipkin
Deploy and configure Zipkin for distributed tracing and request flow visualization. Use when a user needs to set up trace collection, instrument Java/Spring or other services with Zipkin, analyze service dependencies, or configure storage backends for trace data.