paddle-subscription-cancel
SKILL.md
Cancel a Paddle subscription from Next.js
When to use this skill
Use this skill when building the "Cancel subscription" button (or equivalent) on the authenticated user's billing or account page. It covers a Next.js 15 (App Router) Server Action that calls paddle.subscriptions.cancel() with the right options, the security checks every cancel action needs, what to do after the cancel succeeds, and the relationship between Paddle's canceled status and a scheduledChange block.
This is the initiating side of subscription cancellation. Pair it with:
subscription-syncfor the receiving side — your webhook handler will get asubscription.updatedevent reflecting the schedule change, then asubscription.canceledevent when the period actually ends.webhooksif you haven't set up the webhook endpoint yet.
Prerequisites
- A working Paddle account with at least one active subscription (sandbox is fine).
- Server-side
PADDLE_API_KEYavailable — this action runs in a Server Action, never in the browser. - A
customerstable and asubscriptionstable mirrored from webhooks (seesubscription-sync). You need to know which Paddle customer the authenticated user is, and which subscription they're trying to cancel. - An auth system. The examples use Supabase, but any session-based auth works.