Receipt OCR Java

The java client library supports the receipt API for extracting data from receipts.

Using this sample receipt below, we are going to illustrate how to extract the data that we want using the client library.
sample receiptsample receipt

Quick Start

// Init a new client
Client mindeeClient = new Client("<YOUR_MINDEE_API_KEY>");

// Load a file from disk and parse it
ReceiptResponse receiptResponse = mindeeClient.loadDocument("./a74eaa5-c8e283b-sample_receipt.jpeg").parse(ReceiptResponse.class);

// Print a summary of the parsed data;


-----Receipt data-----
Total amount including taxes: 10.2
Total amount excluding taxes: 8.5
Date: 2016-02-26
Category: food
Time: 15:20
Merchant name: CLACHAN
Taxes: 1.7 20.0%
Total taxes: 1.7
Locale: en-GB; en; GB; GBP;

Extracted Fields

Attributes that will be extracted from the document and available in the ReceiptResponse object:

Receipt Information


  • categoryof type Field : Receipt category as seen on the receipt.
    The following categories are supported: toll, food, parking, transport, accommodation, gasoline, miscellaneous.;


  • date of type Date : The date the receipt was issued
LocalDate receiptDate = receiptResponse.getReceipt().getDate().getValue();


  • time of type Time : The time the receipt was issued
LocalTime receiptTime = receiptResponse.getReceipt().getTime().getValue();


Supplier Information

Merchant Name

  • merchantName of type Field : Supplier name as written in the receipt.;

Taxes and Amounts


A list of the taxes seen on the receipt

  • taxes of type List < Tax >

Total Tax

The total tax for the receipt;

Total Including Taxes

The total amount including taxes for the receipt;

Total Excluding Taxes

The total amount excluding taxes for the receipt;


Slack Logo IconSlack Logo Icon  Join our Slack

Did this page help you?