BTCPay Server
Bitcoin Accounting
BTCPay Server + Clams
xPub LNC RuneBTCPay Server is a self-hosted Bitcoin payment processor used by merchants worldwide. Clams tracks your BTCPay payments on-chain using the store's xPub, and Lightning payments via LND or Core Lightning. Full payment history with accurate cost basis for merchant accounting.
What Clams tracks
On-chain (xPub)
- All addresses from your store wallet
- Incoming customer payments
- Individual UTXOs with cost basis
- Transaction fees paid
- Capital gains on each spend
Lightning (LND or Core Lightning)
- Channel opens and closes with on-chain fees
- Lightning invoices and payments
- Routing fee income from forwarded payments
- On-chain funding transactions
- Automatic cost basis tracking per transaction
How it works
On-chain tracking
Export xPub from BTCPay Server
In BTCPay Server, go to Store > Wallets > On-Chain settings to find your xPub.
Add connection in Clams
In Clams, add a new connection and select xPub. Paste the exported value from BTCPay Server.
Sync payment history
Clams discovers all addresses and imports your full payment history.
Lightning tracking
Generate read-only credentials
For LND, create an LNC pairing phrase. For Core Lightning, generate a read-only Rune.
Add connection in Clams
In Clams, add a new connection and select your node type. Enter your credentials.
Sync Lightning activity
Clams imports channels, invoices, payments, and routing fees automatically.
Resources
BTCPay Server wallet setup
Official docs for on-chain wallet configuration
BTCPay Server Lightning setup
Official docs for setting up LND or Core Lightning
LND integration guide
Connect your LND node to Clams via LNC
Core Lightning integration guide
Connect your CLN node to Clams via Rune
Video walkthrough: xPub wallet setup
Frequently asked questions
What data does Clams import from BTCPay Server?
Clams imports all addresses derived from your store's xPub, incoming payments, UTXOs, and calculates cost basis per transaction. Your private keys stay in BTCPay Server.
Does Clams access my private keys?
No. Clams uses watch-only access via xPub. Your private keys remain secure in BTCPay Server. The xPub only allows Clams to view addresses and transactions, not spend funds.
Can I track multiple BTCPay Server stores?
Yes. Add each store's xPub separately in Clams. Each store gets independent tracking and reporting.
Does BTCPay Server support Lightning?
Yes. BTCPay Server supports Lightning via LND or Core Lightning. Connect your Lightning node directly to Clams for full tracking of channels, invoices, payments, and routing fees.
How do I get capital gains reports from my BTCPay Server payments?
Export your store's xPub from BTCPay Server and add it to Clams. Clams calculates cost basis for every payment and tracks capital gains when you spend. Export reports from the Exports widget.
Where do I find my xPub in BTCPay Server?
In BTCPay Server, go to your Store settings, then Wallets, then On-Chain. Click on the wallet and view the wallet settings to see the xPub.
Start tracking your BTCPay Server payments
Download Clams and connect your store in minutes.