Skip to content

NestJS Myanmar Payments

NestJS integration for Myanmar payment gateways: KBZ Pay, Wave Pay, AYA Pay, Yoma MMQR and CyberSource. Built on Node Myanmar Payments. Injectable module, verified callbacks and test fakes.

npmTestsLicense

npm install @laranex/nestjs-myanmar-payments@next

Requirements ​

  • Node.js 20+
  • NestJS 10, 11 or 12
  • Node Myanmar Payments v4 (installed automatically)

Why NestJS Myanmar Payments ​

Every Myanmar payment gateway signs, sends and acknowledges payments its own way, with its own rules for amounts. NestJS Myanmar Payments puts KBZ Pay, Wave Pay, AYA Pay, Yoma MMQR and CyberSource behind one injectable service. All gateway logic lives in Node Myanmar Payments; this package wires it into NestJS.

  • One module, every gateway. MyanmarPaymentsModule.forRoot() or forRootAsync() provides MyanmarPaymentsService with kbzPay(), wavePay(), ayaPay(), yomaMmqr() and cyberSource(), configured from environment variables or module options.
  • A typed result for each flow. Every payment returns a RedirectPayment, FormPayment, QrPayment or AppPayment, so you always know what to do next. See Payment Flows.
  • Exact amounts. Whole numbers or Amount values, never floats, checked against each gateway's documented rules before any request is sent.
  • Verified callbacks. @VerifiedCallback() checks the gateway's signature against the exact body it sent and injects a PaymentCallback whose status is one PaymentStatus; @AcknowledgeCallback() sends the response the gateway expects.
  • NestJS all the way down. Injectable gateways (@InjectKbzPay() and the rest), Express or Fastify, @nestjs/config for settings, @nestjs/cache-manager for shared Yoma MMQR tokens, and AYA Pay and CyberSource checkout forms that open from an encrypted link.
  • Easy to test. A fake fetch sees every gateway call, MyanmarPaymentsService can be overridden, and signed callbacks can be posted to your own routes. See Testing.
  • Your webhooks, your storage. The package never stores webhooks; the docs show the recommended store, acknowledge and process-once flow as sample code. See Handling Webhooks.
  • Ready for AI agents. An agent skill, installed with npx skills add, teaches coding agents to use the package correctly.