Payment Reference

Payment Reference is a copy-paste React component that stops transfer couldn't be matched to the invoice 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/payment-reference
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

StopsTransfer couldn't be matched to the invoice

Was this component page useful?

How do I install Payment Reference?

pnpm dlx shadcn@latest add @bollard/payment-reference

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

How do I use Payment Reference in React?

payment-reference-usage.tsx
import { PaymentReference } from "@/components/ui/payment-reference"

<PaymentReference
  defaultValue="Payment for invoice #INV-2026-0142"
  expected="INV-2026-0142"
  defaultRail="neft"
  payerName="Tushar Khadde"
/>

What input mistakes does Payment Reference catch?

  • Missing, mistyped or different invoice number
  • Reference longer than the rail keeps, with the cut part struck through
  • Symbols the rail strips
  • Invoice number moved to the front when it would be cut off
  • Upper-casing on rails that do it

What props does Payment Reference accept?

PaymentReference props
PropTypeDefault
label

Visible label.

string"Payment reference"
value

Controlled value.

string—
defaultValue

Initial reference when uncontrolled.

string""
onValueChange

Called with the reference on every change.

(value: string) => void—
pattern

The invoice or order number format the payee matches on.

RegExp/INV-\d{4}-\d{4}/
formatHint

Human-readable form of `pattern`, e.g. "INV-2026-0142".

string"INV-2026-0142"
expected

The invoice this payment is for, when known. Enables one-tap fixes.

string—
rails

Payment rails to offer, with their limits.

PaymentRail[]DEFAULT_RAILS
rail

Controlled rail id.

string—
defaultRail

Initial rail id when uncontrolled.

string—
onRailChange

Called with the chosen rail id.

(id: string) => void—
payerName

Payer name as banks print it, for the statement preview.

string"Your name"
messages

Override any issue message.

Partial<Record<ReferenceIssue, (id: string, rail: string) => string>>—

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

How is Payment Reference accessible?

  • Visible label; input is described by a polite hint region
  • Rail picker is a labelled radiogroup
  • 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?

  • Rail limits are sensible defaults, not guarantees; banks differ
  • Doesn't send the payment or reconcile it
  • Pattern for invoice numbers comes from your pattern prop

What validation rules apply to Payment Reference?

Rules not yet verified against an official source.

Not verified this round: rail limits (UPI ~50 characters, NEFT remark boxes ~30, Faster Payments 18) are defaults from the code. Check your bank's own limits. Copied components don't update themselves, so re-check after rule changes (see updating a component).

What expensive mistakes does Payment Reference stop?

Transfer couldn't be matched to the invoice

Also known as

payment reference · remarks · invoice number · neft · upi · imps · narration · bank statement

Field type

What dependencies does Payment Reference require?

Payment Reference facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component namePayment Reference
Registry identifier@bollard/payment-reference
Install commandnpx shadcn@latest add @bollard/payment-reference
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 Payment Reference

How does Payment Reference validate Indian financial identifiers?

Payment Reference stops transfer couldn't be matched to the invoice. Complies with national standards for Missing, mistyped or different invoice number, Reference longer than the rail keeps, with the cut part struck through, Symbols the rail strips, Invoice number moved to the front when it would be cut off, Upper-casing on rails that do it. Limitation: verify payment-reference with issuer gateway.

How do I install payment-reference with shadcn?

Run `npx shadcn@latest add @bollard/payment-reference`. Sources added: registry/default/payment-reference/payment-reference.tsx. Package requirements: lucide-react.

What props customize Payment Reference?

Payment Reference accepts `label`, `value`, `defaultValue`, `onValueChange`, `pattern`. Configures payment reference, remarks, invoice number behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of payment-reference?

Rail limits are sensible defaults, not guarantees; banks differ. Doesn't send the payment or reconcile it. Pattern for invoice numbers comes from your pattern prop Server requirement: backend verification for payment-reference.

How does Payment Reference meet accessibility guidelines?

Visible label; input is described by a polite hint region. Rail picker is a labelled radiogroup. Icons are aria-hidden. Minimizes errors: missing invoice number in transfer, neft remark cut off.

Which components pair with Payment Reference?