Skip to content
Documentation Menu

Using the Package

Categories

Finmarks uses a tag-based taxonomy rather than a folder hierarchy. An entity can belong to multiple categories — Paytm is simultaneously a UPI PSP, a wallet, a BNPL provider, a payments bank, and a payment gateway. The category API gives you precise control over how you query across this taxonomy.

getByCategory

Returns all entities in a category, or the union of several categories — deduped and in dataset order.

function getByCategory(category: Category | Category[], options?: FilterOptions): Entity[]
import { getByCategory } from '@finmarks/finmarks';

// All UPI PSPs
getByCategory('upi-psp');

// Union of two categories (deduped)
getByCategory(['upi-psp', 'payment-gateway']);

// Active BNPL providers only
getByCategory('bnpl', { includeInactive: false });

getByAllCategories

Returns entities matching every listed category (intersection). Use this to find super-apps or multi-licensed entities.

function getByAllCategories(categories: Category[], options?: FilterOptions): Entity[]
import { getByAllCategories } from '@finmarks/finmarks';

// Entities that are both a UPI PSP AND a wallet
getByAllCategories(['upi-psp', 'wallet']);

// Banks that are also account aggregators
getByAllCategories(['private-bank', 'account-aggregator']);

listCategories

Returns the full taxonomy with live entity counts.

function listCategories(): CategoryInfo[]
import { listCategories } from '@finmarks/finmarks';

listCategories();
// [
//   { id: 'upi-psp', label: 'UPI / PSP apps', regulator: 'NPCI', count: 26, ... },
//   { id: 'private-bank', label: 'Private banks', regulator: 'RBI', count: 18, ... },
//   ...
// ]

getCategory

Returns a single category's definition and count, or undefined if unknown.

function getCategory(id: Category): CategoryInfo | undefined
import { getCategory } from '@finmarks/finmarks';

getCategory('wealthtech');
// { id: 'wealthtech', label: 'Wealthtech', count: 14, phase: 2, ... }

The fintech taxonomy

The category taxonomy is built around the Indian fintech regulatory stack — you can filter by regulator directly if needed. Categories also carry a phase field indicating which build phase of the dataset they belong to.

The full list of category IDs is available in TypeScript Types as theCategory union type. Every valid category id has autocompletion in VS Code because the TypeScript types are derived from the same source as the schema enum.