Introduction
Introduction
PayNow is the SDK and gateway that turns the OnePay wallet rails into a drop-in checkout for any merchant — QR, OnePay account, and PayNow wallet payments behind one consistent flow.
PayNow is a payment SDK and gateway built on the OnePay wallet rails. It gives merchants a single drop-in checkout that supports three customer flows:
- QR payment — the customer scans a code from their own banking app and confirms the transfer.
- OnePay account + OTP — the customer enters a bank account number and an OTP delivered to their phone.
- PayNow wallet + OTP — the customer enters their PayNow wallet ID and an OTP.
The same Dart business logic powers the existing Jaspr web gateway, the merchant demo storefront, and (planned) the Flutter mobile SDK.
What you get
- A hosted gateway page the customer is redirected to. It handles QR rendering, account validation, OTP entry, status polling, and the success / failure receipt.
- A small server-side helper (
merchantInitiateMiddleware) you mount on your storefront. It exchanges cart data for apaymentIdand a redirect URL, keeping merchant credentials off the browser. - A status poller that detects payment success without the customer clicking refresh — works for both QR (paid in another app) and OnePay (asynchronous bank settlement).
- A shared design system (palette, typography, layout primitives) so the gateway looks consistent across web today and mobile when the Flutter SDK ships.
Architecture at a glance
┌──────────────┐ POST /api/initiate-payment ┌──────────────────┐
│ Browser │ ──────────────────────────────▶ │ Merchant server │
│ (storefront) │ ◀──── { redirectUrl, ... } ─── │ (your origin) │
└──────────────┘ └──────────────────┘
│ │
│ navigate(redirectUrl) │ POST /web-payment/initiate
▼ ▼
┌──────────────┐ ┌──────────────────┐
│ PayNow │ ◀── /merchant-qr ──────────── │ OnePay │
│ gateway │ ◀── /initiate-payment-request ─│ switch │
│ :8080 │ ◀── /process-payment-request ─│ │
│ │ ◀── /check-status (poll) ──── │ │
└──────────────┘ └──────────────────┘
Two processes you run locally (gateway on :8080, merchant on :8082) plus the OnePay sandbox. Production swaps the localhost origins for your own domains; the contract stays identical.
Where to go next
- Quick Start — boot the local stack and walk a QR checkout in five minutes.
- Integration Guide — wire PayNow into your storefront, end to end.
- API Reference — every public type, every endpoint.