Payment & Checkout Guardrails

React Checkout Components for Payment Safety

Checkout and payment components stop accidental extra zeros, duplicate submit double-charges, expired cards, and surprise totals before transactions reach your payment gateway. Each component installs with shadcn and pairs with server-side idempotency.

Checkout kit

The extra zero, the double charge, the expired card and the surprise total.

pnpm dlx shadcn@4.21.0 add @bollard/checkout-pack

Components in Checkout & payments (69)

React 19+ · Tailwind v4 · shadcn
Slide to ConfirmStyled

Requires the thumb to travel the whole track before confirming, so accidental taps and pocket presses don't send payments.

Stops: Pocket tap sent a payment
Cancel ReadbackStyled

Reads back exactly when access ends, what is lost and what is refunded before someone cancels, and ends on a receipt with an undo.

Stops: Cancelled without knowing when access ends
Seat ReduceStyled

Makes lowering a seat count an explicit choice of who loses access, with the new bill and what happens to their work.

Stops: Fewer seats locked out an active admin
Safe SubmitStyled

Collapses repeated clicks, Enter spam and double-taps into one request and reuses an idempotency key on retry, so your server can dedupe.

Stops: Helps prevent paying twice after a timeout
Spend Cap ButtonStyled

Asks for a second click before buying the same item again and shows each purchase against daily or monthly caps before it goes through.

Stops: Same item bought twice by mistake
Passenger Name InputStyled

Checks a flight or train passenger name against the ID and reads it back as it will print, so a name mismatch doesn't cost a fee or a boarding.

Stops: Boarding denied over a ticket name
Pin Drop CheckStyled

Measures a dropped map pin against the typed address and PIN area, so a delivery doesn't go to the wrong door.

Stops: Delivery sent to the wrong door
PIN Code InputStyled

Reads the state from an Indian PIN's first digits as you type and flags a mismatch with the chosen state, so a parcel doesn't go to the wrong place.

Stops: Parcel sent to the wrong state
Coupon InputStyled

Cleans and checks a coupon code and says exactly why it didn't apply, so shoppers don't give up on a code that should work.

Stops: Valid coupon code rejected
Paste Target GuardStyled

Compares a pasted IBAN, UPI ID or wallet address with what was copied or expected, so a clipboard hijacker's swapped address is caught before paying.

Stops: Helps catch a clipboard hijacker swapping the payee address
Amount InputStyled

A money field that groups digits as you type, spells the amount out and flags an amount about ten times off the usual one.

Stops: Extra zero on a transfer
Checksum InputStyled

Checks IBAN, card and ISBN check digits as you type and points to the swapped or doubled character, so money and orders don't go to a mistyped number.

Stops: Money sent to a mistyped account
Address CheckStyled

Checks a shipping address for a missing house number, a postcode that doesn't fit the country or city, and PO boxes, so parcels aren't returned.

Stops: Parcel returned for bad address
Tax ID InputStyled

Catches mistyped GSTIN, PAN and EU VAT numbers by checking their structure and the GSTIN check character, and pointing at the wrong character.

Stops: Invoice sent with a mistyped GSTIN
Zero Result RescueStyled

Turns an empty search into fixes that are proven to return results: a spelling fix, a layout fix, a dropped filter or all categories.

Stops: Users quit on empty search results
Card Expiry InputStyled

Masks a card expiry as MM/YY and reads it back as a date, catching month 13, a year typed first or a card that expires before the next renewal.

Stops: Payment declined on card expiry
IFSC InputStyled

Catches IFSC typos like the letter O for the fixed zero, then reads the branch back so a transfer doesn't go to the wrong bank or branch.

Stops: Helps prevent a transfer to the wrong branch
UPI ID InputStyled

Catches mistyped UPI IDs, cleans pasted upi://pay links and reads back the registered name, so money isn't sent to the wrong VPA.

Stops: UPI payment to the wrong VPA
FX Send ReceiveStyled

Helps an international payment arrive in full: it measures what the recipient actually gets against the invoice, after fees and bank deductions.

Stops: Helps prevent an invoice being paid short after fees
EMI ReadbackStyled

Reads back a loan's EMI, total interest, fees and real yearly cost before signing, so a borrower doesn't agree to a costlier loan than they think.

Stops: Signed for a loan costing more
Guest Count PickerStyled

Asks each child's age and checks the room split, so a hotel booking isn't bounced for an over-age child, a lone infant or an over-full room.

Stops: Hotel booking bounced over guests
Size Fit PickerStyled

Converts UK, US, EU and IN sizes live and catches a usual size clicked in the wrong system, like US 8 picked as UK 8.

Stops: Wrong shoe or clothing size ordered
Quantity StepperStyled

Holds suspicious quantity jumps for a "Did you mean 10?" check and clamps to stock with a reason, so an accidental bulk order isn't placed.

Stops: Accidental bulk order
Percent InputStyled

Catches 0.15 typed for 15%, basis-point slips and rates over the cap, and reads the result back in money, so a rate isn't 100 times off.

Stops: Rate entered 100 times too small
Split AllocatorStyled

Keeps splits adding up to exactly the total, showing what's left as you type and rounding automatic splits so nothing is off by one.

Stops: Split adds up to 101%
Billing Period InputStyled

Reads a recurring price back in every billing period and catches a yearly price typed into the monthly field.

Stops: Yearly price typed into monthly plan
Dimension InputStyled

Labels each side of a size, fills all three from a pasted "16 x 12 x 8 in" and catches wrong units or an extra digit, so the wrong package size doesn't ship.

Stops: Wrong package size ships
Tax-Inclusive InputStyled

Makes "includes / excludes GST" an explicit choice and reads back net + tax = gross, so tax isn't added twice.

Stops: GST added twice to a price
MRZ Paste InputStyled

Validates a passport MRZ (ICAO 9303 TD3) check digit by check digit and catches OCR slips before details reach a booking or KYC form.

Stops: Helps catch misread passport details before booking
Passport Validity CheckStyled

Checks a passport against the destination's validity rule and names the date it must last until, so a trip isn't booked that the passport can't make.

Stops: Passport expires before trip allows
Seat Gap CheckStyled

Catches group seat picks that split the party, leave a single empty seat or seat a child away from every adult.

Stops: Group split across row at booking
Review StepStyled

Lists every answer of a multi-step form by step with Edit links before submit, flagging empty, missing and changed answers.

Stops: Wrong answer submitted in a wizard
Dependent ResetStyled

When a parent field changes, clears only the dependent values it made invalid and names each one with Undo, so fields don't vanish silently.

Stops: Dependent fields cleared without notice
Autofill CheckStyled

Highlights fields that the browser or password manager autofilled and flags values that look wrong, like an email in the Name field.

Stops: Autofill put email in name field
Repeat RowsStyled

Reduces lost, doubled and blank entries in add-another forms with undoable removes, duplicate flags and min/max limits.

Stops: Duplicate line items in add-another form
Stay LengthStyled

Reads a date range back as nights and days so bookings and leave requests aren't off by one.

Stops: Booked one night too few
Cutoff PickerStyled

Counts down to a store's order cutoff in store time with the shopper's time beside it, so an order doesn't land on a different day than expected.

Stops: Order missed today's delivery cutoff
Trip Date ChainStyled

Lines up hotel nights under the flights and catches a stay booked for the wrong night, like a room from the date of a 00:50 landing.

Stops: Hotel booked for the wrong night
BNPL Schedule CheckStyled

Lays out buy-now-pay-later payments on a calendar with paydays and other plans, so an instalment doesn't fail on an expired card or before payday.

Stops: Instalment fails on an expired card
Transit Visa CheckStyled

Flags layovers that may need a transit visa for the traveller's passport, and the itinerary traps that force them through the border.

Stops: Stranded at a layover without a visa
Do Not CloseStyled

Warns before closing the tab mid-payment, upload or migration and says clearly when it is safe to close, so work isn't cut off halfway.

Stops: Closed the tab mid-payment
Disabled ReasonStyled

Keeps a blocked control focusable and explains exactly what blocks it, with a jump to each fix, so disabled buttons aren't dead ends.

Stops: Disabled button with no reason given
Bill Split CheckStyled

Checks a bill split against the printed receipt so nobody is quietly overcharged by double-counted tax, a tip on a service charge or a missed item.

Stops: Tip added on top of service charge
Quote LockStyled

Shows a held FX, swap or fare quote counting down and makes any worse re-quote an explicit Accept step, so nobody pays a price they never saw.

Stops: Helps prevent paying a re-quoted price nobody saw
Card Bill PayStyled

Reads back what a credit card payment amount really costs before Pay, so paying the minimum or a little short doesn't quietly trigger interest.

Stops: Minimum due paid, interest charged anyway
OTP Share GuardStyled

Says in one sentence what a one-time code really approves and warns hard during a call or screen share, so it's less likely to be read out to a scammer.

Stops: Helps stop an OTP being read out to a scammer
Bank Transfer TimingStyled

Says when an Indian bank transfer will actually arrive on IMPS, NEFT, RTGS or UPI, and catches amounts the chosen rail will refuse.

Stops: Transfer refused or credited a day late
Gift Card Scam GuardStyled

Interrupts a gift card checkout that looks like a scam payment and asks one question before the order goes through.

Stops: Helps stop a buyer paying a scammer in gift cards
UPI AutoPay ReviewStyled

Reads a UPI AutoPay mandate back against the plan before the PIN, flagging a cap far above the price, no end date or the wrong merchant.

Stops: ₹199 plan approved as a ₹9,999 mandate
UPI Collect GuardStyled

Shows a UPI collect request as the payment it really is and asks whether the user expects money, since a UPI PIN only ever sends money.

Stops: Entered UPI PIN to receive money
TDS Invoice TotalStyled

Works out what an Indian freelancer's invoice actually lands as after GST and TDS, and flags TDS taken on GST or at the wrong rate.

Stops: Freelancer short-paid after TDS on GST
Duplicate Payment GuardStyled

Tells a double tap, a retry after a timeout and a deliberate repeat payment apart, so the same payee isn't paid twice by accident.

Stops: Paid twice after a timeout
Recurring Charge ReadbackStyled

Reads back what a subscribe button really commits to: today's charge, first real charge, price step-ups and the cancel-by time.

Stops: Free trial quietly became a paid plan
GST Invoice CheckStyled

Checks an Indian GST invoice for the wrong tax head (CGST + SGST vs IGST), a rate not in force on the invoice date, and amounts that don't add up.

Stops: Helps catch a GST invoice under the wrong tax head
Charge SummaryStyled

Shows what will be charged today, when the first and renewal charges happen and what taxes apply, so checkout has no surprise charges.

Stops: Surprise charge at checkout
Currency HintStyled

Shows an approximate, dated conversion of a foreign price and prices a merchant's currency conversion, so budgets abroad use the right number.

Stops: Budgeted on the wrong currency abroad
Payee CheckStyled

Asks the bank who holds an account and compares that with the name typed, like Confirmation of Payee, so money doesn't go to the wrong account.

Stops: Money sent to the wrong account
Tip PickerStyled

Shows tips in money on a stated base and holds back accidental huge tips, like 250 typed in the % field.

Stops: Tipped 250% by typo
Refund PickerStyled

Shows the exact refund before it's issued: units per item, every deduction named, non-refundable items explained, and net amount per refund method.

Stops: Refund smaller than the customer expected
Plan Change ReadbackStyled

Before an upgrade or downgrade, reads back today's charge, credits, the next bill and any usage over the new plan's limits, so nobody is surprised by a charge or lost data.

Stops: Downgrade deleted data over the limit
Payment ReferenceStyled

Checks a bank transfer reference against each rail's length and character limits, so the invoice number reaches the payee intact.

Stops: Transfer couldn't be matched to the invoice
QR Scan CheckStyled

Shows where a scanned QR code really goes before anything opens, so a fake sticker over a real code doesn't send you somewhere else.

Stops: Helps catch a fake QR sticker before it opens
Sum CheckStyled

Re-adds rows in exact arithmetic and points at the likely slip when a total doesn't match, or says it's only rounding.

Stops: Total doesn't add up
Diff TableStyled

Marks the cells that actually differ in a comparison table and shows blanks as "Not stated", so people don't pick the wrong plan.

Stops: Picked the wrong plan from a comparison
Amount in WordsStyled

Spells an amount in words and names each digit group, so ₹2,50,000 isn't written or read as ₹25,00,000.

Stops: Extra zero on a transfer
Honest RatingStyled

Shows how many reviews stand behind a star rating and how they split, so a 5.0 from three reviews doesn't look as solid as a 4.6 from 900.

Stops: Trusted a 5.0 from three reviews
Unit PriceStyled

Puts every pack on a common unit price and marks the real cheapest, catching bulk packs and multi-buys that cost more per unit.

Stops: Bigger pack costs more per kg
Error ExplainerStyled

Turns a raw error code into what happened, the likely cause and one next step, and warns when a timed-out payment may already have gone through.

Stops: Paid twice after a payment timeout error
ETA RangeStyled

Quotes delivery as a realistic date range, naming a likely day only when one stands out, so customers aren't promised an impossible day.

Stops: Delivery promised on an impossible day

Frequently Asked Questions about Checkout & payments Guardrails

How do I prevent double-clicks from charging customers twice in React?

Use Safe Submit (`safe-submit`) to lock the submit button the instant it is clicked and generate an idempotency key header. Install with `npx shadcn@4.21.0 add @bollard/safe-submit`. Limitation: the payment gateway and backend must process the idempotency key to prevent network replays.

How do I catch extra zeros in currency input fields?

Amount Input (`amount-input`) compares the entered number to a typical baseline and warns if the user entered 10x or 100x the expected magnitude. Install with `npx shadcn@4.21.0 add @bollard/amount-input`. Limitation: does not enforce bank balance or credit limits.

How do I validate card expiration dates before payment submission?

Card Expiry Input (`card-expiry-input`) auto-formats MM/YY and flags expired dates immediately. Install with `npx shadcn@4.21.0 add @bollard/card-expiry-input`. Limitation: does not verify bank card status or account validity.

How do I show customers a clear readback of line items before checkout?

Review Step (`review-step`) displays a final confirmation summary table before checkout. Install with `npx shadcn@4.21.0 add @bollard/review-step`. Limitation: prices and inventory must still be verified on the server.