Skip to content

Getting Started

What You Can Build

From SaaS billing to AI agent audit trails — see what developers are building with PacSpace.

PacSpace Balance API handles the hard part of any financial integration: making sure both sides agree on the numbers. Here are the patterns developers are using today.

SaaS Usage Metering

Track consumption in real time and bill with confidence.

Every time a customer makes an API call, processes a document, or uses a compute minute, emit a delta. At billing time, derive the balance to generate an invoice that reflects exactly what was consumed — no estimation, no reconciliation scripts.

bash
# Customer uses 50 compute-minutes
curl -X POST https://balance-api.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": "compute-minutes",
    "referenceId": "inv-2026-02-001",
    "metadata": { "plan": "growth", "resource": "gpu-hours" }
  }'

# At billing time, derive the balance
curl https://balance-api.pacspace.io/api/v1/balance/derive/customer_acme \
  -H "X-Api-Key: pk_live_PUBLIC.SECRET"

Why PacSpace: Your customer can independently verify their usage matches your records. Billing disputes drop to near zero.


Marketplace Settlement

In any marketplace, the buyer and the seller each have their own view of a transaction. PacSpace lets both sides emit their view and then verify agreement automatically.

bash
# Seller records the sale
curl -X POST https://balance-api.pacspace.io/api/v1/balance/delta \
  -H "X-Api-Key: pk_live_SELLER_KEY.SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "order_8842",
    "delta": 150.00,
    "reason": "order-fulfilled",
    "referenceId": "ord-8842"
  }'

# Buyer records the purchase
curl -X POST https://balance-api.pacspace.io/api/v1/balance/delta \
  -H "X-Api-Key: pk_live_BUYER_KEY.SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "order_8842",
    "delta": -150.00,
    "reason": "order-purchased",
    "referenceId": "ord-8842"
  }'

# Verify both sides agree
curl -X POST https://balance-api.pacspace.io/api/v1/balance/compare \
  -H "X-Api-Key: pk_live_PUBLIC.SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "yourBalance": 150.00,
    "theirBalance": 150.00,
    "startingBalance": 0
  }'

Why PacSpace: Settlement disputes are caught at transaction time, not at month-end reconciliation.


AI Agent Audit Trails

Autonomous AI agents that make purchases, allocate budgets, or transfer value need an auditable trail. PacSpace gives supervisors a verifiable record of every financial action an agent takes.

bash
# Agent emits a delta when it allocates budget
curl -X POST https://balance-api.pacspace.io/api/v1/balance/delta \
  -H "X-Api-Key: pk_live_PUBLIC.SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "agent_procurement_01",
    "delta": -2500.00,
    "reason": "vendor-payment",
    "referenceId": "po-99412",
    "metadata": {
      "agent": "procurement-bot",
      "vendor": "cloud-provider-x",
      "approved_by": "policy-engine-v3"
    }
  }'

Why PacSpace: Every agent action is immutably recorded. Supervisors can derive the current balance at any time and verify it against expected values — no need to trust the agent's internal state.


Financial Reconciliation

Replace spreadsheet-based reconciliation with real-time, automated verification. Instead of exporting CSVs, matching rows, and flagging exceptions manually, both parties emit deltas and PacSpace identifies discrepancies instantly.

The old way:

  1. Export transactions to CSV
  2. Send file to counterparty
  3. They compare against their records
  4. Manually flag and investigate mismatches
  5. Repeat next month

The PacSpace way:

  1. Both parties emit deltas as transactions happen
  2. Either party calls compare at any time
  3. Discrepancies surface immediately with the exact delta that diverges

Why PacSpace: Reconciliation moves from a monthly batch process to a continuous, real-time check. Problems are caught in minutes, not weeks.


Subscription Billing

Track consumption throughout a billing period, checkpoint at period-end, and produce invoices that both you and your customer can independently verify.

bash
# Throughout the month — emit deltas as usage occurs
curl -X POST https://balance-api.pacspace.io/api/v1/balance/delta \
  -H "X-Api-Key: pk_live_PUBLIC.SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "customerId": "tenant_hooli",
    "delta": -1,
    "reason": "api-call",
    "referenceId": "req-a1b2c3",
    "metadata": { "endpoint": "/v2/search", "plan": "starter" }
  }'

# At period-end — derive the final balance
curl https://balance-api.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://balance-api.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
  }'

Why PacSpace: Your customer never has to wonder if the invoice is accurate. They can verify it themselves with a single API call.


What These Patterns Have in Common

Every use case follows the same three-step flow:

  1. Emit — record what happened as a signed delta
  2. Query — derive the current state from the delta log
  3. Verify — confirm both parties agree

If your application involves money moving, usage accruing, or any two parties that need to agree on a number, PacSpace handles the hard part.

Ready to build? Start with the Quick Start Guide →.

Was this page helpful?

Last updated February 11, 2026