# Checkout Setup block

> Hosted checkout setup form with label-and-control rows, Select dropdowns, and checkbox groups

Configure a hosted checkout: offer type, button copy, and handoff via ReUI Frame and Badge with shadcn Field rows, Select, Checkbox groups, InputGroup, Tooltip, and Button. Settings form, payment config, store admin panel.

- Type: Pro block
- Category: [Form](https://web.dev.reui.io/blocks/application/form.md)
- Page: https://web.dev.reui.io/blocks/application/form/form-2
- Docs (Base UI): https://ui.shadcn.com/docs/components/base/field.md
- Docs (Radix UI): https://ui.shadcn.com/docs/components/radix/field.md
- MCP: `get_block("form-2")`
- Built with: Badge, Button, Checkbox, Field, Frame, Input Group, Select, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Checkout options as 3 checkbox groups, one option locked until legal terms connect, under a Ready to publish badge

## Agent notes

- Replace `DEFAULT_CHECKOUT_FORM_VALUES` and the `CUSTOMER_DETAIL_OPTIONS`, `CHECKOUT_RULE_OPTIONS` and `HANDOFF_DETAIL_OPTIONS` checkbox lists in data.ts
- Add add-ons and Save draft only call `showCheckoutToast`, and the Ready to publish badge is fixed text that no field updates
- Offer name, return URL and every `Checkbox` are uncontrolled through `defaultValue` and `defaultChecked`, and only the 3 Selects sit in state

## When not to use

- A read only summary of submitted business details, edited section by section in a modal: use [Business Verification](https://web.dev.reui.io/blocks/application/form/form-6.md) (`get_block("form-6")`)
- General app options with accent color swatches, a date format toggle and Pro badges: use [General Settings](https://web.dev.reui.io/blocks/application/settings/settings-3.md) (`get_block("settings-3")`)

## Third-party libraries

- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/form-2
```

## About Form blocks

### When to use

- New record entry: an invoice with line items, a product, an app launch, an onboarding plan or a member invite
- Editing a record already on file, such as a user profile, a support ticket or a business verification
- Admin configuration pages for hosted checkout, sign-in methods and lockout rules, or API keys

### When not to use

- An account area that swaps team, notification and billing panels from a side rail or tabs: use the [Profile blocks](https://web.dev.reui.io/blocks/application/profile.md)
- A list of toggles for notification channels, app integrations or workspace options: use the [Settings blocks](https://web.dev.reui.io/blocks/application/settings.md)
- A create, invite or connect flow that opens over the current page in a modal: use the [Dialog blocks](https://web.dev.reui.io/blocks/application/dialog.md)

### Agent notes

- Each submit handler calls `preventDefault` and sends no request; post the values to your API from it
- Save feedback calls `toast` from `sonner`; mount the sonner Toaster once in your layout or no message shows
- Each block sets its own `min-h-svh` wrapper, padding and max width in page.tsx or its root component; drop them inside an app shell

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
