DEV Community

TateLyman
TateLyman

Posted on

Accept Crypto Payments with On-Chain Verification — No Stripe, No Gumroad

The Problem

Payment processors take 2.9% + $0.30 per transaction. For a $10 digital product, that's a 6% cut. Plus monthly fees, chargeback risk, and KYC requirements.

The Solution

Accept SOL (Solana) directly and verify the payment on-chain. Zero fees. Zero chargebacks. Zero middlemen.

How It Works

1. Show Payment Page

Display your wallet address and the price in SOL.

2. User Sends SOL

They send from any Solana wallet (Phantom, Solflare, etc.)

3. User Enters Transaction Signature

After sending, they paste the transaction signature.

4. Verify On-Chain

const { Connection } = require('@solana/web3.js');

async function verifyPayment(signature, expectedWallet, expectedAmount) {
  const conn = new Connection('https://api.mainnet-beta.solana.com');
  const tx = await conn.getTransaction(signature, {
    commitment: 'confirmed',
    maxSupportedTransactionVersion: 0,
  });

  if (!tx || !tx.meta) return false;

  // Check recipient received expected amount
  const accounts = tx.transaction.message.staticAccountKeys || 
                   tx.transaction.message.accountKeys;

  for (let i = 0; i < accounts.length; i++) {
    if (accounts[i].toString() === expectedWallet) {
      const received = (tx.meta.postBalances[i] - tx.meta.preBalances[i]) / 1e9;
      if (received >= expectedAmount * 0.99) { // 1% tolerance
        return true;
      }
    }
  }
  return false;
}
Enter fullscreen mode Exit fullscreen mode

5. Deliver Product

If verified, show the download link.

In Production

I use this pattern across 5 product pages:

  • Bot source code (2 SOL)
  • Grid trading bot (0.5 SOL)
  • DeFi toolkit (0.3 SOL)
  • Trading guide (0.2 SOL)
  • Prompt pack (0.1 SOL)

Zero payment processing fees. No chargebacks. Instant settlement.

Live Example

devtools-site-delta.vercel.app/links

Top comments (0)