← ClaudeAtlas

paddle-webhookslisted

Build and verify the Paddle Billing webhook that fulfils one-time digital purchases into Supabase, with signature verification on the raw body, an event_id idempotency ledger, licences keyed on (transaction, product), download tokens, and refund and chargeback revocation driven by adjustment action and status with an occurred_at guard. Use this whenever the work touches Paddle webhooks or notification destinations, transaction.completed, adjustment.created or adjustment.updated, Paddle-Signature or pdl_ntfset_ secrets, paddle.webhooks.unmarshal, custom_data or supabase_user_id on a checkout, licence tables written from Paddle, duplicate fulfilment emails, a refund that did not revoke access, the Paddle simulator, or "invalid signature" and timeouts in the notifications log. Reach for it even for "just handle the webhook", because the failures charge or refund real people and nothing throws. Not for subscriptions (revenuecat-supabase-entitlements), domain approval (paddle-domain-verification), or Stripe.
tanfust/skills · ★ 0 · Web & Frontend · score 73
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