A whole checkout on one surface: the order summary with promo code and tax beside the payment form, a processing state, a declined payment that keeps what was typed, and the receipt, which forms out of the payment card in a pixel wave when the payment goes through.
- Plan checkout
- Seat purchase
- One-off order
- Upgrade payment
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- lines / currency / locale / tax
as in Order Summary- The order.
- promo / onPromoChange / onApplyPromo
as in Order Summary- The code, controlled or not, and the check.
- onPay
(draft, totals) => Promise<{ receiptNumber, paidAt, method }>- Starts the payment. Resolve with the receipt's details; throw { code, message } to decline.
- onStatusChange
(status: "form" | "processing" | "paid" | "failed") => void- Every step of the state machine, for analytics or a page title.
- defaultDraft
Partial<CardDraft>- A draft to start from, such as the signed-in email.
- wallets / askPostal / note
ReactNode / boolean / ReactNode- Passed to the payment form and the summary.
- merchant / receiptNote / receiptHref / onDownloadReceipt / onEmailReceipt / receiptAction
as in Receipt Card- The paid state.
- tone
"accent"|"success"|"spectrum"|[light, mid, deep]- Default
"success" - The wave's colours into the receipt.
- layout
"auto"|"split"|"stack"- Default
"auto" - Auto puts the summary beside the form once the box is 768px wide.
| Prop | Type | Default | Description |
|---|---|---|---|
| lines / currency / locale / tax | as in Order Summary | - | The order. |
| promo / onPromoChange / onApplyPromo | as in Order Summary | - | The code, controlled or not, and the check. |
| onPay | (draft, totals) => Promise<{ receiptNumber, paidAt, method }> | - | Starts the payment. Resolve with the receipt's details; throw { code, message } to decline. |
| onStatusChange | (status: "form" | "processing" | "paid" | "failed") => void | - | Every step of the state machine, for analytics or a page title. |
| defaultDraft | Partial<CardDraft> | - | A draft to start from, such as the signed-in email. |
| wallets / askPostal / note | ReactNode / boolean / ReactNode | - | Passed to the payment form and the summary. |
| merchant / receiptNote / receiptHref / onDownloadReceipt / onEmailReceipt / receiptAction | as in Receipt Card | - | The paid state. |
| tone | "accent" | "success" | "spectrum" | [light, mid, deep] | "success" | The wave's colours into the receipt. |
| layout | "auto" | "split" | "stack" | "auto" | Auto puts the summary beside the form once the box is 768px wide. |
Accessibility
- Processing and Payment received are announced in a polite live region.
- When the receipt forms, focus moves from the pay button into the receipt; the old card is inert while it leaves.
- On a phone the summary toggle says whether it is shown (aria-expanded) and always shows the total.
- Everything on the payment form and the order summary applies here too.
What it handles
- 01Puts the order summary beside the payment form from 768px, and behind a toggle with the total on a phone.
- 02Runs one state machine: form, processing, paid or declined. A double press does nothing and a late answer after a reset is dropped.
- 03Sends the draft and the totals to your onPay and reads a decline from whatever it throws ({ code, message }).
- 04Keeps every field after a decline, with Try again and Use another card when the bank says so.
- 05Turns the payment card into the receipt through Pixel Wave, from the pay button, in the success tone, and announces Payment received.
- 06Keeps the promo and the totals the same in the summary, on the button and on the receipt.
States
- First render
- Nothing moves
- none
- Order summary on a phone
- The summary folds open
- 180ms, ease out
- Processing
- The pay button spins, the fields dim
- until onPay settles
- Paid
- The pay card breaks into dots and the receipt forms behind them
- 120 + 420 + 180ms
- Declined
- The reason shows above the button
- none
- Reduced motion
- The receipt crossfades in
- 120ms, ease out
| State | What moves | Timing |
|---|---|---|
| First render | Nothing moves | none |
| Order summary on a phone | The summary folds open | 180ms, ease out |
| Processing | The pay button spins, the fields dim | until onPay settles |
| Paid | The pay card breaks into dots and the receipt forms behind them | 120 + 420 + 180ms |
| Declined | The reason shows above the button | none |
| Reduced motion | The receipt crossfades in | 120ms, ease out |
Works with
When to use
When to use
- Taking a card payment for a plan, seats or a one-off order on one screen, from the order to the receipt.
- A checkout you run with your own provider's tokeniser and want to look like the rest of the product, declines included.
When not to use
- Only the lines and the total, beside your own payment step: use Order Summary.
- Only the card fields, inside your own flow: use Payment Form.
- Choosing between plans before paying: use Pricing.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Checkout to my app and wire it to my own data.
- I need taking a card payment for a plan, seats or a one-off order on one screen, from the order to the receipt. Set that up with the Knowns UI Checkout.
- Which Checkout props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "checkout" }) and search_docs({ query: "checkout" }). Pro props, full examples and source come back once your license key is in the MCP config.