BTCPay Server
Bitcoin Accounting

BTCPay Server + Clams

xPub LNC Rune

BTCPay 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

01

Export xPub from BTCPay Server

In BTCPay Server, go to Store > Wallets > On-Chain settings to find your xPub.

02

Add connection in Clams

In Clams, add a new connection and select xPub. Paste the exported value from BTCPay Server.

03

Sync payment history

Clams discovers all addresses and imports your full payment history.

Lightning tracking

01

Generate read-only credentials

For LND, create an LNC pairing phrase. For Core Lightning, generate a read-only Rune.

02

Add connection in Clams

In Clams, add a new connection and select your node type. Enter your credentials.

03

Sync Lightning activity

Clams imports channels, invoices, payments, and routing fees automatically.

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.