Receipts And Verification
Generate receipts with proof roots so counterparties can verify charges independently.
Receipts turn period totals into independently verifiable records.
Typical workflow:
- Record deltas during the period (
POST /api/v1/balance/delta) - Commit a checkpoint (
POST /api/v1/balance/checkpoint) - Generate a receipt (
GET /api/v1/balance/receipt/:customerId) - 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:
proofRootdeltaCountstartingBalancefinalBalanceverification.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.