Skip to content

Receipts And Verification

Generate receipts, deliver receipt links, and embed receipt views with your own branding.

Use receipt documents when you want a clear, shareable statement of verified deltas for a customer record.

Typical flow:

  1. Record deltas during the billing window.
  2. Commit a checkpoint for the same window.
  3. Deliver a receipt link (or embed) to your customer.
  4. Verify the proof root when needed.

Core Endpoints

PurposeEndpoint
Scoped receipt generationGET /api/v1/balance/receipt/:customerId
Tenant-authenticated receipt documentGET /api/v1/balance/receipts/:receiptId
Public receipt JSONGET /api/v1/receipt/:receiptId
Public receipt PDFGET /api/v1/receipt/:receiptId.pdf
Public proof verificationGET /api/v1/verify/:proofRoot

For scoped receipt responses, put verifyUrl on invoices and customer emails. Use verificationApiUrl for machine verification. verificationExplorerUrl remains for compatibility.


SDK Example

typescript
const checkpoint = await pac.balance.checkpoint('cust_acme_001', {
  period: '2026-04',
});

const receipts = await pac.balance.receipts.list('cust_acme_001', { limit: 1 });
const receipt = await pac.balance.receipts.get(receipts[0].receiptId, {
  customerDisplayName: true,
  timezone: 'UTC',
});

const invoiceEmailBody = pac.balance.receipts.emailBody(receipt);

Five Embedding Patterns

Add receipt.links.permalink to emails, invoices, or ticket replies.

Store receiptId with your invoice row and render:

text
https://your-app.example.com/invoices/:invoiceId/receipt/:receiptId

3) Iframe Embed (Allowlisted Origin)

Allowlist your app origin in tenant embedOrigins, then embed:

html
<iframe
  src="https://app.pacspace.io/receipt/chk_..."
  style="width:100%;min-height:720px;border:0"
></iframe>

4) Headless Render In Your UI

Fetch GET /api/v1/receipt/:receiptId and render the statement in your own components and brand system.

5) PDF Attachment Workflow

Generate a public PDF URL (/api/v1/receipt/:receiptId.pdf) and attach it to invoice emails or ticket records.


  • View receipt statement: https://app.pacspace.io/receipt/:receiptId
  • Download receipt PDF: https://app.pacspace.io/api/v1/receipt/:receiptId.pdf
  • View in your app: https://app.yourdomain.com/records/:customerId/receipts/:receiptId

Webhook Delivery

Subscribe to receipt.generated so your system can send links or render custom documents when a new receipt is available.

For historical tenants, webhook subscriptions are mirrored to include new Balance events during backfill.