Receipt scanner
Read a selected receipt locally and ask the owner to confirm extracted text.
Documentation revision 1 · Contract reference API 54 · Installed readiness unknown
Preview offline card · Complete HTML interaction body · Machine-readable recipe
What runs where
- Owner-selected gallery image → on-device Latin OCR → controller validates totals/date/currency → HTML confirmation.
- OCR is local. The card can run OCR through Bridgit.act while the controller is offline, but categorizing, deduplicating and storing a ledger need the controller.
Controller integration
- Select the authorized gallery_id, populate the card configuration, save only an owner-confirmed answer.
- Controller owns durable receipt storage and deduplication; respond acknowledges a request, not a saved ledger entry.
Only explicit decision-model/weather requests leave the phone; direct or relay transport still requires a running reachable phone.
Boundaries
- OCR text is not a verified accounting record. This recipe does not pay, submit expenses, or infer a currency.
- gallery_id 42 is a synthetic fixture: substitute the image ID returned by the owner-authorized gallery listing. No camera capture occurs on opening the template.
Lifecycle
start
Configure card data, POST the generated HTML interaction; this does not automatically capture or poll.
update
Owner explicitly refreshes; controller stores approved data and posts a replacement card as needed, cancelling old pending cards.
pause
The Pause button suspends this card’s controls and suppresses results from a pending refresh. There is no background job in this starter; an in-flight capture may finish. Controller integrations must separately pause their jobs.
stop
The Stop button stops this card, suppresses late results, and requests controller shutdown through one response. Confirm/close the controller job and DELETE the interaction separately. Local stop is not proof that an external process stopped.
Failures and costs
- No image/grant/model access: show error, retain previous draft with its timestamp.
- Blurred/empty text: request another owner-selected image; never invent a missing amount.
- OCR has no paid remote inference. An optional controller model has its own costs and privacy boundary.
Complete synthetic contract examples
These fixtures demonstrate contracts. They are not observations from a phone. Replace image/resource IDs with returned authorized IDs. Load request.json as the complete body of POST /v1/interactions; it contains the full offline HTML.
read
{
"id": "read",
"request": {
"method": "POST",
"path": "/v1/ocr",
"body": {
"gallery_id": 42
}
},
"response": {
"status": 200,
"body": {
"text": "CORNER SHOP\n2026-11-04\nTOTAL 12.50 EUR",
"script": "Latin",
"on_device": true
}
},
"evidence": "Synthetic contract fixture, not a device observation."
}
Extensions
- Add barcode recognition to match products.
- Capture a receipt with POST /v1/camera/snapshot, then pass its returned data_base64 to /v1/ocr.