Guide

Solana Pay QR micropayments

In-browser wallet connect does not work everywhere — especially inside mobile Twitter or Discord in-app browsers. Solana Pay lets users scan a QR or tap a solana: link, pay from their wallet app, and return with an on-chain receipt. Garden Dice is a live micropayment demo.

Try Solana Pay live — open a challenge page, scan the QR from your phone, tap “I've paid — detect & roll”.

Why QR beats “connect wallet” on mobile

Wallet browser extensions work on desktop Chrome. On a phone, users often open your site inside an embedded browser that cannot inject Phantom or Solflare. Solana Pay sidesteps that: the payment happens in the wallet app the user already trusts, then your page verifies the transaction signature on mainnet.

For pay-per-use apps (rolls, tips, unlocks), this flow is often faster than forcing a wallet connect dance that fails half the time on mobile.

Free Solana Pay QR generator

Build a solana: transfer URL and scannable QR for any recipient. Wallets read the QR as a deeplink — useful for testing micropayments or tipping without writing code.


          

Enter a valid address to generate a QR.

Scan with Phantom, Solflare, or any Solana Pay wallet. Network fee is about 0.000005 SOL on top of the amount. Try a live micropayment on Garden Dice.

What a Solana Pay transfer URL looks like

A transfer request is a URL using the solana: protocol with the recipient pubkey and query parameters:

solana:8sohhHrVBXtmFZGr3nR61MAzWWznNqMKamVrQYkYkAox?amount=0.005&label=Garden+Dice&message=Roll+payment

Wallets render this as a deeplink or QR code. After the user approves, they get a transaction signature you can verify with any public RPC.

Network fees are tiny on Solana

A common first-payment worry: “Do I have enough SOL for the fee?” On mainnet the base network fee is about 0.000005 SOL per transfer — far less than the 0.001 SOL micropayment itself. You need payment plus fee in your wallet, but you do not need a large SOL balance to try Garden Dice.

See the Solana transaction fees guide for base vs priority fees, or your first Solana payment if you have never sent SOL from a wallet before.

If your wallet shows a balance but rejects the transfer, SOL may be rent-locked in empty token accounts from spam airdrops — see wallet cleanup or reclaim rent before retrying the QR.

Verify payment on-chain (no backend required)

Garden Dice verifies payments client-side:

  1. Fetch the parsed transaction via connection.getParsedTransaction(signature) on mainnet.
  2. Find the treasury account in the transaction’s account keys and compare postBalance − preBalance to the expected lamports.
  3. Reject replays — store used signatures in localStorage so the same payment cannot roll twice.
  4. Deliver the roll only after verification passes — same commit-reveal flow as wallet connect.

This pattern works for static sites: no server, no API keys, just public RPC + transparent treasury address.

Try it on Garden Dice

Open the beat roll of 4 challenge — the Solana Pay tab shows a QR. Scan with Phantom or Solflare on your phone, pay 0.001 SOL, then tap I've paid — detect & roll.

Prefer desktop? Switch to the Wallet tab on the same page. Both paths land on the same provably fair roll — see the commit-reveal guide for fairness details.

Further reading