How Customer Ledgers Work
Every unique customer ID creates an automatically isolated ledger with its own derived identifier. No setup required.
When you record a delta using the Balance API, each customerId you pass automatically receives its own isolated ledger. There is no setup or configuration required -- it happens on the first emit.
Automatic Isolation
Every time you call the emit endpoint with a customerId, PacSpace:
- Derives a unique ledger identifier for that customer (deterministic -- the same ID always produces the same identifier)
- Assigns an isolated verification space so that customer's deltas, balances, and checkpoints are independently verifiable
- Tracks aggregate statistics including total deltas, first and last activity timestamps
# First emit for "cust_001" -- creates the ledger automatically
curl -X POST https://balance-api.pacspace.io/api/v1/balance/delta \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customerId": "cust_001",
"delta": 500,
"reason": "initial_deposit"
}'
After this call, cust_001 has a ledger with:
- A unique ledger identifier (e.g.,
0xA1b2...Ef34) - A total delta count of 1
- A computed balance of 500
One Customer, One Ledger
Each customer's data is completely isolated:
| Customer ID | Ledger Identifier | Deltas | Balance |
|---|---|---|---|
cust_001 | 0xA1b2...Ef34 | 42 | 4,500.00 |
cust_002 | 0xC3d4...5678 | 128 | 12,800.00 |
partner_acme | 0xE5f6...9abc | 1,204 | 95,320.00 |
- Deltas emitted for
cust_001only affectcust_001's balance - Verifications for
cust_002only returncust_002's proof data - There is no cross-contamination between customers
Deterministic Identifiers
Ledger identifiers are deterministic -- the same customerId always produces the same identifier. This means:
- You can independently verify which identifier belongs to which customer
- Identifiers are stable across API calls and SDK versions
- You do not need to store the ledger identifier separately (though you can)
The Privacy Boundary
PacSpace stores only the derived ledger identifier for each customer. It does not know or store any information about who that customer is in your system.
Your responsibility:
- Store the mapping between your internal customer records and the
customerIdyou pass to PacSpace - Maintain your own customer database with names, emails, account details, etc.
PacSpace stores:
- The derived ledger identifier (a deterministic address)
- Aggregate counts (total deltas, first/last activity)
- Individual delta amounts, verification fingerprints, and timestamps
This separation means PacSpace operates as neutral infrastructure -- it verifies data integrity without knowing the business context.
Viewing Customer Ledgers
Dashboard
Navigate to Customer Ledgers in the sidebar to see all your customers, search by ID, and drill into individual ledger details.
API
Use the customer ledger endpoints to programmatically list and inspect ledgers:
# List all customer ledgers
curl https://balance-api.pacspace.io/api/v1/balance/customers \
-H "X-Api-Key: YOUR_API_KEY"
# Get a specific customer's ledger detail
curl https://balance-api.pacspace.io/api/v1/balance/customers/cust_001 \
-H "X-Api-Key: YOUR_API_KEY"
SDK
const { customers } = await pac.balance.customers();
const ledger = await pac.balance.customer('cust_001');
console.log(ledger.computedBalance); // 4500.00
See Querying Ledgers for full endpoint documentation.