BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/billingsdk/payment-details-two

Payment Details Two

billingsdk/payment-details-two
FreeBlock

A comprehensive payment details form component with card details, billing information, and country selection built using React Hook Form and custom validation

Install it

npx shadcn@latest add https://billingsdk.com/r/payment-details-two.json

Source

src/registry/billingsdk/payment-details-two.tsxbillingsdk.com/r/payment-details-two.json · first 6 KB
1"use client";
2
3import { useForm } from "react-hook-form";
4import { Input } from "@/components/ui/input";
5import { Label } from "@/components/ui/label";
6import { Textarea } from "@/components/ui/textarea";
7import {
8 Select,
9 SelectContent,
10 SelectItem,
11 SelectTrigger,
12 SelectValue,
13} from "@/components/ui/select";
14import {
15 detectCardType,
16 formatCardNumber,
17 formatExpiryDate,
18 validateLuhn,
19} from "@/utils/card-validation";
20import {
21 Check,
22 CreditCard,
23 Shield,
24 ChevronLeft,
25 ChevronRight,
26} from "lucide-react";
27import { useState, useEffect } from "react";
28import { cn } from "@/lib/utils";
29import { Button } from "@/components/ui/button";
30import {
31 Card,
32 CardContent,
33 CardDescription,
34 CardFooter,
35 CardHeader,
36 CardTitle,
37} from "@/components/ui/card";
38import { motion, AnimatePresence } from "motion/react";
39import { Country, State, City } from "country-state-city";
40
41export interface PaymentFormData {
42 nameOnCard?: string;
43 cardNumber?: string;
44 validTill?: string;
45 cvv?: string;
46 firstName?: string;
47 middleLastName?: string;
48 country?: string;
49 state?: string;
50 city?: string;
51 billingAddress?: string;
52 pinCode?: string;
53 contactNumber?: string;
54 general?: string;
55}
56
57const CardLogo = ({ type }: { type: string }) => {
58 switch (type) {
59 case "visa":
60 return (
61 <div className="flex h-5 w-10 items-center justify-center rounded bg-blue-600 text-xs font-bold text-white">
62 VISA
63 </div>
64 );
65 case "mastercard":
66 return (
67 <div className="flex items-center">
68 <div className="h-5 w-5 rounded-full bg-red-500"></div>
69 <div className="-ml-2 h-5 w-5 rounded-full bg-orange-400"></div>
70 </div>
71 );
72 case "amex":
73 return (
74 <div className="flex h-6 w-10 items-center justify-center rounded bg-blue-500 text-xs font-bold text-white">
75 AMEX
76 </div>
77 );
78 case "rupay":
79 return (
80 <div className="flex h-5 w-10 items-center justify-center rounded bg-green-600 text-xs font-bold text-white">
81 RuPay
82 </div>
83 );
84 case "discover":
85 return (
86 <div className="flex h-6 w-10 items-center justify-center rounded bg-orange-600 text-xs font-bold text-white">
87 DISC
88 </div>
89 );
90 default:
91 return <CreditCard className="text-muted-foreground h-5 w-5" />;
92 }
93};
94
95export function PaymentDetailsTwo({
96 className,
97 onSubmit,
98 onDiscard,
99 countries,
100 states,
101 cities,
102}: {
103// … truncated

What it pulls in

npm packages

  • lucide-react
  • react-hook-form
  • motion
  • country-state-city

Other registry items

  • button
  • card
  • input
  • label
  • select
  • textarea
  • utils

Files it writes

  • src/registry/billingsdk/payment-details-two.tsx
  • src/registry/billingsdk/demo/payment-details-two-demo.tsx
  • src/utils/card-validation.ts

Facts

Registry
billingsdk
Type
registry:block
Access
Free
Files written
3
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

billingsdk.com dodopayments/billingsdk on GitHub Raw registry item This item as JSON

More from billingsdk

All 35 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
All ComponentsallbillingsdkBlocksFreeno deps
Top BannerbannerbillingsdkBlocksFree2 deps · 2 files
Billing Screenbilling-screenbillingsdkBlocksFree2 deps · 2 files
Billing Settingsbilling-settingsbillingsdkBlocksFree2 deps · 2 files
Billing Settings 2billing-settings-2billingsdkBlocksFree1 dep · 2 files
Cancel Subscription Cardcancel-subscription-cardbillingsdkBlocksFree1 dep · 3 files
Cancel Subscription Dialogcancel-subscription-dialogbillingsdkBlocksFree1 dep · 3 files
Detailed Usage Tabledetailed-usage-tablebillingsdkBlocksFreeno deps · 2 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex