NFT and Product Checkouts

Configure Snap Wallet for NFT checkouts, and any other product or service, in a snap! Simply provide a product configuration parameter to get started. A user can purchase an NFT using a debit card or a bank account:

<!DOCTYPE html5>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <canvas id="qr-canvas"></canvas>
    <br />
    <button id="buy-button">Buy The Crown #1</button>

    <script src=""></script>
      const snap = new window.Snap({
        appName: 'Example App',
        // 'sandbox' or 'production' default: 'production'
        environment: 'sandbox',
        product: {
          // Optionally provide an image URL instead
          // imageURL: '',
          destinationAmount: 20,
          destinationTicker: 'ETH',
          destinationAddress: '0xf636B6aA45C554139763Ad926407C02719bc22f7',
          title: 'The Crown #1',
        onMessage: (msg) => {
          console.log('Msg', msg.event, 'Msg Data',
          const closeEvents = [,]
          if (closeEvents.includes(msg.event)) {

      // Open using a button
      const btn = document.getElementById('buy-button')
      btn.onclick = snap.openWeb

      // Open using a QR code
      const canvas = document.getElementById('qr-canvas')
      snap.createQR({ element: canvas, pixelSize: 200 })

results matching ""

    No results matching ""