paddle-webhookslisted
Install: claude install-skill tanfust/skills
# Paddle webhooks and fulfilment on Supabase
None of the bad outcomes here produce an error. A redelivered `transaction.completed` mints a second licence and sends a second email. A refund arrives as `adjustment.created` with `status: pending_approval`, the handler revokes, Paddle rejects the refund a day later, and the customer who kept paying has no access. A `chargeback_reverse` lands before the `chargeback` it reverses and the late one wins. The browser's `checkout.completed` event grants access to someone who closed the overlay before the charge settled. Paddle documents the primitives (at-least-once, no ordering, five-second deadline, `event_id`, `occurred_at`) and leaves the state machine to you. This skill is that state machine, extracted from a shipped store, with the checks that prove it holds.
Scope: one-time purchases of digital goods (licence plus gated download), Paddle Billing, Next.js route handlers, Supabase Postgres written with the service role. Every Paddle fact is quoted with its source in `references/EVENTS.md`; the tables and handler are in `references/SCHEMA.md`.
## Order of work
1. Draw the trust boundary before writing a route
2. Create the notification destination
3. Write the route: raw body, verify, respond fast
4. Write the ledger and the licence constraint
5. Fulfil `transaction.completed`
6. Apply adjustments by action and status
7. Verify with the simulator, the ledger and a real sandbox refund
## 1. Draw the trust boundary
Money and ide