Snaptab Snaptab Developers

Build on the Digital Receipt Network.

Every company can send a receipt. Every customer owns their receipts. Receipts live forever, and privacy comes first. This page documents what is live in production today — and exactly what is coming next.

Looking for the merchant dashboard instead? → See Snaptab for Business

01 · Vision

Overview

Paper receipts fade, get lost, and lock purchase history inside merchants' silos. The Digital Receipt Network flips that model:

  • Every company can send a receipt — from a corner shop to a global chain, delivering a structured digital receipt should be as easy as one API call.
  • Every customer owns their receipts — purchase records belong to the person who paid, not the merchant and not us. Export, share, or delete — always.
  • Receipts live forever — a receipt is a durable, structured document: proof of purchase, warranty anchor, tax record.
  • Privacy first — the Snaptab app is offline-first with no account required; everything that touches the network is explicit and opt-in, and data is never sold.

The Snaptab mobile app (iOS & Android) is the first client on the network. The app is one client; the platform is the product.

02 · Share pipeline

How it works today Live today

Sharing is already running in production. The pipeline is deliberately minimal:

  1. User shares a bill in the app. Sharing is opt-in per bill and requires a free account. Nothing is ever uploaded automatically.
  2. A minimal receipt payload is published to Firestore under an unguessable 128-bit random token: title, amount, currency, category, date, location label and note. Never photos, GPS coordinates, or raw OCR text.
  3. Anyone with the link or QR code opens https://snaptab.glitchfy.com/r/{token} in any browser — no app, no account, no login to view.
  4. The owner can revoke instantly. Deleting the share removes the document and the link stops resolving.

Public receipt payload — the entire shared document

{
  "title":    "Team dinner",
  "merchant": "Seaside Grill",
  "amount":   5782.00,
  "currency": "LKR",
  "category": "Dining",
  "billDate": 1753747200000,
  "location": "Colombo",
  "note":     "Split four ways",
  "createdAt": "2026-07-29T09:41:00Z",
  "revoked":  false
}

That is the complete surface area of a share. Fields you leave empty are simply absent, and revoked: true makes the viewer treat the receipt as gone.

03 · Public viewer

Receipt viewer Live today

Every share resolves to a standalone viewer at /r/{token}. It is a single dependency-free HTML page:

  • Printable — a dedicated print stylesheet renders a clean paper receipt.
  • Downloadable — one tap exports the receipt as JSON, so recipients keep a structured copy.
  • Dark-mode aware — follows the viewer's system preference.
  • No tracking — no analytics, no cookies, no third-party scripts. The only network request is the receipt fetch itself.

Revoked, expired, or mistyped links get a friendly not-found state — never an error dump.

04 · Intelligence

AI & OCR Live today · on-device

On-device, by default

  • OCR — receipt scanning runs on-device with ML Kit text recognition. Images and extracted text never leave the phone.
  • Insight chat — a real language model (Qwen 2.5 1.5B) runs fully offline on the device, grounded in the user's actual bills.

Optional self-hosted cloud OCR Opt-in

For harder receipts, Snaptab can call a self-hosted OCR model: baidu/Unlimited-OCR served through a vLLM OpenAI-compatible endpoint. It is strictly opt-in, and because it is self-hosted, receipt images never touch a third-party OCR SaaS. Smoke-test a deployment with:

curl — vLLM OpenAI-compatible endpoint

curl {endpoint}/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "baidu/Unlimited-OCR",
    "messages": [{
      "role": "user",
      "content": [
        { "type": "image_url",
          "image_url": { "url": "data:image/jpeg;base64,<RECEIPT_IMAGE>" } },
        { "type": "text", "text": "Free OCR." }
      ]
    }]
  }'

05 · Bills API

Bills API v1 Shipping shortly

Built and tested, not yet switched on. Everything documented below is implemented and covered by tests — but the endpoints are not serving public traffic yet. Want in on the first wave? Ask for early access and we will send you credentials the day it opens.

Send a bill to a customer from any system — your POS, your backend, a spreadsheet script, or an AI agent. Every bill comes back with a share URL and a 128-bit capability token you can render as a QR code. Base URL: https://api.snaptab.glitchfy.com

1 · Get a client

Sign in to the merchant dashboard and create an API client under API access. You get a client_id and a client_secret. The secret is stored only as a scrypt hash, so it is shown once and never again — if you lose it, revoke the client and make another.

2 · Exchange it for a token

Standard OAuth 2.0 client credentials grant (RFC 6749 §4.4). Tokens are bearer tokens valid for one hour. Both client_secret_post and HTTP Basic are accepted.

POST /oauth/token

curl -X POST https://api.snaptab.glitchfy.com/oauth/token \
  -d grant_type=client_credentials \
  -d client_id=stc_9f2a71c4d0e8b3a6 \
  -d client_secret=sts_… \
  -d scope="bills:write bills:read"

{
  "access_token": "eyJhbGciOiJIUzI1NiIs…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "bills:write bills:read"
}

3 · Send a bill

Only title and amount are required. Everything else is optional and simply enriches the receipt.

POST /api/v1/bills

curl -X POST https://api.snaptab.glitchfy.com/api/v1/bills \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Invoice 2291 — winter order",
    "amount": 128.40,
    "currency": "EUR",
    "category": "shopping",
    "recipientEmail": "customer@example.com",
    "reference": "INV-2291",
    "dueDate": "2026-08-28",
    "lineItems": [
      { "description": "Linen shirt — medium", "quantity": 2, "unitPrice": 45.00 },
      { "description": "Cotton scarf", "quantity": 1, "unitPrice": 18.40 }
    ],
    "subtotal": 110.00, "tax": 13.20, "tip": 10.20, "discount": 5.00,
    "paymentMethod": "card",
    "location": { "name": "Galle Rd branch", "address": "221 Galle Rd, Colombo 04" },
    "terms": "Payable within 14 days.",
    "metadata": { "pos_terminal": "T-04" }
  }'

{
  "token": "9f2a71c4d0e8b3a61b4c88e2a5f70d19",
  "url": "https://snaptab.glitchfy.com/b/9f2a71c4d0e8b3a61b4c88e2a5f70d19",
  "status": "sent",
  "createdAt": "2026-08-14T09:12:44.108Z",
  "expiresAt": "2026-09-13T09:12:44.108Z"
}

4 · Or send up to 500 at once

POST /api/v1/bills/batch takes {"bills": [ … ]} with at most 500 entries. Each entry is validated independently and reported at the same index, so one bad row never sinks the run: you get 201 when all succeeded and 207 when some did not. Valid bills commit in a single atomic write.

{
  "created": 499,
  "failed": 1,
  "results": [
    { "index": 0, "ok": true, "token": "…", "url": "https://snaptab.glitchfy.com/b/…" },
    { "index": 1, "ok": false, "error": "invalid_request",
      "error_description": "amount is required", "field": "amount" }
  ]
}

Endpoints

  • POST /oauth/token exchange client credentials for a bearer token
  • POST /api/v1/bills send one bill · bills:write
  • POST /api/v1/bills/batch send up to 500 · bills:write
  • GET /api/v1/bills list what you have sent · bills:read
  • GET /api/v1/bills/{token} read one bill and its status · bills:read
  • POST /api/v1/bills/{token}/revoke close the link early · bills:write
  • GET /api/openapi.json machine-readable OpenAPI 3.1 spec

Optional fields

All optional. Unknown fields are ignored; invalid ones return 400 naming the offending field.

  • currency
  • category
  • billDate
  • dueDate
  • recipientEmail
  • recipientPhone
  • note
  • terms
  • reference
  • externalId
  • subtotal
  • tax
  • tip
  • discount
  • paymentMethod
  • location
  • lineItems
  • metadata

Bills expire after 30 days

Every bill lives for exactly 30 days. The window is fixed at creation, is not extendable, and is enforced in three places: the API reports the bill as expired, the viewer at /b/{token} shows an expiry screen instead of the amount, and a daily sweep deletes the document outright. The countdown is printed on the bill your customer sees — "This bill stays open until 13 September 2026 — 30 days left."

Plan for it: if you need a record beyond 30 days, keep your own copy and reference it with externalId. Snaptab is the delivery channel, not your archive.

Status values

  • sent delivered, waiting to be opened
  • claimed the recipient added it to their Snaptab
  • dismissed the recipient declined it
  • revoked you closed the link early
  • expired past its 30-day window

Errors

OAuth-style bodies throughout: { "error", "error_description", "field" }. 401 invalid or expired token · 403 missing scope · 400 validation · 404 no such bill (a bill belonging to another business is reported absent, never forbidden, so the token space stays unprobeable) · 409 already claimed.

For AI agents

The API is self-describing so an agent can find and use it without being hand-fed a schema:

  • GET /api/openapi.json OpenAPI 3.1, written for a model to read
  • GET /.well-known/ai-plugin.json plugin manifest pointing at the spec
  • GET /.well-known/oauth-authorization-server RFC 8414 auth metadata

An agent given a client_id and client_secret can discover the token endpoint, mint a token, read the schema and send bills with no further integration work. Generating a few hundred bills in one batch call is an ordinary use of this API, not an abuse of it.

A first-party MCP server wrapping these endpoints is the next step — see MCP server below.

06 · Platform API

Richer receipts Coming soon · Phase 2

The REST API that lets any business issue receipts on the network. This is a preview of the planned v1 surface — names may shift before launch, and the base URL will be announced with Phase 2.

  • POST /v1/receipts create a receipt (and optionally deliver it)
  • GET /v1/receipts/{id} retrieve a receipt
  • POST /v1/receipt-links mint a share link / QR for a receipt
  • POST /v1/refunds attach a full or partial refund
  • POST /v1/customers register a customer identifier for delivery
  • POST /v1/webhooks subscribe to events
  • POST /v1/verify verify a receipt's signature hash

The receipt object

Designed to outlive the purchase: line items carry warranty and serial numbers, totals carry tax lines, and every receipt can be signed and verified.

Planned receipt object

{
  "id": "rcpt_9f2c1e7a4b",
  "merchant": {
    "id": "mer_seaside_grill",
    "name": "Seaside Grill",
    "tax_id": "LK-99887766",
    "location": "12 Marine Drive, Colombo"
  },
  "customer": {
    "email": "ayesha@example.com",
    "phone": null,
    "snaptab_id": "usr_k3n9…"
  },
  "items": [
    {
      "sku": "GRL-042",
      "name": "Grilled prawns",
      "qty": 2,
      "unit_price": 2450.00,
      "warranty": null,
      "serial": null
    },
    {
      "sku": "APP-011",
      "name": "Bluetooth speaker",
      "qty": 1,
      "unit_price": 8900.00,
      "warranty": { "months": 24, "expires_at": "2028-07-29" },
      "serial": "SPK-77219-A"
    }
  ],
  "totals": {
    "subtotal": 13800.00,
    "tax_lines": [
      { "name": "VAT 18%", "amount": 2484.00 }
    ],
    "total": 16284.00,
    "currency": "LKR"
  },
  "payments": [
    { "method": "card", "brand": "visa", "last4": "4242", "amount": 16284.00 }
  ],
  "refunds": [],
  "issued_at": "2026-07-29T13:05:12Z",
  "signature": "sha256:7c1e0b…"
}

The 15-minute integration

One authenticated call creates the receipt and delivers it to the customer's Snaptab inbox (falling back to a share link when they're not on the network yet):

curl — create & deliver a receipt (planned)

curl https://api.snaptab.glitchfy.com/v1/receipts \
  -H "Authorization: Bearer sk_live_…" \
  -H "Idempotency-Key: order-10245" \
  -H "Content-Type: application/json" \
  -d '{
    "customer": { "email": "ayesha@example.com" },
    "items": [
      { "name": "Bluetooth speaker", "qty": 1, "unit_price": 8900.00,
        "warranty": { "months": 24 }, "serial": "SPK-77219-A" }
    ],
    "totals": { "subtotal": 8900.00,
                "tax_lines": [{ "name": "VAT 18%", "amount": 1602.00 }],
                "total": 10502.00, "currency": "LKR" },
    "payments": [{ "method": "card", "last4": "4242", "amount": 10502.00 }],
    "deliver": true
  }'
The API is not yet publicly available. Endpoints, the base URL and payloads above are a design preview and may change before launch. Request early access to help shape v1.

07 · Events

Webhooks Coming soon

Subscribe once with POST /v1/webhooks and receive signed events as receipts move through their lifecycle:

  • receipt.created
  • receipt.delivered
  • receipt.viewed
  • receipt.refunded
  • receipt.revoked
  • link.created
  • link.revoked
  • customer.created

Deliveries will be HMAC-signed so your servers can verify each event's origin (see Security & privacy).

08 · AI agents

MCP server Coming soon · Phase 5

MCP — the Model Context Protocol — is an open standard that lets AI assistants such as Claude connect to external tools and data sources. An official Snaptab MCP server will let AI agents use the receipt network as a first-class tool: your assistant will be able to file an expense, check a warranty, or pull last quarter's receipts on your behalf — with your permission, against your own data.

Planned capabilities:

  • generate_receipt
  • retrieve_receipt
  • verify_receipt
  • search_receipts
  • export_receipts
  • generate_pdf

09 · Ecosystem

SDKs & plugins Coming soon

Planned SDKs

  • Node / TypeScript
  • Python
  • Java / Kotlin
  • Swift
  • .NET
  • PHP
  • Go
  • Ruby
  • Flutter
  • React Native

Planned commerce plugins

Drop-in receipt delivery for the platforms merchants already use:

  • Shopify
  • WooCommerce
  • Magento
  • Stripe
  • Square
  • Toast
  • Lightspeed
  • …and more

Want an SDK or plugin prioritised? Tell us what you'd build.

10 · Trust

Security & privacy

Live today In production

  • Token-capability links — a share is reachable only by its unguessable 128-bit token. Documents are get-only by exact ID; there is no list or enumeration path.
  • Owner-only writes — security rules allow only the authenticated owner to create, update, or delete their shares. Public access is read-only.
  • Instant revocation — deleting a share removes the document; the link dies immediately.
  • Minimal payloads — only the fields shown in the share pipeline are ever published. Photos, GPS coordinates and raw OCR text never leave the device.
  • No data selling, ever — no ads, no tracking, no analytics on shared receipts.
  • GDPR / CCPA-ready posture — offline-first by default, explicit opt-in for any cloud storage, user-initiated deletion of shares and accounts, and a documented data-deletion path.

Planned With the API

  • Receipt signatures — issuer-signed hashes with POST /v1/verify, so any party can prove a receipt is genuine and unaltered.
  • OAuth2 for merchant applications, scoped API keys for servers.
  • HMAC-signed webhooks and idempotency keys on all mutating endpoints.

11 · Where this goes

Roadmap

  1. 1
    Foundation

    Offline-first app, on-device OCR + AI, share links & QR codes, public receipt viewer, instant revocation.

    Live
  2. 2
    Developer platform

    Platform API v1, API keys, webhooks, sandbox environment, first SDKs.

    Next
  3. 3
    Merchant platform

    Commerce & POS plugins, merchant dashboard, receipt delivery at checkout.

    Planned
  4. 4
    Global network

    A customer-owned receipt inbox across every merchant, cross-border currencies, warranties and returns built on receipts.

    Planned
  5. 5
    Open standard

    The receipt schema and verification published as an open specification, plus the official Snaptab MCP server for AI agents.

    Planned

12 · Get involved

Contact & early access

Building a store, a POS, an accounting tool, or an AI agent that should speak receipts? We're onboarding early merchants and developers now — early partners get direct input on the v1 API.