npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@net.christianto/qris-mpm

v0.0.3

Published

QRIS merchant-presented mode QR payload parser and encoder.

Readme

@net.christianto/qris-mpm

Parse, validate and encode QRIS (Indonesia) merchant-presented QR payloads. It extends @net.christianto/emvco-mpm with the QRIS templates and rules. Spec notes: docs/tags.md.

Disclaimer: this library is vibe-coded and has only been reviewed very lightly. Expect API instability while the code is being combed through. Versions stay at 0.x (pre-release) until then.

Sources:

pnpm add @net.christianto/qris-mpm

Usage

import { Qris, QrisPayload } from "@net.christianto/qris-mpm";

const qr = Qris.parse(input); // throws EmvcoMpmValidationError
const result = Qris.safeParse(input, { mode: "lenient" }); // { success, data?, issues }

qr.nmid; // 51 -> 02
qr.merchantCriteria; // "UMI" | "UKE" | "UME" | "UBE" | "URE"
qr.terminalId; // 62 -> 07
qr.nns; // string[], first 8 digits of each PJSP Merchant PAN
qr.pjsps; // QrisPjspTemplate[] (tags 26-45)
qr.isDynamic; // 01 === "12"

Qris.encode(qr); // string with a fresh CRC

const built = QrisPayload.create({
  payloadFormatIndicator: "01",
  pointOfInitiationMethod: "11",
  merchantAccountInformation: [
    {
      tag: "26",
      gui: "ID.EXAMPLE.WWW",
      merchantPan: "...",
      merchantId: "...",
      merchantCriteria: "UMI",
    },
    {
      tag: "51",
      gui: "ID.CO.QRIS.WWW",
      nmid: "ID...",
      merchantCriteria: "UMI",
    },
  ],
  // 52, 53, 58, 59, 60 ...
});

Parsed payloads encode back to the input. Static to dynamic conversion is not provided.

Modes and issues

strict (default) makes QRIS rules errors; lenient makes them warnings. The NMID format check (15 upper-case letters or digits) is a warning in both modes. Issues have the same shape as in emvco-mpm (path, code, severity, message, offset) and QRIS codes start with qris.observed. (see QRIS_ISSUE_CODES).

The normative QRIS specification is not public. Rules labelled Observed in docs/tags.md are reverse-engineered from real payloads and the ASPI bulletin, not normative.

Standard Schema

Qris.schema() works like EmvcoMpm.schema() but outputs a QrisPayload:

const Order = z.object({ id: z.string(), qr: Qris.schema() });
Order.parse(body).qr.nmid;

Qris.fieldsSchema() validates a plain fields object. Details: emvco-mpm docs/standard-schema.md.

Data

import { merchantCriteria } from "@net.christianto/qris-mpm/data/merchant-criteria";

Extending

qrisRegistry is defaultRegistry.extend(...); emvco-mpm itself is not changed by importing this package. Subclassing models with decorators (@Tag) needs "experimentalDecorators": true in your tsconfig.

License

MIT.