UPI Collect Guard

UPI Collect Guard is a copy-paste React component that stops entered upi pin to receive money 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/upi-collect-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

StopsEntered UPI PIN to receive money

Was this component page useful?

How do I install UPI Collect Guard?

pnpm dlx shadcn@latest add @bollard/upi-collect-guard

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

How do I use UPI Collect Guard in React?

upi-collect-guard-usage.tsx
import { UpiCollectGuard } from "@/components/ui/upi-collect-guard"

<UpiCollectGuard
  request={{
    name: "Rahul Sharma",
    vpa: "9876543210@ybl",
    amount: 4999,
    note: "OLX advance for sofa. Enter PIN to receive money",
  }}
  contacts={["mom@okaxis", "bescom.bill@icici"]}
  onPay={async () => {
    await new Promise((resolve) => setTimeout(resolve, 500))
    setResult("Opening UPI PIN…")
  }}
  onDecline={async () => {
    await new Promise((resolve) => setTimeout(resolve, 400))
    setResult("Declined. Nothing was sent.")
  }}
/>

What input mistakes does UPI Collect Guard catch?

  • "Enter PIN to receive money" confusion, by asking what the user expects
  • Refund, prize, buyer and KYC scam wording
  • Person-to-person collect requests (no longer permitted on UPI)
  • Requesters not in contacts or not matching the expected name
  • Small test amounts used to build trust

What props does UPI Collect Guard accept?

UpiCollectGuard props
PropTypeDefault
request* (required)

The incoming request.

CollectRequest—
contacts

UPI IDs the user has paid before; anything else is "unknown".

string[]—
expectedName

Who the user believes is asking, to compare with the bank's name.

string—
locale

Locale for money.

string"en-IN"
onPay

Continue to the PIN screen. Only reachable after the user says they are paying. May return a Promise.

(request: CollectRequest) => void | Promise<void>—
onDecline

Decline the request. May return a Promise.

(request: CollectRequest) => void | Promise<void>—
messages

Any visible string.

Partial<Omit<UpiCollectMessages, "risks">> & { risks?: Partial<UpiCollectMessages["risks"]> }—

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

How is UPI Collect Guard accessible?

  • Intent question is a roving-tabindex radiogroup with arrow keys
  • Risks linked via aria-describedby; status is role=status
  • Choosing "I expect money" moves focus to Decline
  • Pay uses aria-disabled while pending

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: PSPs and banks must enforce collect rules and fraud checks; treat this as user education before the PIN.

  • Heuristic wording and name checks; scams can avoid them
  • Does not block the UPI app's own PIN screen; it advises before it
  • Requester names come from what your PSP returns

What validation rules apply to UPI Collect Guard?

Rules last verified:

Confirmed: PSPs and UPI apps must ensure collect on person-to-person transactions is not permitted (consolidating OC-220 of 29 Jul 2025, effective 1 Oct 2025). Informational; check NPCI's current circulars. Copied components don't update themselves, so re-check after rule changes (see updating a component).

What expensive mistakes does UPI Collect Guard stop?

Entered UPI PIN to receive money

Also known as

upi collect · request money · upi pin · olx scam · phonepe · google pay · paytm · kyc fraud

Field type

What dependencies does UPI Collect Guard require?

UPI Collect Guard facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameUPI Collect Guard
Registry identifier@bollard/upi-collect-guard
Install commandnpx shadcn@latest add @bollard/upi-collect-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 UPI Collect Guard

How does UPI Collect Guard validate Indian financial identifiers?

UPI Collect Guard stops entered UPI PIN to receive money. Complies with national standards for "Enter PIN to receive money" confusion, by asking what the user expects, Refund, prize, buyer and KYC scam wording, Person-to-person collect requests (no longer permitted on UPI), Requesters not in contacts or not matching the expected name, Small test amounts used to build trust. Limitation: verify upi-collect-guard with issuer gateway.

How do I install upi-collect-guard with shadcn?

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

What props customize UPI Collect Guard?

UPI Collect Guard accepts `request`, `contacts`, `expectedName`, `locale`, `onPay`. Configures upi collect, request money, upi pin behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of upi-collect-guard?

Heuristic wording and name checks; scams can avoid them. Does not block the UPI app's own PIN screen; it advises before it. Requester names come from what your PSP returns Server requirement: PSPs and banks must enforce collect rules and fraud checks; treat this as user education before the PIN.

How does UPI Collect Guard meet accessibility guidelines?

Intent question is a roving-tabindex radiogroup with arrow keys. Risks linked via aria-describedby; status is role=status. Choosing "I expect money" moves focus to Decline. Pay uses aria-disabled while pending. Minimizes errors: upi pin to receive money scam, collect request fraud.

Which components pair with UPI Collect Guard?