Staaarter

Billing Payment Failure Recovery

A focused recovery alert for the moment a charge fails. It surfaces the specific reason a card was declined, shows which card was used, and gives the user two clear ways forward: retry the same card or add a new one. Built for billing dashboards and account settings pages where recovering the payment matters more than anything else on screen.

By Staaarter Team
Billing
Updated April 2, 2026
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/billing-payment-failure-recovery.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing85.tsx instead.

Usage

The file also exports billing85Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Billing85, billing85Demo } from "@/components/blocks/billing/billing85";

export default function Page() {
  return <Billing85 {...billing85Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstring"Payment failed"Small label above the heading.
headingstring"We couldn't process your last payment"Main headline.
reasonstringnoneOptional decline reason from your payment gateway, shown under the heading.
cardBrandstringnoneCard brand of the failed payment method, e.g. "Visa". Shown together with cardLast4.
cardLast4stringnoneLast 4 digits of the failed card. Shown together with cardBrand.
retryLabelstring"Retry payment"Label on the primary retry button.
retryHrefstringnoneDestination for the retry action.
addCardLabelstring"Use another card"Label on the secondary button.
addCardHrefstringnoneDestination for adding a new payment method.
supportHrefstringnoneOptional link to a support or help page, omitted if not passed.
supportLabelstring"Contact support"Label for the support link.
classNamestringnoneExtra classes for the outer alert container.

Behavior notes

  • This is a static alert, not a live retry form. retryHref and addCardHref are real links (rendered through the Button component's render prop), so wire them to your actual retry endpoint and add-card flow.
  • cardBrand and cardLast4 only render when both are provided, so the alert still reads fine if you don't have the failed card's details on hand.
  • The reason text is passed through as-is, so use your payment gateway's own decline message (for example "Insufficient funds" or "Incorrect CVC") rather than a generic string.
  • supportHref is optional; the support link is omitted entirely when it isn't passed, rather than rendering a dead link.
  • The alert renders with role="alert" so assistive tech announces the failure as soon as it mounts.

Frequently asked questions