Skip to main content
Morapay is designed so merchants ship native-feeling checkout and error UI: components live in your DOM tree, inherit your typography, and avoid unpolished full-page iframe embeds.

Philosophy

Error UI today

Every API error includes a rendering blueprint:

Vanilla toast

morapay.ui.toast(err) is equivalent. Toasts are **browser-only; they no-op when document is unavailable (server-side).

Placement hints

Checkout widget

Load the widget from your checkout host:
Not a full-page iframe. The outer modal is native (Shadow DOM on your page). Only the card/MoMo/KYC canvas runs inside a secure iframe (?hybrid=1&canvas=1). Server-side URL helpers:
@morapay/react will wrap MorapayErrorView, checkout forms, and hooks. See the React hooks page for the planned API.

Next steps

React hooks

Planned @morapay/react component API.

Custom styling

Theme tokens and Tailwind integration.