Resources
Packages
Workspace map — what every Dart package exports, and which one to depend on.
The PayNow SDK is a Dart pub workspace with these members.
paynow_core
packages/paynow_core/ — shared business logic. No UI, no browser APIs, no Flutter. Anything reusable across web + mobile lives here.
Public API:
PaymentEngine— orchestratesPaymentApicalls with retry + state machine + event bus.PaymentApi— abstract port. Implemented byPayNowOnePayApiandStaticJsonPaymentApi.createPaymentApi(mode)— factory that picks the right implementation based onPAYNOW_GATEWAY_FLOW_MODE.PaymentStatusPoller+PollSchedule— auto-polls/check-statusand self-stops on terminal.PaymentSession,PaymentState,PaymentMethod, request/response DTOs.PaymentStateMachine— allowed-transitions enforcement.RetryPolicy— retry count + backoff strategy.EventBus<PaymentEvent>— broadcast stream for session changes.HmacSigner— HMAC-SHA256 request signing.InMemoryTokenStore+TokenStoreinterface.GatewayLaunchRequest+parseGatewayLaunchRequest— handoff URL parsing.PayNowCheckoutLocalization+resolveGatewayLocalization— translation lookup.PayNowCheckoutDesignSpec+ design tokens — palette, spacing, typography.
paynow_jaspr_sdk
packages/paynow_jaspr_sdk/ — Jaspr web SDK. Wraps paynow_core with widgets and the gateway server.
Public API:
- Re-exports all of
paynow_core. PayNowWebSdk— facade your page consumes.createGatewaySdk()— constructs a default-configured SDK.PayNowGatewayPage— the full checkout component.PayNowCheckoutDocument— theDocumentwrapper with stylesheet.- Stage components:
CheckoutPage,QrComponent,AccountNumberComponent,OtpComponent,PaymentReceiptComponent,PaymentStateView.
paynow_jaspr_ecommerce_demo
examples/paynow_jaspr_ecommerce_demo/ — Bella Cart storefront. Reference implementation, not a library — depend on paynow_core directly in your own merchant.
paynow_docs
apps/paynow_docs/ — this site. Static SSG built with Jaspr + package:markdown.
Planned
paynow_flutter_sdk— mobile widgets layered onpaynow_core. Will use the samePaymentApi,PaymentEngine, andPaymentStatusPoller. Drop-inTokenStoreforflutter_secure_storage.paynow_mock_backend— a fixture-driven HTTP server for SDK development without OnePay.
Which package to depend on
| You're building... | Depend on... |
|---|---|
| A Jaspr web checkout | paynow_jaspr_sdk |
| A Flutter mobile checkout (when available) | paynow_flutter_sdk |
| A custom UI on top of the engine | paynow_core |
| A merchant server (Dart) | paynow_core |
paynow_core always works. The host SDKs are conveniences for typical UIs.