Give this page and the pay/ folder to a vendor developer. They load one script, call MavricPay.checkout with a USDT invoice, then confirm the receipt on their server. The shopper’s wallet is debited the equal MAVRIC at live DEX price, or CEX if listed. This is not a card processor. The widget below is a local demo ledger. Copy-paste config below is BSC TESTNET — not verified mainnet.
Uses mavric-pay.host.js — 50 demo MAVRIC at the demo DEX price ($0.25 unless MAVRIC_PAY_CONFIG.spotPrice). Amount is USDT. Production sites set MAVRIC_PAY_CONFIG.token and .gateway instead. Live Merchant Pay needs admin setUtilityPaymentsEnabled (anytime a merchant is tied up). Same 85/7.5/7.5 sell fee as DEX.
Ready.
Host mavric-pay.sdk.js on your domain. Addresses below are BSC TESTNET. Checkout calls payUsdtValue (pay() is disabled on-chain). Never fulfill from onPaid. Your server must run python pay/verify.py --expect-usdt <invoice> (or the same eth_call of getPaymentQuote) before shipping goods.
<script>
window.MAVRIC_PAY_CONFIG = {
chainId: '0x61',
token: '0x4d3Ce8d57f73Caa7E3f1ABD1514e5BeDdf791cf4',
gateway: '0xaFc995166E924090e27C338A0eC068627Dacf081',
treasury: '0x52CAa950e3e3d4F1560f595fDFFaf2B05F72c1d1',
rpcUrl: 'https://bsc-testnet-rpc.publicnode.com'
};
</script>
<script src="https://YOUR_DOMAIN/pay/mavric-pay.sdk.js"></script>
<button type="button" id="pay-mavric">Pay with MAVRIC</button>
<script>
document.getElementById('pay-mavric').onclick = function () {
MavricPay.checkout({
merchant: '0xYOUR_MERCHANT_WALLET',
amount: '10',
orderId: 'INV-' + Date.now(),
onPaid: function (rec) { /* UX only. Server must verify usdtValue. */ },
onError: function (err) { alert(err.message); }
});
};
</script>
payUsdtValue(merchant, orderId, usdtAmount, maxMavric) — invoice USDT; debit equal MAVRIC at live oracle (CEX if listed, else DEX). Required for shop checkout.quoteMavricForUsdt(usdtAmount) — preview debit.pay(merchant, orderId, amount) — disabled. Always reverts use payUsdtValue. Kept only so old callers get a clear error.getPayment returns paid, payer, amount (net MAVRIC), paidAt, usdtValue. Also call getPaymentQuote and match invoice USDT.registerMerchant(name) — optional; owner can pause with setMerchantActive.