Skip to content

Payments · Platform

PAY.ZNN — a unified payment gateway for the product ecosystem: one API, pay-by-code, operator panel.

Go + Gin backend and Next.js front end normalise invoices and provider webhooks across projects — clients scan a code, pay, and track status in real time.

ZNN Aug 2025 8 min read
ZNN case study
all projects
1 API
pay flow
Code
audit trail
Full

Why a unified gateway

PAY.ZNN is an internal payment gateway unifying acceptance and accounting for all current and future ZNN products. Built on Go + Gin for webhooks and throughput, with Next.js for payment UX and an operator panel.

Instead of every project integrating its own provider SDK, one API normalises invoices, sessions, statuses and error codes — plus a pay-by-code flow where the user enters or scans an invoice code to pay and track status.

Architecture

Projects call the PAY.ZNN API → invoice and session manager → provider connectors with idempotent webhooks → event store and unified statuses → operator dashboard and public pay-by-code pages.

  • API gateway — invoice creation, session management, outbound notifications
  • Provider connectors — normalised statuses, errors, retry policies
  • Invoice lifecycle — created, pending, paid, failed, expired with TTL and extensions
  • Event store — full audit trail for incidents and analytics
  • Operator panel — search, filters, manual actions, finance exports

Pay-by-code flow

The client receives an invoice code (QR supported), lands on a payment page showing amount, currency, description and methods, completes payment, and watches status update as provider webhooks arrive — processed idempotently.

Security and reliability

Webhook authenticity verification and replay protection. Minimal sensitive data retention. RBAC in the panel with action audit. Idempotent create/update operations. Provider latency and error rate metrics with alerting.

Product integration

Quick start: create invoice, return code/link. Deep integration: embed shared payment components. Centralised status notifications keep product systems in sync without bespoke webhook handlers per project.

Outcome

PAY.ZNN standardises payments across the ZNN ecosystem — one API, unified statuses, operator visibility. New projects launch faster with lower integration risk and predictable, scalable payment infrastructure.

Technologies

  • Go
  • Gin
  • Next.js
  • Postgres
  • MongoDB
  • Docker

Outcomes

  • +20% development velocity
  • +80% faster store launches
  • Standardised payment infra
All cases