AggregateDocs
Guides

BTCPay Server and Aggregate

Last updated

Short answer: Aggregate reads each BTCPay store's monthly settled invoices and completed payouts, and the store's on-chain wallet balance, so you can ask any AI assistant or agent about them alongside your banks, payment processors and payroll. It can't move money, and it only connects an API key that can only view: it checks that before connecting and before every sync.

Status: Beta. It's built to BTCPay Server's API documentation and source and hasn't been tried with a real server yet, so it's marked Beta. If a number looks off, tell us at support@aggregate.finance.

What you need: BTCPay Server 2.0 or later, reachable at a public https address.

What it reads

From those, Aggregate adds up each month's settled invoices per currency, broken down by what they were paid with (for example "Paid with BTC on-chain: 0.00179617 BTC", worth its value at each invoice's rate), and completed payouts, the same way. Crypto amounts are added exactly, to the last satoshi; money amounts to the cent.

It's a report: nothing is posted to Aggregate's ledger. The wallet balance shows as holdings beside your accounts, never as cash. Invoices priced in BTC itself aren't in the report (the sync says how many). Lightning balances aren't read: BTCPay only shows them to keys that can also pay from the node, which Aggregate refuses. Lightning payments to invoices are in the report.

No buyer names, emails, addresses, order ids, item descriptions or wallet addresses are kept.

Why a view-only key

A BTCPay API key can do what its permissions allow. Before it connects and at the start of every sync, Aggregate asks BTCPay which permissions the key has, and every one must be a view permission: View your stores, View invoices, View payouts, View wallets, and the like. A key that can create invoices, change a store, manage payouts or pull payments, sign or broadcast a wallet transaction, use the Lightning node, or has unrestricted access is refused. If a key gains a permission later, Aggregate stops, disconnects it and deletes its copy of the key.

Make the key

  1. Sign in to your BTCPay Server with an account that can see the stores you want.
  2. Open Account (your profile) → API Keys → Generate Key.
  3. Label it Aggregate.
  4. Tick View your stores. To see the on-chain wallet balance too, tick View wallets. Leave everything else off. To limit the key to some stores, use the store selection next to each permission.
  5. Choose Generate API Key and copy it.

Connect

  1. In Aggregate, open Connections, choose Add, then BTCPay Server.
  2. Type your BTCPay Server's address, the one in your browser after you sign in (for example https://btcpay.example.com).
  3. Paste the API key. Each store the key can view becomes its own connection.

How often it updates

Every few hours. Each sync begins by checking the key again.

Disconnect and delete

Disconnect a store in Aggregate at any time: open Connections, choose the connection, then Disconnect. Disconnecting deletes what it brought in after 30 days, unless you connect it again before then, or right away if you choose Disconnect and delete its data. Aggregate can't delete the key in BTCPay Server, so to end access there too, open Account → API Keys and delete the Aggregate key.

© 2026 Aggregate Finance LLC