Gift Card Scam Guard

Gift Card Scam Guard is a copy-paste React component that stops helps stop a buyer paying a scammer in gift cards before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/gift-card-scam-guard
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsHelps stop a buyer paying a scammer in gift cards

Was this component page useful?

How do I install Gift Card Scam Guard?

pnpm dlx shadcn@latest add @bollard/gift-card-scam-guard

The files land in your project. They're yours to edit.

How do I use Gift Card Scam Guard in React?

gift-card-scam-guard-usage.tsx
import { GiftCardScamGuard, type GiftCardLine } from "@/components/ui/gift-card-scam-guard"

<GiftCardScamGuard
  lines={LINES}
  note={NOTE}
  firstPurchase
  currency="INR"
  locale="en-IN"
  helpUrl="https://cybercrime.gov.in"
  onCancel={() => setStatus("Order cancelled. Nothing was charged.")}
  onContinue={() => new Promise<void>((resolve) => setTimeout(() => { setStatus("Going to payment…"); resolve() }, 500))}
/>

What input mistakes does Gift Card Scam Guard catch?

  • Large total or several cards in one order, scaled to the order currency
  • Notes that mention a boss, tax, police, refunds, tech support or sharing codes
  • Common Hinglish and Hindi scam phrases such as "sir ne bola"
  • First-ever gift card purchase
  • Someone else asking the buyer to pay: routes to a stop screen instead of checkout

What props does Gift Card Scam Guard accept?

GiftCardScamGuard props
PropTypeDefault
lines* (required)

Cards in the order.

GiftCardLine[]—
note

Gift message or note on the order, checked for scam stories.

string—
firstPurchase

True when this customer has never bought a gift card before.

boolean—
currency

ISO 4217 code for amounts.

string"USD"
locale

BCP 47 locale for formatting the total.

string—
largeTotal

Total at or above which the order counts as large: a number, or one per currency. Defaults to about US$500 in `currency` (e.g. ₹20,000).

ScamOptions["largeTotal"]—
severalCards

Card count at or above which the order counts as several. Defaults to 3.

ScamOptions["severalCards"]—
words

Extra or replacement word lists, e.g. in another language.

ScamOptions["words"]—
helpUrl

Where "How to report it" goes, e.g. your country's fraud reporting site.

string—
onAnswer

Called with the user's answer whenever it changes, for your fraud signals.

(answer: ScamAnswer | null) => void—
onContinue

Proceed to payment. Only reachable after a "gift" answer when the order is paused. May return a Promise.

() => void | Promise<void>—
onCancel

Cancel the order.

() => void—
messages

Any visible string; `story` and `answers` may be partial.

Partial<Omit<GiftCardScamMessages, "story" | "answers">> & { story?: Partial<Record<ScamStory, string>>; answers?: Partial<Record<ScamAns…—

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

How is Gift Card Scam Guard accessible?

  • Question section is labelled by its heading; the stop screen is role=alert
  • A polite live region announces changes; focus moves to the relevant control after each step
  • Continue button is described by its waiting reason when disabled
  • Decorative icons are aria-hidden

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Apply your own fraud and velocity rules on gift card orders server-side; the client prompt is advisory.

  • Keyword and threshold heuristics; a scam with an innocent note and small total is not flagged
  • Genuine gifts that match the patterns are asked the question too
  • The buyer can still choose to continue; it does not block payment on its own

What expensive mistakes does Gift Card Scam Guard stop?

Helps stop a buyer paying a scammer in gift cards

Also known as

gift card · scam · fraud · checkout · amazon pay gift card · google play card · hinglish · tech support scam

Field type

What dependencies does Gift Card Scam Guard require?

Gift Card Scam Guard facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameGift Card Scam Guard
Registry identifier@bollard/gift-card-scam-guard
Install commandnpx shadcn@latest add @bollard/gift-card-scam-guard
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Gift Card Scam Guard

How does Gift Card Scam Guard validate Indian financial identifiers?

Gift Card Scam Guard stops helps stop a buyer paying a scammer in gift cards. Complies with national standards for Large total or several cards in one order, scaled to the order currency, Notes that mention a boss, tax, police, refunds, tech support or sharing codes, Common Hinglish and Hindi scam phrases such as "sir ne bola", First-ever gift card purchase, Someone else asking the buyer to pay: routes to a stop screen instead of checkout. Limitation: verify gift-card-scam-guard with issuer gateway.

How do I install gift-card-scam-guard with shadcn?

Run `npx shadcn@latest add @bollard/gift-card-scam-guard`. Sources added: registry/default/gift-card-scam-guard/gift-card-scam-guard.tsx, registry/default/gift-card-scam-guard/scam.ts. Package requirements: lucide-react.

What props customize Gift Card Scam Guard?

Gift Card Scam Guard accepts `lines`, `note`, `firstPurchase`, `currency`, `locale`. Configures gift card, scam, fraud behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of gift-card-scam-guard?

Keyword and threshold heuristics; a scam with an innocent note and small total is not flagged. Genuine gifts that match the patterns are asked the question too. The buyer can still choose to continue; it does not block payment on its own Server requirement: Apply your own fraud and velocity rules on gift card orders server-side; the client prompt is advisory.

How does Gift Card Scam Guard meet accessibility guidelines?

Question section is labelled by its heading; the stop screen is role=alert. A polite live region announces changes; focus moves to the relevant control after each step. Continue button is described by its waiting reason when disabled. Decorative icons are aria-hidden. Minimizes errors: boss asked for gift cards, gift card scam.

Which components pair with Gift Card Scam Guard?