BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/paddle/subscription-payment-card

Subscription payment card

paddle/subscription-payment-card
FreeComponent

Payment method and next billing summary card. Auto-resolves payment method display labels from Paddle type/brand/last4 fields. Shows next payment amount, date, and portal link to update payment details.

Install it

npx shadcn@latest add https://developer.paddle.com/r/subscription-payment-card.json

Source

registry/new-york/blocks/subscription-payment-card/components/subscription-payment-card.tsxdeveloper.paddle.com/r/subscription-payment-card.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import { CreditCard, Calendar, ExternalLink } from "lucide-react"
5import { Card, CardContent, CardHeader, CardTitle } from "@/registry/new-york/ui/card"
6import { Skeleton } from "@/registry/new-york/ui/skeleton"
7import { Separator } from "@/registry/new-york/ui/separator"
8import { cn } from "@/lib/utils"
9import type {
10 NextPaymentData,
11 PaymentMethodData,
12} from "@/registry/new-york/blocks/paddle-helpers/lib/paddle-types"
13import { getPaymentMethodDisplay } from "@/registry/new-york/blocks/paddle-helpers/lib/paddle-payment-method-display"
14import { getPaymentMethodIcon } from "@/registry/new-york/blocks/paddle-helpers/lib/payment-method-icons"
15import {
16 formatMoney,
17 formatDate,
18} from "@/registry/new-york/blocks/paddle-helpers/lib/paddle-format"
19
20export type SubscriptionPaymentCardProps = {
21 /**
22 * Next payment details. Absent when subscription is paused or canceled.
23 *
24 * Pass `undefined` for all three data props (`nextPayment`, `paymentMethod`,
25 * `updatePaymentMethodUrl`) to render the skeleton loading state.
26 */
27 nextPayment?: NextPaymentData
28 /**
29 * Payment method details. Pass raw fields from `transaction.payments[0].method_details`
30 * — the component resolves the display label automatically.
31 * Absent when not available from transaction history.
32 */
33 paymentMethod?: PaymentMethodData
34 /** Portal deep link to update payment method. Absent for manual collection. */
35 updatePaymentMethodUrl?: string
36 className?: string
37}
38
39export function SubscriptionPaymentCard({
40 nextPayment,
41 paymentMethod,
42 updatePaymentMethodUrl,
43 className,
44}: SubscriptionPaymentCardProps) {
45 const isLoading =
46 nextPayment === undefined && paymentMethod === undefined && updatePaymentMethodUrl === undefined
47
48 if (isLoading) {
49 return <SubscriptionPaymentCardSkeleton className={className} />
50 }
51
52 const displayLabel = paymentMethod
53 ? (paymentMethod.label ??
54 getPaymentMethodDisplay(paymentMethod.type, paymentMethod.cardBrand, paymentMethod.last4))
55 : undefined
56
57 const PaymentMethodIcon = paymentMethod
58 ? (getPaymentMethodIcon(paymentMethod.type, paymentMethod.cardBrand) ?? CreditCard)
59 : CreditCard
60
61 const expiryLabel =
62 paymentMethod?.expiryMonth !== undefined && paymentMethod?.expiryYear !== undefined
63 ? `Expires ${String(paymentMethod.expiryMonth).padStart(2, "0")}/${String(paymentMethod.expiryYear).slice(-2)}`
64 : undefined
65
66 return (
67// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • @paddle/paddle-helpers
  • card
  • skeleton
  • separator

Files it writes

  • registry/new-york/blocks/subscription-payment-card/components/subscription-payment-card.tsx
  • registry/new-york/blocks/subscription-payment-card/components/paddle-subscription-payment-card.tsx
  • registry/new-york/blocks/subscription-payment-card/lib/subscription-payment-card-utils.ts

Facts

Registry
paddle
Type
registry:component
Access
Free
Files written
3
Licence
Apache-2.0
First indexed
2026-08-01
Last confirmed
today

Go to the source

developer.paddle.com PaddleHQ/paddle-ui on GitHub Raw registry item This item as JSON

More from paddle

All 14 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Billing interval togglebilling-interval-togglepaddleComponentsFreeno deps
Checkout summarycheckout-summarypaddleComponentsFreeno deps · 3 files
Plan change breakdownplan-change-breakdownpaddleComponentsFree1 dep · 3 files
Plan change previewplan-change-previewpaddleComponentsFree1 dep · 3 files
Pricing cardspricing-cardspaddleComponentsFree1 dep · 2 files
Pricing select cardspricing-select-cardspaddleComponentsFree1 dep · 4 files
Subscription alertsubscription-alertpaddleComponentsFree1 dep · 3 files
Subscription status cardsubscription-status-cardpaddleComponentsFree1 dep · 3 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex