Checkout
The order summary and billing details for a first purchase: company, tax ID, email and country, then the card field your processor mounts, then Pay with the total that will be charged.
The decision inside it
Tax before Pay, not after the charge
Choosing a country resolves the tax line while Pay waits, so the figure on the button is the figure on the statement. The component never sees a card number — that field belongs to your processor.
Installation
How you get it
One command. The CLI writes the file into components/ui/ and installs what it needs.
npx shadcn@latest add https://layropro.com/r/checkout-formPro components need the CLI token from your account page. Put it in your environment as LAYRO_KEY and use the namespaced form.
API
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
planrequired | { name: string; price: Cents; interval: "month" | "year" } | — |
description | string | One line under the title: what they are buying, in words. |
reference | string | The order reference, shown beside the title: "#40950". |
countriesrequired | CheckoutCountry[] | — |
defaultCountry | string | — |
resolveTaxrequired | (country: string) => Promise<TaxRule | null> | Resolve tax for a country. Asynchronous, because the buyer's tax service usually is — and while it runs, Pay waits. `null` means no tax applies, which is shown as a line, not left out. |
applyCode | (code: string) => Promise<CodeResult> | Validate a discount code. Omit to hide the option. |
cardElement | React.ReactNode | The processor's card field. This component never renders its own. |
nextChargeOnrequired | string | When the next full charge happens: "14 Oct". |
defaultEmail | string | — |
defaultCompany | string | — |
currency | string | — |
locale | string | — |
title | string | — |
onPay | (details: { | — |
emailrequired | string | — |
companyrequired | string | — |
countryrequired | string | — |
taxIdrequired | string | — |
code | string | — |
totalrequired | Cents | — |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLayro foundations, installed alongside it
layro-themeLifetime access
Every component, and everything we ship next.
- All 65 components, source included
- The template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in Billing
Subscription Status
PaidSix states, each with the date it depends on — and cancelled is not expired.
Included with lifetime access
Plan Picker
FreeThe exact charge printed under the button: prorated today, then the renewal.
Invoice History
FreeThe next invoice as a dashed estimate above the record, and notes for odd amounts.