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.
npm install @laranex/nestjs-myanmar-payments@nextRequirements
- 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()orforRootAsync()providesMyanmarPaymentsServicewithkbzPay(),wavePay(),ayaPay(),yomaMmqr()andcyberSource(), configured from environment variables or module options. - A typed result for each flow. Every payment returns a
RedirectPayment,FormPayment,QrPaymentorAppPayment, so you always know what to do next. See Payment Flows. - Exact amounts. Whole numbers or
Amountvalues, 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 aPaymentCallbackwhose status is onePaymentStatus;@AcknowledgeCallback()sends the response the gateway expects. - NestJS all the way down. Injectable gateways (
@InjectKbzPay()and the rest), Express or Fastify,@nestjs/configfor settings,@nestjs/cache-managerfor shared Yoma MMQR tokens, and AYA Pay and CyberSource checkout forms that open from an encrypted link. - Easy to test. A fake
fetchsees every gateway call,MyanmarPaymentsServicecan 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.