Accept XEP Payments Directly on Your Website

Accept XEP Payments Directly on Your Website

The OmniXEP Web Wallet Extension now allows any website to request transactions directly from users — no address copying, no app switching, no QR codes. With a single
JavaScript call, your site connects to the user’s wallet and requests a payment in a secure and transparent way.

How It Works

Once the user has the extension installed, the window.omniXep object becomes available on every page. Your site can use it to request an XEP or OmniXEP token transaction at any time.

 

When the button is clicked, the extension opens a confirmation popup showing the recipient and the transaction amount. The user approves or rejects — no data leaves the
browser without explicit consent. If approved, the transaction ID is returned directly to your page.

Security First

The user is always in control. No transaction is sent without explicit confirmation. If the user rejects or closes the popup, the Promise is rejected with a standard JSON-RPC error object containing a code and a message, which your site can handle gracefully.

Why This Matters

Crypto payment integrations are often complex and error-prone. With the OmniXEP Extension, the flow is simple for the developer and safe for the end user — no private keys
exposed, no external redirects, and a fully native browser experience.

Whether you’re building a store, a donation platform, a game, or any service that accepts XEP or OmniXEP tokens, this integration is the most straightforward way to get started.

Here is a complete simple working example, you can adjust this code on any website, add or remove fields and do whatever you want:

OmniXEP Payment Demo

Pay with XEP or OmniXEP Tokens








		

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>OmniXEP Payment Demo</title>
</head>
<body>

<h1>Pay with XEP or OmniXEP Tokens</h1>

<label>
Property ID (PID):
<input id="pid" type="number" value="0" />
</label>

<br />

<label>
Recipient address:
<input id="recipient" type="text" />
</label>

<br />

<label>
Amount:
<input id="amount" type="number" step="0.01" />
</label>

<br />

<button onclick="sendTransaction()">
Send Payment
</button>

<pre id="sendResult"></pre>

<script>

async function sendTransaction() {

const pid = parseInt(
document.getElementById('pid').value,
10
);

const recipient =
document.getElementById('recipient')
.value
.trim();

const amount = parseFloat(
document.getElementById('amount').value
);

try {

const txId =
await window.omniXep.request({

method: 'sendTransaction',

params: [{
pid,
recipient,
amount
}],

});

showResult(
'sendResult',
{ txId },
false
);

} catch (err) {

// err.code — numeric error code
// err.message — human-readable description
//
// Common codes:
// 4001 — User rejected the request
// -32000 — Insufficient funds
// -32602 — Invalid parameters

showResult(
'sendResult',
err,
true
);

}

}

function showResult(
elementId,
data,
isError
) {

const el =
document.getElementById(elementId);

el.style.color =
isError ? 'red' : 'green';

el.textContent =
JSON.stringify(data, null, 2);

}

</script>

</body>
</html>