Documentation
Pay button
Custom element with Shadow DOM. Served as a single pay.js bundle from your Zap host.
<script src="https://your-zap-host/pay.js" defer></script>
Core attributes
| Attribute | Notes |
|---|---|
| merchant | Required shop id from the dashboard |
| amount | USD decimal for one-time payments |
| mode | "one-time" | "subscription" | "schedule" |
| api | Zap host if pay.js is loaded from a CDN or another origin |
| display | "modal" (default) or "redirect" |
Programmatic API
After pay.js loads, window.Zap exposes createSession, openCheckout, and checkoutLink.
Full attribute list: see packages/sdk/README.md in the repo.