en

Cryptocurrency Payment Integration for Tor Hidden Services

Hidden services that require payment for subscriptions, digital goods, or services must use cryptocurrency since traditional payment processors (Stripe, PayPal, credit cards) require identity verification incompatible with the anonymous .onion service context. Monero is the preferred currency for hidden service payments due to its built-in transaction privacy. Bitcoin with privacy enhancements (Wasabi wallet, Lightning Network) provides an alternative. This guide covers practical cryptocurrency payment integration for .onion services.

Need this done for your project?

We implement, you ship. Async, documented, done in days.

Start a Brief

Monero Payment Integration

Monero (XMR) provides transaction privacy through ring signatures, stealth addresses, and RingCT amount hiding. For hidden service payment integration, run a Monero wallet daemon (monero-wallet-rpc) configured to use Tor via --proxy 127.0.0.1:9050. Generate a unique subaddress for each payment using the JSON-RPC API: method create_address with the account parameter. Display the subaddress and expected amount to the user. Poll the Monero wallet RPC for incoming transactions to this subaddress: use get_transfers filtered by address. Monero's stealth address system ensures each payment to a subaddress produces a unique on-chain transaction output, preventing correlation between different customers' payments even by blockchain observers.

Bitcoin and Lightning Network Payments

Bitcoin payments on hidden services require privacy-enhanced handling. Use a Bitcoin full node (Bitcoin Core with -proxy=127.0.0.1:9050 for Tor routing) or BTCPay Server to generate unique payment addresses per order. BTCPay Server is a self-hosted payment processor with native .onion support - it can be configured to run as a Tor hidden service with its administration interface accessible only via .onion. Lightning Network payments through BTCPay Server provide instant settlement with smaller on-chain footprint. Ensure your Lightning node connects only through Tor (Core Lightning with --tor-service-address, LND with tor.active=true) to prevent IP disclosure. For enhanced on-chain Bitcoin privacy, integrate CoinJoin processing on withdrawal wallets.

Building a Payment Processing Workflow

Implement a payment state machine in your application: PENDING (address displayed, awaiting payment), RECEIVED (payment detected on chain, awaiting confirmations), CONFIRMED (N confirmations received, payment settled), EXPIRED (payment window elapsed without payment). Store payment records in your database linked to order IDs. Poll the wallet RPC every 30-60 seconds for payment status updates, or use blockchain notification webhooks if supported by your wallet implementation. Implement payment expiration (typically 15-60 minutes) to release unpaid addresses for reuse. For Monero, confirmations arrive within 2-5 minutes (10 blocks). For Bitcoin on-chain, allow 1-3 confirmations (10-30 minutes). Lightning payments are instant.

Handling Exchange Rate and Pricing

Cryptocurrency prices fluctuate. Display prices in fiat currency (USD, EUR) converted to cryptocurrency at checkout time using current exchange rates. Fetch exchange rates from privacy-respecting APIs accessible via Tor SOCKS proxy: Bisq market data (DEX rates), Kraken or Binance API (centralized exchange rates, check if accessible via Tor). Lock the exchange rate for the payment window duration (typically 15-30 minutes) at the time of checkout. Include a small buffer (1-2%) above the locked rate to cover exchange rate movement between quote and payment receipt. Display clearly to users that prices are quoted in fiat equivalent and converted to cryptocurrency at checkout.

Privacy Considerations for Withdrawal and Operations

The operator side of payment privacy is as important as user-facing payment privacy. Monero wallets on the server accumulate incoming payments under the same master account. Use a separate wallet for each service or revenue category. Sweep accumulated XMR to cold storage periodically using Monero transfers that do not leave on-chain clustering evidence. For Bitcoin, use Samourai Wallet or Wasabi Wallet's CoinJoin functionality when withdrawing accumulated payments to reduce blockchain analytics correlation. Never withdraw cryptocurrency payments to exchange accounts linked to your real identity if service operator anonymity matters. For operational expenses (server hosting), pay using cryptocurrency purchased through peer-to-peer exchanges without KYC.

Why Anubiz Host

100% async — no calls, no meetings
Delivered in days, not weeks
Full documentation included
Production-grade from day one
Security-first approach
Post-delivery support included

Ready to get started?

Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.

Anubiz Chat AI

Online