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

cb-pay-merchant-api

v1.0.3

Published

MMQR, CB Pay - Integration Package

Downloads

655

Readme

CBPay Merchant MMQR Unofficial API Integration Package

An unofficial, personal-use TypeScript API integration package for connecting CBPay Merchant's MMQR functionalities into Node.js applications. It provides a simple class-based wrapper around the CBPay REST API, handling authentication, token management, dynamic QR generation, status checking, and refunds.

Disclaimer: This is an unofficial, community-driven integration package intended for personal reuse. It is not affiliated with, endorsed by, or maintained by CB Bank.

Features

  • Automatic token generation and management
  • Dynamic QR Code generation (requestQR)
  • Transaction status validation (checkQR)
  • Payment refunds (refund)
  • Strongly typed requests and responses

Installation

npm install cb-pay-merchant-api

Initialization

Initialize the instance by providing your merchant credentials. The integration kit will automatically handle fetching and attaching the required authorization tokens for subsequent API calls.

import { CBPayMerchantApi } from 'cb-pay-merchant-api';

const cbpay = CBPayMerchantApi({
  baseUrl: '[https://api.uat.cbbank.com](https://api.uat.cbbank.com)', // <<< I cannot disclose the routes. Contact CB Pay Merchant Onboarding Team
  sourceId: 'YOUR_SOURCE_ID',
  merchantId: 'YOUR_MERCHANT_ID',
  terminalId: 'YOUR_TERMINAL_ID',
  userId: 'YOUR_USER_ID',
  password: 'YOUR_PASSWORD'
});

API Reference

1. Request Dynamic QR (requestQR)

const qrResponse = await cbpay.requestQR({
  transCurrency: 'MMK',
  transAmount: 15000,
  purposeOfTransaction: 'Purchase Order #8821',
  referenceNo: 'PO-8821'
});
console.log(qrResponse.qrCodeInfo);

Parameters (requestQR):

| Property | Type | Required | Description | | :--- | :--- | :---: | :--- | | transCurrency | string | Yes | Currency code | | transAmount | number | Yes | Transaction amount | | referenceNo | string | Yes | Your unique order or reference number | | purposeOfTransaction | string | Yes | Description of the payment |


2. Check QR Status

const statusResponse = await cbpay.checkQR({
  qrReferenceNo: 'QR-REF-FROM-RESPONSE'
});

if (statusResponse.returnCode === '000') {
  console.log(statusResponse.transactionId);
}

Parameters (checkQR):

| Property | Type | Required | Description | | :--- | :--- | :---: | :--- | | qrReferenceNo | string | Yes | The qrReferenceNo received from the requestQR response |


3. Refund Transaction (refund)

const refundResponse = await cbpay.refund({
  transactionId: 'TXN-123456789',
  refundCurrency: 'MMK',
  refundAmount: 15000,
  isPartialRedund: false
});

Parameters (requestQR):

| Property | Type | Required | Description | | :--- | :--- | :---: | :--- | | transactionId | string | Yes | The original transaction ID | | refundAmount | number | Yes | Amount to refund | | refundCurrency | string | Yes | Currency code | | isPartialRedund | boolean | Yes | Set to true for partial refunds |