Skip to content

How Customer Records Work

Each unique customer ID creates an isolated customer record with deterministic references.

When you emit a delta through the Balance API, each unique customerId automatically maps to its own isolated customer record.

No setup step is required.


Automatic Isolation

On first use of a new customerId, PacSpace:

  1. Creates a deterministic customer reference.
  2. Isolates the customer's deltas, balances, and checkpoints.
  3. Tracks summary metadata (first activity, last activity, and total deltas).
bash
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"
  }'

One Customer, One Record

Customer IDCustomer ReferenceDeltasBalance
cust_0010xA1b2...Ef34424,500.00
cust_0020xC3d4...567812812,800.00
partner_acme0xE5f6...9abc1,20495,320.00

Data remains customer-scoped:

  • Deltas for one customer do not affect another customer's balance.
  • Checkpoints and receipts are generated per customer context.
  • Verification remains isolated across customers.

Deterministic Customer Reference

The same customerId always yields the same customerReference.

This gives you stable identifiers across:

  • API calls
  • SDK versions
  • dashboard views

Privacy Boundary

PacSpace stores derived verification data for each customer record and does not need your private customer profile data.

You keep private business context (names, emails, account metadata) in your own systems.


Viewing Customer Records

Dashboard

Open Customers to browse records, search by customer ID, and inspect activity.

API

bash
# List records
curl https://balance-api.pacspace.io/api/v1/balance/customers \
  -H "X-Api-Key: YOUR_API_KEY"

# Get one record
curl https://balance-api.pacspace.io/api/v1/balance/customers/cust_001 \
  -H "X-Api-Key: YOUR_API_KEY"

SDK

typescript
const { customers } = await pac.balance.customers();
const customer = await pac.balance.customer('cust_001');
console.log(customer.computedBalance);

See Querying Customer Records for endpoint details.