---
title: "Receipts"
url: https://recursiveai.org/oneocr/cookbook/receipts/
description: "Read a till receipt into merchant, date, time, totals, payment method and items, each with the words it was read from."
version: "1.0.0"
---

# Receipts

Read a till receipt into merchant, date, time, totals, payment method and items, each with the words it was read from.

Install `RecursiveAI.OneOcr.Models.Documents` next to `RecursiveAI.OneOcr`, as for [invoices](https://recursiveai.org/oneocr/cookbook/invoices/). The image is `receipt.png` from [the sample images](https://recursiveai.org/oneocr/docs/getting-started/#the-sample-images). This program lists every field and item the model found:

```csharp
using OneImage;
using OneOcr;
using OneOcr.Documents;
using OneOcr.Models.Documents;

OcrEngine engine = OcrEngine.LoadBundled();
DocumentModels.Configure();

Receipt receipt = Image.Load("receipt.png").ExtractReceipt(engine);

foreach (ExtractedField field in receipt.Extraction.Fields)
    Console.WriteLine($"{field.Id,-24} {field.Text,-16} -> {field.Value,-12} {field.Confidence:F2}");
foreach (ExtractedGroup item in receipt.Extraction.LineItems)
    Console.WriteLine("item: " + string.Join(", ", item.Fields.Select(f => $"{f.Id["receipt.".Length..]}={f.Text}")));
```

```text
receipt.merchant         Corner Market    -> Corner Market 0.95
receipt.date             24/10/2026       -> 2026-10-24   1.00
receipt.time             14:32            -> 14:32        1.00
receipt.subtotal         27.22            -> 27.22        1.00
receipt.tax              2.07             -> 2.07         1.00
receipt.total            $ 29.29          -> 29.29        0.81
receipt.paymentMethod    Card **** 4821   -> Card **** 4821 1.00
item: itemName=Coffee beans, amount=12.99
item: quantity=2x, itemName=Oat milk, amount=8.98
item: itemName=Bagels, amount=5.25
```

`Receipt` also has typed shortcuts: `receipt.Merchant`, `Date`, `Time`, `Subtotal`, `Tax`, `Tip`, `Total` and `PaymentMethod`, and `receipt.Items`. The fields are the same `ExtractedField` records as an invoice’s, with `receipt.` ids instead of business terms. `Value` is normalized (`2026-10-24` from `24/10/2026`, `29.29` from `$ 29.29`) and `Text` is what is printed.

The total’s confidence is lower than the rest here (0.81): it is the mean probability of the tags on its words, and a figure to threshold on per field, not a calibrated probability.
