Resources
Demo Merchant
Bella Cart — a runnable storefront wired against the PayNow gateway. Try it before you integrate.
The PayNow workspace ships a fully working merchant demo so you can experience the customer flow before you write a line of integration code.
Live demo
shop.fawri.ly — Bella Cart, a Jaspr storefront pre-integrated with the production PayNow gateway.
The demo is built from examples/paynow_jaspr_ecommerce_demo/ and is the canonical reference for any merchant integration.
What to try
- Add an item to the cart. A few demo SKUs are seeded.
- Click "Place order with PayNow". The merchant server calls
/web-payment/initiateserver-side and redirects you to the gateway. - Choose a payment method:
- QR — scan with your banking app (or simulate via the OnePay sandbox dashboard).
- OnePay Account — enter a sandbox account number and OTP.
- PayNow Wallet — enter a sandbox wallet ID and OTP.
- Watch the receipt populate after the status poller detects settlement.
Run it locally
git clone https://github.com/your-org/paynow-nexus.git
cd paynow-nexus
./scripts/start_local_stack.sh
Then open http://localhost:8082.
See Quick Start for a full walkthrough.
What to study in the source
| File | Why |
|---|---|
examples/paynow_jaspr_ecommerce_demo/lib/merchant_initiate_handler.dart |
The server-side endpoint — your integration's most important reference. |
examples/paynow_jaspr_ecommerce_demo/lib/ecommerce_demo_app.dart |
The cart UI + click handler that POSTs to /api/initiate-payment. |
examples/paynow_jaspr_ecommerce_demo/bin/server.dart |
How merchantInitiateMiddleware is mounted (before runApp). |
Demo limitations
- The demo runs
onepaymode only whenscripts/onepay.sandbox.envhas credentials. Otherwise it falls back to in-memory fixtures. You can override the file withONEPAY_ENV_FILE=.... - The local stack defaults to sandbox (
paynowdev.firstfintech.com). Switch to live (backend.paynow.com.ly) only after manual QA — copyscripts/onepay.live.env.exampletoscripts/onepay.live.envand run withONEPAY_ENV_FILE=scripts/onepay.live.env. See Merchant Onboarding for details. - Do not use real customer data on sandbox. All test accounts are sandbox accounts.
- The demo's "Place order" button POSTs cart data straight from the browser to
/api/initiate-payment— this is OK because the merchant credentials live on the server. Your storefront's checkout button works the same way.