Widget
The fastest way to accept payments — a single script tag, no build step, no framework required. It opens the same hosted checkout page in a modal.
Install
<script src="https://payment.zelapay.xyz/widget.js"></script>
<script>
ZelaCheckout.open({
publishableKey: "pk_live_...",
amount: "19.99",
successUrl: "https://your.site/thanks",
});
</script>Options
publishableKey— required. Yourpk_live_…key. Never use a secret key here.amount— required. Decimal string, in USDC.successUrl/cancelUrl— optional. Where the customer ends up after paying or closing the modal.metadata— optional. A flat string map you’ll get back on the session and in the webhook — order IDs, customer references, etc.
The widget creates its own session using your publishable key, so it never needs your secret key. It closes automatically once the payment settles.