Use Cases
Recordation patterns for SaaS metering, AI inference billing, and agent-to-agent usage.
PacSpace helps usage-based products create a record before the invoice. One side writes the usage. Both sides can check it later.
SaaS Usage Metering
Record each daily usage total.
Aggregate each customer's metered usage over a 24-hour window, then emit one delta for that day. At billing time, derive the balance and attach the proof to the invoice.
# Customer used 50 compute-minutes on 2026-02-01
curl -X POST https://app.pacspace.io/api/v1/balance/delta \
-H "X-Api-Key: pk_live_PUBLIC.SECRET" \
-H "Content-Type: application/json" \
-d '{
"customerId": "customer_acme",
"delta": -50,
"reason": "daily_usage_flush:2026-02-01",
"referenceId": "usage:customer_acme:2026-02-01",
"metadata": { "plan": "growth", "resource": "compute-minutes" }
}'
# At billing time, derive the balance
curl https://app.pacspace.io/api/v1/balance/derive/customer_acme \
-H "X-Api-Key: pk_live_PUBLIC.SECRET"
Why PacSpace: The customer can check the same record you used.
AI Inference Billing
Flush daily inference usage totals. Derive the balance before invoices go out. Checkpoint the period when the invoice window closes.
# Flush one metering day of inference usage
curl -X POST https://app.pacspace.io/api/v1/balance/delta \
-H "X-Api-Key: pk_live_PUBLIC.SECRET" \
-H "Content-Type: application/json" \
-d '{
"customerId": "tenant_hooli",
"delta": -4382,
"reason": "daily_usage_flush:2026-02-01",
"referenceId": "usage:tenant_hooli:2026-02-01",
"metadata": { "resource": "inference-requests", "plan": "starter" }
}'
# At period end, derive the final balance
curl https://app.pacspace.io/api/v1/balance/derive/tenant_hooli \
-H "X-Api-Key: pk_live_PUBLIC.SECRET"
# Share the balance with the customer and let them verify
curl -X POST https://app.pacspace.io/api/v1/balance/compare \
-H "X-Api-Key: pk_live_PUBLIC.SECRET" \
-H "Content-Type: application/json" \
-d '{
"yourBalance": -4382,
"theirBalance": -4382,
"startingBalance": 0
}'
# At period end, create a checkpoint proof for the billing window
curl -X POST https://app.pacspace.io/api/v1/balance/checkpoint \
-H "X-Api-Key: pk_live_PUBLIC.SECRET" \
-H "Content-Type: application/json" \
-d '{
"customerId": "tenant_hooli"
}'
Why PacSpace: Both the provider and buyer can check the period from the same proof.
Agent-To-Agent Usage Recordation
Agents can flush reconciled usage totals as part of their normal workflow.
An agent watches webhook events, stores proof fields, derives the running balance, and compares against its own system of record. If a mismatch appears, the agent alerts an operator.
# Agent emits a daily reconciled usage delta
curl -X POST https://app.pacspace.io/api/v1/balance/delta \
-H "X-Api-Key: pk_live_PUBLIC.SECRET" \
-H "Content-Type: application/json" \
-d '{
"customerId": "tenant_hooli",
"delta": -12,
"reason": "daily_usage_flush:2026-02-01",
"referenceId": "usage:tenant_hooli:2026-02-01",
"metadata": {
"agent": "reconciliation-bot",
"source": "metering-pipeline"
}
}'
Why PacSpace: Supervisors can check the record without trusting the agent's internal state.
See also: Autonomous Agent Pattern and the full Agents build guide.