Using the Package
Search & Lookup
Finmarks exposes a ranked full-text search and two identifier-based resolvers — for IFSC codes and UPI handles. These are the functions that make Finmarks useful in a real payment UI, not just a static logo pack.
search
Matches against id, name, short name, legal name, tags, UPI handles and IFSC prefixes. Case-insensitive. Returns [] for a blank query.
Results are ranked by match quality — exact id or name match first, then IFSC prefix, then prefix match, then word-boundary, then substring, then tag — with ties broken alphabetically so output is stable across calls.
import { search } from '@finmarks/finmarks';
// Basic search — surfaces Paytm first (exact name match)
search('paytm');
// Limit results
search('bank', { limit: 5 });
// Restrict to a category
search('invest', { categories: 'wealthtech' });
// Multiple categories, active only
search('pay', { categories: ['upi-psp', 'wallet'], includeInactive: false });SearchOptions
| Option | Type | Default | Description |
|---|---|---|---|
limit | number | — | Maximum number of results to return |
categories | Category | Category[] | — | Restrict search pool to these categories |
includeInactive | boolean | true | Set to false to exclude defunct/acquired entities |
getByIfscPrefix
Resolves the first four characters of an IFSC code to the issuing bank. Accepts the full IFSC or just the 4-letter prefix. Case-insensitive.
import { getByIfscPrefix } from '@finmarks/finmarks';
const ifsc = 'HDFC0000123';
getByIfscPrefix(ifsc.slice(0, 4)); // → HDFC Bank
// Works with the full IFSC too
getByIfscPrefix('UTIB0001234'); // → Axis BankNote: IFSC identifies the branch, not just the bank.
getByIfscPrefixuses only the first 4 characters (the bank code) and ignores the branch suffix. It resolves to the entity that owns that bank code.
getByUpiHandle
Resolves a UPI handle suffix to the entity that issues it. Accepts a full VPA (someone@ybl), a handle with @ (@ybl), or a bare suffix (ybl).
import { getByUpiHandle } from '@finmarks/finmarks';
// Full VPA from a payment confirmation
getByUpiHandle('kaval@ybl'); // → PhonePe
// @-prefixed handle
getByUpiHandle('@okaxis'); // → Google Pay
// Bare suffix
getByUpiHandle('paytm'); // → PaytmNote: A UPI handle identifies the PSP, not the user's bank.
@yblmeans the VPA was issued through PhonePe's Yes Bank rails — the user's actual bank account may be with any bank.