Payments and checkout

Let people catch the extra zero before money moves.

Add amount readbacks, duplicate-submit protection and recipient checks to the moments where a small form mistake is expensive.

Try the guard rails

A small safety layer for one real flow.

  • Amount Input

    Flags an amount that is far from the expected value and spells it out.

    View component
  • Duplicate Payment Guard

    Stops a second payment submission while the first one is still in flight.

    View component
  • Payee Check

    Makes the recipient visible before a transfer is confirmed.

    View component

Integration recipe

A starting point for your flow.

import { AmountInput } from "@/components/ui/amount-input"
import { SafeSubmit } from "@/components/ui/safe-submit"

<AmountInput label="Amount (₹)" value={amount} onValueChange={setAmount} typical={10000} />
<SafeSubmit onSubmit={() => createTransferOnServer(amount)}>Send money</SafeSubmit>

Server boundary: The amount readback and duplicate-submit lock are client-side UX. Validate the amount, authorize the recipient, and use a server-side idempotency key in createTransferOnServer.

One command for this flow

Install the fintech pack.

Start with the related components, then edit the copied source in your own product.

npx shadcn@latest add @bollard/fintech-pack

Fallback: add the namespace by hand

Only if npx shadcn@latest add @bollard/… cannot resolve the namespace. Merge this into components.json, then run the same add command. The official shadcn registry index already lists @bollard.

{
  "registries": {
    "@bollard": "https://bollard-ui.vercel.app/r/{name}.json"
  }
}