Document Intelligence receipt model
This content applies to: v2.1
The Document Intelligence receipt model combines powerful Optical Character Recognition (OCR) capabilities with deep learning models to analyze and extract key information from sales receipts. Receipts can be of various formats and quality including printed and handwritten receipts. The API extracts key information such as merchant name, merchant phone number, transaction date, tax, and transaction total and returns structured JSON data.
Supported receipt types:
- Thermal
- Credit Card
- Gas
- Parking
- Hotel
- Transportation
- Communication
- Entertainment
- Flight
- Training
- Pharmacy/Medical
Receipt data extraction
Receipt digitization encompasses the transformation of various types of receipts, including scanned, photographed, and printed copies, into a digital format for streamlined downstream processing. Examples include expense management, consumer behavior analysis, tax automation, etc. Using Document Intelligence with OCR (Optical Character Recognition) technology can extract and interpret data from these diverse receipt formats. Document Intelligence processing simplifies the conversion process but also significantly reduces the time and effort required, thus facilitating efficient data management, and retrieval.
Sample receipt processed with Document Intelligence Studio:
Sample receipt processed with Document Intelligence Sample Labeling tool:
Development options
Document Intelligence v3.1 supports the following tools, applications, and libraries:
Feature | Resources | Model ID |
---|---|---|
Receipt model | • Document Intelligence Studio • REST API • C# SDK • Python SDK • Java SDK • JavaScript SDK |
prebuilt-receipt |
Document Intelligence v3.0 supports the following tools, applications, and libraries:
Feature | Resources | Model ID |
---|---|---|
Receipt model | • Document Intelligence Studio • REST API • C# SDK • Python SDK • Java SDK • JavaScript SDK |
prebuilt-receipt |
Document Intelligence v2.1 supports the following tools, applications, and libraries:
Feature | Resources |
---|---|
Receipt model | • Document Intelligence labeling tool • REST API • Client-library SDK • Document Intelligence Docker container |
Input requirements
Supported file formats:
Model PDF Image: JPEG/JPG
,PNG
,BMP
,TIFF
,HEIF
Microsoft Office:
Word (DOCX
), Excel (XLSX
), PowerPoint (PPTX
), HTMLRead ✔ ✔ ✔ Layout ✔ ✔ ✔ (2024-07-31-preview, 2024-02-29-preview, 2023-10-31-preview) General Document ✔ ✔ Prebuilt ✔ ✔ Custom extraction ✔ ✔ Custom classification ✔ ✔ ✔ (2024-07-31-preview, 2024-02-29-preview) For best results, provide one clear photo or high-quality scan per document.
For PDF and TIFF, up to 2,000 pages can be processed (with a free tier subscription, only the first two pages are processed).
The file size for analyzing documents is 500 MB for paid (S0) tier and
4
MB for free (F0) tier.Image dimensions must be between 50 pixels x 50 pixels and 10,000 pixels x 10,000 pixels.
If your PDFs are password-locked, you must remove the lock before submission.
The minimum height of the text to be extracted is 12 pixels for a 1024 x 768 pixel image. This dimension corresponds to about
8
point text at 150 dots per inch (DPI).For custom model training, the maximum number of pages for training data is 500 for the custom template model and 50,000 for the custom neural model.
For custom extraction model training, the total size of training data is 50 MB for template model and
1
GB for the neural model.For custom classification model training, the total size of training data is
1
GB with a maximum of 10,000 pages. For 2024-07-31-preview and later, the total size of training data is2
GB with a maximum of 10,000 pages.
- Supported file formats: JPEG, PNG, PDF, and TIFF.
- Supported page allowance for PDF and TIFF: Document Intelligence can process up to 2,000 pages for standard tier subscribers or only the first two pages for free-tier subscribers.
- Supported file size: less than 50 MB; minimum pixels 50 x 50 px; maximum pixels 10,000 x 10,000 px.
Receipt model data extraction
See how Document Intelligence extracts data, including time and date of transactions, merchant information, and amount totals from receipts. You need the following resources:
An Azure subscription—you can create one for trial
A Document Intelligence instance in the Azure portal. You can use the free pricing tier (
F0
) to try the service. After your resource deploys, select Go to resource to get your key and endpoint.
Note
Document Intelligence Studio is available with v3.1 and v3.0 APIs and later versions.
On the Document Intelligence Studio home page, select Receipts.
You can analyze the sample receipt or upload your own files.
Select the Run analysis button and, if necessary, configure the Analyze options:
Document Intelligence Sample Labeling tool
Navigate to the Document Intelligence Sample Tool.
On the sample tool home page, select the Use prebuilt model to get data tile.
Select the Form Type to analyze from the dropdown menu.
Choose a URL for the file you would like to analyze from the below options:
In the Source field, select URL from the dropdown menu, paste the selected URL, and select the Fetch button.
In the Document Intelligence service endpoint field, paste the endpoint that you obtained with your Document Intelligence subscription.
In the key field, paste the key you obtained from your Document Intelligence resource.
Select Run analysis. The Document Intelligence Sample Labeling tool calls the Analyze Prebuilt API and analyze the document.
View the results - see the key-value pairs extracted, line items, highlighted text extracted, and tables detected.
Note
The Sample Labeling tool does not support the BMP file format. This is a limitation of the tool not the Document Intelligence Service.
Supported languages and locales
See our Language Support—prebuilt models page for a complete list of supported languages.
Field extraction
Name | Type | Description | Standardized output |
---|---|---|---|
ReceiptType | String | Type of sales receipt | Itemized |
MerchantName | String | Name of the merchant issuing the receipt | |
MerchantPhoneNumber | phoneNumber | Listed phone number of merchant | +1 xxx xxx xxxx |
MerchantAddress | String | Listed address of merchant | |
TransactionDate | Date | Date the receipt was issued | yyyy-mm-dd |
TransactionTime | Time | Time the receipt was issued | hh-mm-ss (24-hour) |
Total | Number (USD) | Full transaction total of receipt | Two-decimal float |
Subtotal | Number (USD) | Subtotal of receipt, often before taxes are applied | Two-decimal float |
Tax | Number (USD) | Total tax on receipt (often sales tax, or equivalent). Renamed to "TotalTax" in 2022-06-30 version. | Two-decimal float |
Tip | Number (USD) | Tip included by buyer | Two-decimal float |
Items | Array of objects | Extracted line items, with name, quantity, unit price, and total price extracted | |
Name | String | Item description. Renamed to "Description" in 2022-06-30 version. | |
Quantity | Number | Quantity of each item | Two-decimal float |
Price | Number | Individual price of each item unit | Two-decimal float |
TotalPrice | Number | Total price of line item | Two-decimal float |
Document Intelligence v3.0 and later versions introduce several new features and capabilities. In addition to thermal receipts, the Receipt model supports single-page hotel receipt processing and tax detail extraction for all receipt types.
Receipt
Field | Type | Description | Example |
---|---|---|---|
MerchantName |
string |
Name of the merchant issuing the receipt | Contoso |
MerchantPhoneNumber |
phoneNumber |
Listed phone number of merchant | 987-654-3210 |
MerchantAddress |
address |
Listed address of merchant | 123 Main St. Redmond, Washington 98052 |
Total |
number |
Full transaction total of receipt | $14.34 |
TransactionDate |
date |
Date the receipt was issued | June 06, 2019 |
TransactionTime |
time |
Time the receipt was issued | 4:49 PM |
Subtotal |
number |
Subtotal of receipt, often before taxes are applied | $12.34 |
TotalTax |
number |
Tax on receipt, often sales tax, or equivalent | $2.00 |
Tip |
number |
Tip included by buyer | $1.00 |
Items |
array |
||
Items.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
Items.*.TotalPrice |
number |
Total price of line item | $999.00 |
Items.*.Description |
string |
Item description | Surface Pro 6 |
Items.*.Quantity |
number |
Quantity of each item | 1 |
Items.*.Price |
number |
Individual price of each item unit | $999.00 |
Items.*.ProductCode |
string |
Product code, product number, or SKU associated with the specific line item | A123 |
Items.*.QuantityUnit |
string |
Quantity unit of each item | |
TaxDetails |
array |
||
TaxDetails.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
TaxDetails.*.Amount |
currency |
The amount of the tax detail | $999.00 |
receipt.retailMeal
Field | Type | Description | Example |
---|---|---|---|
MerchantName |
string |
Name of the merchant issuing the receipt | Contoso |
MerchantPhoneNumber |
phoneNumber |
Listed phone number of merchant | 987-654-3210 |
MerchantAddress |
address |
Listed address of merchant | 123 Main St. Redmond, Washington 98052 |
Total |
number |
Full transaction total of receipt | $14.34 |
TransactionDate |
date |
Date the receipt was issued | June 06, 2019 |
TransactionTime |
time |
Time the receipt was issued | 4:49 PM |
Subtotal |
number |
Subtotal of receipt, often before taxes are applied | $12.34 |
TotalTax |
number |
Tax on receipt, often sales tax, or equivalent | $2.00 |
Tip |
number |
Tip included by buyer | $1.00 |
Items |
array |
||
Items.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
Items.*.TotalPrice |
number |
Total price of line item | $999.00 |
Items.*.Description |
string |
Item description | Surface Pro 6 |
Items.*.Quantity |
number |
Quantity of each item | 1 |
Items.*.Price |
number |
Individual price of each item unit | $999.00 |
Items.*.ProductCode |
string |
Product code, product number, or SKU associated with the specific line item | A123 |
Items.*.QuantityUnit |
string |
Quantity unit of each item | |
TaxDetails |
array |
||
TaxDetails.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
TaxDetails.*.Amount |
currency |
The amount of the tax detail | $999.00 |
receipt.creditCard
Field | Type | Description | Example |
---|---|---|---|
MerchantName |
string |
Name of the merchant issuing the receipt | Contoso |
MerchantPhoneNumber |
phoneNumber |
Listed phone number of merchant | 987-654-3210 |
MerchantAddress |
address |
Listed address of merchant | 123 Main St. Redmond, Washington 98052 |
Total |
number |
Full transaction total of receipt | $14.34 |
TransactionDate |
date |
Date the receipt was issued | June 06, 2019 |
TransactionTime |
time |
Time the receipt was issued | 4:49 PM |
Subtotal |
number |
Subtotal of receipt, often before taxes are applied | $12.34 |
TotalTax |
number |
Tax on receipt, often sales tax, or equivalent | $2.00 |
Tip |
number |
Tip included by buyer | $1.00 |
Items |
array |
||
Items.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
Items.*.TotalPrice |
number |
Total price of line item | $999.00 |
Items.*.Description |
string |
Item description | Surface Pro 6 |
Items.*.Quantity |
number |
Quantity of each item | 1 |
Items.*.Price |
number |
Individual price of each item unit | $999.00 |
Items.*.ProductCode |
string |
Product code, product number, or SKU associated with the specific line item | A123 |
Items.*.QuantityUnit |
string |
Quantity unit of each item | |
TaxDetails |
array |
||
TaxDetails.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
TaxDetails.*.Amount |
currency |
The amount of the tax detail | $999.00 |
receipt.gas
Field | Type | Description | Example |
---|---|---|---|
MerchantName |
string |
Name of the merchant issuing the receipt | Contoso |
MerchantPhoneNumber |
phoneNumber |
Listed phone number of merchant | 987-654-3210 |
MerchantAddress |
address |
Listed address of merchant | 123 Main St. Redmond, Washington 98052 |
Total |
number |
Full transaction total of receipt | $14.34 |
TransactionDate |
date |
Date the receipt was issued | June 06, 2019 |
TransactionTime |
time |
Time the receipt was issued | 4:49 PM |
Subtotal |
number |
Subtotal of receipt, often before taxes are applied | $12.34 |
TotalTax |
number |
Tax on receipt, often sales tax, or equivalent | $2.00 |
Tip |
number |
Tip included by buyer | $1.00 |
Items |
array |
||
Items.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
Items.*.TotalPrice |
number |
Total price of line item | $999.00 |
Items.*.Description |
string |
Item description | Surface Pro 6 |
Items.*.Quantity |
number |
Quantity of each item | 1 |
Items.*.Price |
number |
Individual price of each item unit | $999.00 |
Items.*.ProductCode |
string |
Product code, product number, or SKU associated with the specific line item | A123 |
Items.*.QuantityUnit |
string |
Quantity unit of each item | |
TaxDetails |
array |
||
TaxDetails.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
TaxDetails.*.Amount |
currency |
The amount of the tax detail | $999.00 |
receipt.parking
Field | Type | Description | Example |
---|---|---|---|
MerchantName |
string |
Name of the merchant issuing the receipt | Contoso |
MerchantPhoneNumber |
phoneNumber |
Listed phone number of merchant | 987-654-3210 |
MerchantAddress |
address |
Listed address of merchant | 123 Main St. Redmond, Washington 98052 |
Total |
number |
Full transaction total of receipt | $14.34 |
TransactionDate |
date |
Date the receipt was issued | June 06, 2019 |
TransactionTime |
time |
Time the receipt was issued | 4:49 PM |
Subtotal |
number |
Subtotal of receipt, often before taxes are applied | $12.34 |
TotalTax |
number |
Tax on receipt, often sales tax, or equivalent | $2.00 |
Tip |
number |
Tip included by buyer | $1.00 |
Items |
array |
||
Items.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
Items.*.TotalPrice |
number |
Total price of line item | $999.00 |
Items.*.Description |
string |
Item description | Surface Pro 6 |
Items.*.Quantity |
number |
Quantity of each item | 1 |
Items.*.Price |
number |
Individual price of each item unit | $999.00 |
Items.*.ProductCode |
string |
Product code, product number, or SKU associated with the specific line item | A123 |
Items.*.QuantityUnit |
string |
Quantity unit of each item | |
TaxDetails |
array |
||
TaxDetails.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
TaxDetails.*.Amount |
currency |
The amount of the tax detail | $999.00 |
receipt.hotel
Field | Type | Description | Example |
---|---|---|---|
MerchantName |
string |
Name of the merchant issuing the receipt | Contoso |
MerchantPhoneNumber |
phoneNumber |
Listed phone number of merchant | 987-654-310 |
MerchantAddress |
address |
Listed address of merchant | 123 Main St. Redmond, Washington 98052 |
Total |
number |
Full transaction total of receipt | $14.34 |
ArrivalDate |
date |
Date of arrival | 27Mar21 |
DepartureDate |
date |
Date of departure | 28Mar21 |
Currency |
string |
Currency unit of receipt amounts (ISO 4217), or 'MIXED' if multiple values are found | USD |
MerchantAliases |
array |
||
MerchantAliases.* |
string |
Alternative name of merchant | Contoso (R) |
Items |
array |
||
Items.* |
object |
Extracted line item | 1 Surface Pro 6 $999.00 $999.00 |
Items.*.TotalPrice |
number |
Total price of line item | $999.00 |
Items.*.Description |
string |
Item description | Room Charge |
Items.*.Date |
date |
Item date | 27Mar21 |
Items.*.Category |
string |
Item category | Room |
Migration guide and REST API v3.1
- Follow our Document Intelligence v3.1 migration guide to learn how to use the v3.1 version in your applications and workflows.
Next steps
Try processing your own forms and documents with the Document Intelligence Studio.
Complete a Document Intelligence quickstart and get started creating a document processing app in the development language of your choice.
Try processing your own forms and documents with the Document Intelligence Sample Labeling tool.
Complete a Document Intelligence quickstart and get started creating a document processing app in the development language of your choice.