Donations and Tips

Accept cryptocurrency from fiat (debit accounts, checking accounts, credit cards, etc...) as donations and tips. This flow is useful for your open source project, non-profit organization, small business, school or anywhere else you would like to accept donations. Simply provide a destination wallet address for each crypto currency you'd like to accept donations for and optionally a source asset and/or source amount:

<!DOCTYPE html5>
    <meta charset="utf-8" />
      content="user-scalable=0, initial-scale=1, minimum-scale=1, maximum-scale=1, width=device-width"
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <canvas id="qr-canvas"></canvas>
    <br />
    <button id="donate-button">Donate $25</button>

    <script src=""></script>
      const snap = new Snap({
        appName: 'Example App',
        // 'sandbox' or 'production' default: 'production'
        environment: 'sandbox',
        wallets: [
          { asset: 'btc', address: 'ms6k9Mdsbq5ZkoXakJexxjGjpH2PbSQdWK' },
        onMessage: (msg) => {
          console.log('Msg', msg.event, 'Msg Data',
          const closeEvents = [,]
          if (closeEvents.includes(msg.event)) {

      // Donate $25 using a button
      const btn = document.getElementById('donate-button')
      btn.onclick = () => snap.openWeb({ sourceAmount: 25 })

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

results matching ""

    No results matching ""