Skip to content

Receipts And Verification

Generate receipts with proof roots so counterparties can verify charges independently.

Receipts turn period totals into independently verifiable records.

Typical workflow:

  1. Record deltas during the period (POST /api/v1/balance/delta)
  2. Commit a checkpoint (POST /api/v1/balance/checkpoint)
  3. Generate a receipt (GET /api/v1/balance/receipt/:customerId)
  4. Share the proof root or verify URL (GET /api/v1/verify/:proofRoot)

Record 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_acme_001",
    "delta": -150,
    "reason": "api_call",
    "referenceId": "line_001"
  }'

Commit Checkpoint

bash
curl -X POST https://balance-api.pacspace.io/api/v1/balance/checkpoint \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "cust_acme_001",
    "period": "2026-04"
  }'

Generate Receipt

bash
curl "https://balance-api.pacspace.io/api/v1/balance/receipt/cust_acme_001?period=2026-04" \
  -H "X-Api-Key: YOUR_API_KEY"

Expected receipt fields include:

  • proofRoot
  • deltaCount
  • startingBalance
  • finalBalance
  • verification.verifyUrl

Share Verification

Counterparties can verify using the public endpoint:

http
GET /api/v1/verify/:proofRoot

No tenant authentication is required for this verification route.


Dispute Resolution Pattern

When balances disagree, use POST /api/v1/balance/compare to identify the exact divergence window and resolve by neutral math.