Embed Builder
Generate your embed in 30 seconds.
Paste your publishable key, choose a button type, and copy the snippet. Drop it on your site. Done.
Don't have one? Sign up free and you'll get one instantly.
Catalog: shows every product you've created. Product: a specific product or subscription. Donation: fixed dollar amount, one-time.
<!-- 1. Drop this once anywhere in your site (best in <head> or just before </body>) --> <script src="https://xmrgate.com/embed.js" data-pk="pk_live_YOUR_PUBLISHABLE_KEY" async></script> <!-- 2. Add as many of these buttons as you want --> <button data-xmrgate-pay>Pay with crypto</button>
<script>
XMRGate.open({
onSuccess: (e) => {
console.log("paid", e.checkoutId, e.txHash);
// fulfill the order
},
onCancel: () => console.log("cancelled"),
});
</script>Live preview: add
?pk=pk_live_YOUR_PUBLISHABLE_KEY to /embed/v1 to see exactly what your buyers will see.Lifecycle events
The embed posts these events back to your page via window.postMessage. Subscribe via onSuccess, onCancel in the programmatic API, or with window.addEventListener("message", …).
checkout.createdBuyer hit Pay — payUrl ready, checkoutId returnedpayment.detectedBuyer's tx is in mempoolpayment.confirmingOn-chain, building confirmationspayment.confirmedFinalized — safe to fulfill the orderpayment.cancelledQuote expired without paymentFree forever for the first $5,000/month.
Sign up takes 60 seconds. The embed takes 30 more.
