AllScale x402 Charity

Turn every user action into a micro-donation

Drop-in middleware that donates a fraction of a cent in USDC to charity every time a user takes an action — powered by the x402 payment protocol.

Set up in 5 minutes

Deploy your own x402 charity server. Your users never need a wallet — your company funds the donations.

👤
User
💻
Your Product
🖥
x402 Charity Server
🏦
x402.org
💰
Charity

Click "Next" to see how companies integrate x402 Charity

You deploy an x402 charity server, fund it with USDC, and point it at your chosen charity. Your product server triggers donations with a simple POST request.

Run to Donate

Jump over obstacles to donate $0.001 USDC for each one cleared. No wallet needed — the server pays via x402.

Score
0
Best
0
Donated
$0.000

Charity Runner

Every obstacle cleared = $0.001 USDC donated

Space / Tap to jump
Donation log
Start running to trigger donations!

Get started in 3 steps

Create a wallet, deploy the server, and trigger donations from your product.

# Create a new wallet to fund donations.
# Use any wallet provider (MetaMask, Coinbase Wallet, etc.)
# and export the private key.

# You'll need 3 env vars:
DONATION_PRIVATE_KEY="0xabc..."  # your new wallet's private key
CHARITY_WALLET="0xdef..."       # the charity's wallet address
CHARITY_NAME="Give Directly"    # display name for the charity

# Then fund the donation wallet with:
#   • USDC on Base (for donations)
#   • A small amount of ETH on Base (for gas)
# Clone and build with Docker
$ git clone https://github.com/allscale-io/x402charity.git
$ cd x402charity
$ docker build -t x402charity .

# Run with your env vars
$ docker run -p 3402:3402 \
  -e DONATION_PRIVATE_KEY="0xabc..." \
  -e CHARITY_WALLET="0xdef..." \
  -e CHARITY_NAME="Give Directly" \
  -e DONATION_NETWORK="base" \
  x402charity

# Your server is live at http://localhost:3402
# Dashboard is built into the landing page
// From your product server — any language, any framework.
// Call POST /donate whenever a user action should trigger a donation.

const res = await fetch('https://your-charity-server.com/donate', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ amount: '$0.001' }),
});

const receipt = await res.json();
console.log(receipt.txHash); // on-chain tx proof

// GET /donations returns JSON history of all donations

Works for every product

Any user action can become a micro-donation. Here are a few examples — and why it's good for your business.

💱

DEX & Trading

Donate a fraction of a cent on every swap or trade. 50K daily trades = $50/day to charity.

$0.001 per trade
Why it helps: Differentiate from competing DEXs. Traders prefer platforms that give back — boosting retention and word-of-mouth.
🤖

AI Products & APIs

Attach a micro-donation to every API call or prompt. High-volume APIs add up fast.

$0.001 per API call
Why it helps: Improve brand image in a crowded AI market. "Every prompt helps someone" is a story users want to share.
🎮

Games

Every level cleared, match played, or in-game action triggers a small donation.

$0.001 per action
Why it helps: Increase player engagement and session time. Players feel good about playing — and tell their friends.
🛒

E-commerce

Round up every checkout or donate per order. Customers love brands that give back.

$0.01 per order
Why it helps: Attract conscious consumers. Studies show 71% of buyers prefer brands that support social causes — higher conversion, lower churn.
🎲

Betting & Predictions

Donate on every bet placed or market resolved. Turn speculation into impact.

$0.001 per bet
Why it helps: Soften public perception of betting platforms. Charitable giving builds trust with regulators and users alike.
🏦

Payments & Banking

Micro-donate on every transfer, bill payment, or card swipe processed by your platform.

$0.001 per transaction
Why it helps: Stand out in fintech. On-chain donation receipts double as a transparency feature that builds customer loyalty.

Donation dashboard

All donations are on-chain and publicly verifiable on Base.

Total Donated
-
Donations
-
Network
-
Donation Wallet
Funds donations
Loading...
Base Sepolia (testnet)
USDC -
ETH -
Base (mainnet)
USDC -
ETH -
Sepolia BaseScan | Base BaseScan
Charity Wallet
Loading...
Loading...
Base Sepolia (testnet)
USDC -
ETH -
Base (mainnet)
USDC -
ETH -
Sepolia BaseScan | Base BaseScan
Recent Donations
Loading donations...
Donation History
Loading history...