Middleware Verified Records
Headless verified-record resources for billing middleware integrations.
Billing middleware can use PacSpace verified-record resources without sending users into the PacSpace dashboard. The middleware keeps its own customer experience while PacSpace supplies the recorded evidence.
These resources are available only to tenants configured as billing middleware. Direct inference vendors use the standard Balance API and cannot call /api/v1/middleware/*.
Base URL: https://app.pacspace.io
GET https://app.pacspace.io/api/v1/middleware/vendors/:vendorId/customers/:externalCustomerId/record
Required header: X-Api-Key: pk_live_PUBLIC.SECRET.
Core Resources
| Resource | Method | Purpose |
|---|---|---|
/api/v1/middleware/readiness | GET | Invoice readiness rows and blockers |
/api/v1/middleware/customers/:customerId/live | GET | Current Shared Record state |
/api/v1/middleware/customers/:customerId/periods | GET | Closed periods |
/api/v1/middleware/customers/:customerId/periods/:checkpointId | GET | Period detail |
/api/v1/middleware/customers/:customerId/close-package | GET | Finance Close Package |
/api/v1/middleware/customers/:customerId/access-link | GET | Link, host, policy, and access-code readiness |
/api/v1/middleware/customers/:customerId/compare | POST | Compare two periods/checkpoints |
/api/v1/middleware/customers/:customerId/export | GET | JSON, CSV, PDF, or bundle export |
Vendor Accounts
Middleware tenants must create vendor accounts in Setup before producing records. The vendorAccountId is required on Balance API emits and checkpoint commits for middleware tenants, forbidden for direct-inference tenants, and scoped to one vendor account per submission group or checkpoint.
Customer-facing receipt and Shared Record identity resolves to the vendor account:
{
"tenant": {
"name": "Acme Inference"
},
"recordedBy": {
"type": "middleware_vendor_account",
"id": "cmw_vendor_123",
"displayName": "Acme Inference"
}
}
The middleware parent tenant name is not serialized in buyer-facing record payloads for middleware-produced records.
Webhooks
Relevant webhook events include:
customer.shared_record_viewedcustomer.export_downloadedcustomer.compare_run
See Webhook Event Types for delivery and retry behavior.