Browser packages
Public payment tokens belong in the browser. Secret API keys do not.
On this page
React 18 and 19
@forwend/react 0.1.1 exports Checkout, PaymentElement and PayButton. Install it alongside your existing React application.
Shell
npm install @forwend/react@0.1.1Plain JavaScript
@forwend/js 0.1.1 exports mountCheckout, payUrl and linkUrl. mountCheckout returns an instance with destroy() for cleanup.
JavaScript
import { mountCheckout } from "@forwend/js";
const container = document.querySelector("#checkout");
if (container) {
const checkout = mountCheckout(container, { payToken });
// When removing this view:
// checkout.destroy();
}Keep public and secret values separate
- payToken identifies the hosted payment page and can be passed to a customer.
- The store’s allowed origins decide which sites may embed its checkout.
- FORWEND_KEY and FORWEND_WEBHOOK_SECRET stay on your server.
- Callbacks update presentation only; confirm payment through the server API.