For AI agents and LLMs: a structured documentation index is available at /llms.txt. Every page has a Markdown sibling — append .md to any URL.

Skip to content
Docs

Subscription alert

Status-aware alert banners that surface the right message based on subscription state.

Preview

Past due

Canceled

Scheduled cancel

Scheduled pause

Paused + resuming

Paused

Trialing

Playground

Props

Install

pnpm
pnpm dlx shadcn@latest add @paddle/subscription-alert
yarn
yarn dlx shadcn@latest add @paddle/subscription-alert
npm
npx shadcn@latest add @paddle/subscription-alert

Props

subscription SubscriptionAlertData
Subscription state. The component derives the right alert (past-due, paused, trial ending, scheduled change, etc.) automatically — and returns null for healthy states, so it's safe to render unconditionally. For past-due alerts, include updatePaymentMethodUrl on the subscription object to surface the recovery CTA.
onDismiss () => void
Render the alert with a dismiss button. Persist dismissal in your own layer if you want it to stick across reloads.
className string
Extra Tailwind classes applied to the root element.

What it does

A focused alert banner that picks the right message based on subscription state. Pass the subscription, and the component renders the relevant alert. It supports:

  • Payment failed
  • Canceling or pausing at period end
  • Canceled or paused, including resume date
  • Trial ending

Returns null for healthy states, so it's safe to drop in unconditionally.

When to use

  • You want to alert subscribers to actionable conditions, like updating their payment method.
  • You're rendering alongside the subscription status card component to surface state changes prominently.
  • You need consistent messaging without writing custom logic for every subscription state combination.

Was this page helpful?