# Ecommerce Checkout: Billing Address Toggle

A working switch keeps billing matched to shipping or reveals the full billing form, with the decline warning that explains why banks care.

- Page: https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/billing-address-toggle
- Collection: [Ecommerce](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro), Standard tier
- Group: [Checkout](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts)
- Created: 2026-07-04
- Preview image: https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/billing-address-toggle.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/ecommerce-pro-checkouts-billing-address-toggle
```

Needs an API key from a Pro or Team plan: add `@shadcn-ui-blocks` to the registries in components.json with the key as an `Authorization: Bearer` header. Setup: https://www.shadcn-ui-blocks.com/docs/shadcn-cli. The MCP server installs it without the setup: https://www.shadcn-ui-blocks.com/docs/mcp.

## Depends on

- npm packages: class-variance-authority, lucide-react, radix-ui
- shadcn/ui components: button, input, label, switch
- Installs to: `@/components/blocks/ecommerce-pro/checkouts/billing-address-toggle`

## About this block

Billing Address Toggle is step 3 of 3 in the checkout, a
working Switch from ui/switch that keeps the billing
address matched to shipping or reveals the full billing
form. Defaulted on, it lists the shipping lines as the
billing address; flipped off, it swaps in a Full name,
Street, City, Postcode, and Country grid built on ui/input
and ui/label. A CreditCard row names the card on file,
Visa ending 4242, and a helper line under the street field
asks for the address exactly as the bank has it.

The matches boolean is the only state, toggling between
the read only shipping lines and the input grid. The
footer explains why the field exists at all, that banks
check this address against the card and a mismatch is the
second most common reason for a decline, used for that
check and nothing else.

## When to use

Reach for this block at the payment stage wherever a card
is charged, especially for markets where address
verification drives approval. The card on file row should
reflect the real selected method so the toggle sits with
its context rather than floating on its own.

A natural flow around it on an Ecommerce Pro page:

**Before**

- [Payment form](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts)

**After**

- [Order review step](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts)
- [Order confirmation page](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts)

## What you can display

One strong use is the default matched state with the form
one switch away. Other billing configurations:

- **Saved billing addresses.** The off state opening a
  short list of stored addresses before the blank form.
- **Company billing.** A VAT or tax id field added to the
  grid for business buyers.
- **Separate billing email.** An email field for the
  receipt when it differs from the account on file.

> Tip: stating that a billing mismatch is a top reason for
> declines turns the switch from friction into the buyer's
> own safeguard against a failed charge.

## More in Ecommerce Checkout

- [Address Validation Helper](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/address-validation-helper)
- [Business Purchase Checkout](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/business-purchase-checkout)
- [Delivery Date Picker](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/delivery-date-picker)
- [Delivery Notes Step](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/delivery-notes-step)
- [Duties And Taxes Step](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/duties-and-taxes-step)
- [Express Checkout Wall](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/express-checkout-wall)
- [Express Pay Buttons](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/express-pay-buttons)
- [Gift Receipt Toggle Step](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/gift-receipt-toggle-step)
- [Guest Or Account Choice](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/guest-or-account-choice)
- [Installment Plan Choice](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/installment-plan-choice)
- [Invoice Details Form](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/invoice-details-form)
- [Multi Step Checkout](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/multi-step-checkout)
- [One Page Checkout](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/one-page-checkout)
- [Order Confirmation Page](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/order-confirmation-page)
- [Order For Someone Else Step](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/order-for-someone-else-step)
- [Order Review Step](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/order-review-step)
- [Order Summary Sidebar](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/order-summary-sidebar)
- [Payment Failed Recovery](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/payment-failed-recovery)
- [Payment Form Section](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/payment-form-section)
- [Pickup Point Selector](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/pickup-point-selector)
- [Promo Code Step](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/promo-code-step)
- [Quote To Checkout](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/quote-to-checkout)
- [Returning Customer Checkout](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/returning-customer-checkout)
- [Review And Place Order](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/review-and-place-order)
- [Shipping Options List](https://www.shadcn-ui-blocks.com/blocks/ecommerce-pro/checkouts/shipping-options-list)
