Generate a Payment Request

Enter a VerusID or address and an amount to create a scannable QR code and deep link.


                    

How It Works

The payment flow from name resolution to mobile confirmation.

  1. Supports VerusID names (name@), i-addresses, and R-addresses as input
  2. Server resolves the name to an address via the Verus daemon
  3. Generates a VerusPay invoice as a deep link URI
  4. QR code encodes the deep link for scanning with Verus Mobile
  5. Verus Mobile opens and prompts the user to confirm payment

Add to Your Website

Use the pay-deeplink endpoint to generate payment requests from your own app.

Request a deep link

// POST /verus/pay-deeplink
const res = await fetch('/verus/pay-deeplink', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    address: 'veruscx@',
    amount: 5
  })
});

const { deep_link } = await res.json();
console.log(deep_link);

Request a conversion payment

Accept payment in any currency — the protocol converts automatically. Set accepts_conversion: true and max_slippage (0.005 = 0.5%).

// POST /verus/pay-deeplink — conversion mode
const res = await fetch('/verus/pay-deeplink', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    address: 'veruscx@',
    amount: 0.20,
    currency_id: 'iGBs4DWztRNvNEJBt4mqHszLxfKTNHTkhM', // DAI.vETH
    accepts_conversion: true,
    max_slippage: 0.005  // 0.5%
  })
});

const { deep_link } = await res.json();
// QR encodes: "pay 0.20 DAI — buyer can convert from any currency"

The invoice includes the VERUSPAY_ACCEPTS_CONVERSION flag and slippage tolerance. When scanned, Verus Mobile queries all DeFi basket routes via getcurrencyconverters and lets the buyer choose which currency to pay with. The conversion and payment happen atomically in one on-chain transaction.

Generate a QR code from the deep link

<canvas id="qr"></canvas>
<script src="https://cdn.jsdelivr.net/npm/qrcode/build/qrcode.min.js"></script>
<script>
  // After fetching deep_link from /verus/pay-deeplink
  QRCode.toCanvas(
    document.getElementById('qr'),
    deep_link,
    { width: 220, margin: 2 }
  );
</script>

Supported Formats

Any of these address formats can be passed in the address field.

Format Example
VerusID name veruscx@
i-address i6QEbNsGThm2JHUwpLwxSu77DwzFWvfHv6
R-address RAhD9vgrWZ3ALkq541xdqL2oLYEvsLNrzn