Skip to content
Skillv1.0.0

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 Pad

by terminalskills(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from terminalskills/skills (skills/paddle/SKILL.md). Install upstream with npx skills add terminalskills/skills --skill paddle. Copyright stays with the author (Apache-2.0).

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.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/terminalskills-skills-paddle/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

terminalskills-skills-paddle.ocm.jsonjson
{
  "ocm": "1",
  "id": "terminalskills-skills-paddle",
  "kind": "skill",
  "name": "paddle",
  "description": "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.",
  "publisher": "terminalskills",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "finance",
      "legal"
    ],
    "tags": [
      "skill-md",
      "paddle",
      "payments",
      "subscriptions",
      "billing",
      "saas",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "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."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/terminalskills/skills",
      "path": "skills/paddle/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/terminalskills/skills/blob/HEAD/skills/paddle/SKILL.md",
      "key": "terminalskills/skills/skills/paddle/SKILL.md"
    },
    "compatibility": "Any web framework via API",
    "license": "Apache-2.0"
  },
  "instructions": "# Paddle\n\n## Overview\n\nPaddle 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.\n\n## Instructions\n\n### Step 1: Checkout Integration\n\n```typescript\n// components/Checkout.tsx — Paddle.js overlay checkout\ndeclare global { interface Window { Paddle: any } }\n\nexport function PricingButton({ priceId }: { priceId: string }) {\n  const handleCheckout = () => {\n    window.Paddle.Checkout.open({\n      items: [{ priceId, q",
  "cost": {
    "context_tokens": 708
  }
}

Fetch it by URL: GET /api/v1/registry/terminalskills-skills-paddle/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.