Whether you're a freelancer tracking deductible business expenses, an accountant managing client receipts, or an office manager processing employee expense reports — converting a pile of paper receipts into an organized spreadsheet is one of the most tedious tasks in financial record-keeping.

This guide shows you how to automate receipt conversion using AI, covering what data gets extracted, how image quality affects results, and how to build an automated workflow for ongoing receipt processing.

What Data Gets Extracted from Receipts

A receipt contains more structured data than it might appear. AI extraction pulls out:

Data Field Example Use Case
Merchant name Starbucks, Home Depot, Delta Airlines Vendor tracking, category suggestion
Transaction date 2026-02-15 Period matching, audit trail
Transaction time 14:23 Detailed logging
Line items Coffee x2, $9.50 Expense categorization
Subtotal $9.50 Pre-tax amount
Tax amount $0.83 Tax tracking, GST/VAT
Total amount $10.33 Reimbursement amount
Payment method Visa ending in 4242 Card reconciliation

This structured output is what lets you build expense reports, reconcile credit card statements, and prepare documentation for tax purposes — without manual data entry.

Image Quality: The Most Important Variable

Unlike native digital PDFs where the text is already machine-readable, scanned receipts and receipt photos involve OCR (optical character recognition) as a first step. Image quality directly affects extraction quality.

What makes a good receipt image

  • Resolution: At least 300 DPI for scanned receipts. For phone photos, shoot in good lighting and hold the camera steady.
  • Contrast: Dark text on light background. Thermal receipt paper is prone to fading — scan these promptly.
  • Angle: As flat as possible. Extreme angles cause text distortion that harms OCR quality.
  • Focus: Avoid blurry images. If the text looks unreadable to you, it will be unreadable to the AI.
  • Cropping: The receipt should fill most of the frame, not be a tiny element in a large photo.

Thermal receipt paper: Many receipts print on thermal paper that fades over time. Scan or photograph these receipts promptly — within a few weeks of receipt — before the print fades.

Supported Input Formats

For receipt processing, you can submit:

  • PDF — scanned receipts saved as PDF (most scanner apps produce this)
  • PNG — smartphone photos or screenshots
  • JPG / JPEG — most phone camera formats
  • TIFF — high-resolution scanner output
  • HEIC — iPhone photo format

Most people collect receipts as phone photos. For the best workflow, set up a dedicated photo album or cloud folder where all receipt photos get saved — then run batch processing on that folder.

Method 1: Upload via Web Interface

For individual or small-batch receipt processing, the web interface is fastest. Drag and drop your receipt images, choose CSV as the output format, and download the results.

The CSV output includes one row per receipt with columns for merchant, date, amount, tax, and line items. You can open this directly in Excel and sort, filter, or pivot by merchant, date range, or expense category.

Method 2: Automate with the API

For ongoing receipt management, the API lets you process receipts as they arrive — from a shared folder, an expense app, or an email inbox.

Process all receipt photos from a folder

import requests
import os
import csv
from pathlib import Path

API_KEY = "your_api_key"
RECEIPT_DIR = "./receipts/"
OUTPUT_FILE = "expense_report.csv"

SUPPORTED_FORMATS = {'.pdf', '.png', '.jpg', '.jpeg', '.tiff', '.heic'}

def process_receipt(file_path):
    """Send a receipt image to the API and return extracted data."""
    with open(file_path, 'rb') as f:
        mime = 'application/pdf' if file_path.suffix == '.pdf' else 'image/jpeg'
        response = requests.post(
            'https://ordalis-api.tyler-gee13.workers.dev/api/v1/convert',
            headers={'X-API-Key': API_KEY},
            files={'file': (file_path.name, f, mime)},
            data={'output_format': 'json', 'schema': 'receipt'}
        )

    if response.status_code == 200:
        return response.json()
    else:
        print(f"  Error {response.status_code}: {response.text}")
        return None

# Find all receipt files
receipt_files = [
    Path(RECEIPT_DIR) / f
    for f in os.listdir(RECEIPT_DIR)
    if Path(f).suffix.lower() in SUPPORTED_FORMATS
]

print(f"Processing {len(receipt_files)} receipts...")

rows = []
for file_path in receipt_files:
    print(f"  Processing: {file_path.name}")
    data = process_receipt(file_path)

    if data:
        rows.append({
            'Date': data.get('transaction_date', ''),
            'Merchant': data.get('merchant_name', ''),
            'Description': data.get('description', ''),
            'Subtotal': data.get('subtotal', ''),
            'Tax': data.get('tax_amount', ''),
            'Total': data.get('total_amount', ''),
            'Payment Method': data.get('payment_method', ''),
            'Source File': file_path.name
        })

# Write to CSV
if rows:
    with open(OUTPUT_FILE, 'w', newline='') as f:
        writer = csv.DictWriter(f, fieldnames=rows[0].keys())
        writer.writeheader()
        writer.writerows(rows)
    print(f"\n✓ Saved {len(rows)} receipts to {OUTPUT_FILE}")
else:
    print("No receipts processed successfully.")

Add expense categorization

Once you have structured receipt data, you can auto-categorize expenses based on merchant name. Here's a simple categorization layer you can build on:

CATEGORY_RULES = {
    'meals': ['starbucks', 'mcdonald', 'subway', 'chipotle', 'grubhub', 'doordash', 'restaurant', 'cafe', 'diner'],
    'travel': ['delta', 'united', 'southwest', 'marriott', 'hilton', 'hyatt', 'uber', 'lyft', 'hertz', 'avis'],
    'office': ['staples', 'office depot', 'amazon', 'bestbuy', 'home depot', 'costco'],
    'software': ['adobe', 'microsoft', 'google', 'github', 'aws', 'stripe', 'cloudflare'],
    'utilities': ['verizon', 'at&t', 'comcast', 'pg&e', 'con ed'],
}

def categorize_merchant(merchant_name):
    """Suggest an expense category based on merchant name."""
    merchant_lower = merchant_name.lower()
    for category, keywords in CATEGORY_RULES.items():
        if any(kw in merchant_lower for kw in keywords):
            return category
    return 'uncategorized'

# Example usage:
for row in rows:
    row['Category'] = categorize_merchant(row['Merchant'])

Building an Expense Report Workflow

Here's how a complete expense report workflow looks when automated:

  1. Capture: Employees photo receipts in real-time using their phone. Photos go to a shared Google Drive folder organized by employee and month.
  2. Extract: A scheduled script (runs nightly) processes new images in the Drive folder using the API.
  3. Categorize: The script auto-categorizes based on merchant name and flags uncategorized expenses for manual review.
  4. Report: A final CSV is generated per employee with all receipts, amounts, categories, and a link to the source image.
  5. Approve: Manager reviews the CSV, spots checks a few source images, and approves for reimbursement.
  6. Process: Approved expenses get imported into payroll or accounts payable.

This replaces a manual workflow that typically involves collecting paper receipts, stapling them to a form, and entering each one by hand.

Common Receipt Types That Work Well

  • Restaurant receipts: Typically clean, structured, extract well even from photos
  • Hotel folios: Multi-line, detailed — extraction captures room charges, taxes, incidentals
  • Gas station receipts: Short, simple — date, gallons, price per gallon, total
  • Airline receipts / e-tickets: PDF format, highly structured, extract very cleanly
  • Rideshare receipts: Usually email PDFs from Uber/Lyft — process perfectly
  • Grocery receipts: Long with many line items — all extracted, useful for business expense separation

Receipts That Are More Challenging

  • Very old thermal receipts: Faded print reduces extraction quality
  • Crumpled or torn receipts: Physical damage creates image artifacts
  • Handwritten receipts: Handwriting recognition is improving but still less reliable than printed text
  • Photos with extreme glare: Bright light washing out text

Best practice: For problematic receipts, photograph from a 45° angle to reduce glare from thermal paper, and use your phone's document scanning mode if available — it automatically corrects perspective.

Start Processing Receipts for Free

50 free conversions per month. Upload receipt photos or PDFs and get structured CSV output in seconds. No credit card required.

Start Free Trial

Frequently Asked Questions

Can I process receipts taken with my phone camera?

Yes. JPG and PNG images from phone cameras are fully supported. For best results, ensure good lighting and a steady hand. Your phone's native document scanner (available in iOS and Android) produces better images than a plain photo.

What if a receipt has multiple pages?

Multi-page receipts (like hotel folios) should be combined into a single PDF before uploading. Most scanner apps can create multi-page PDFs from multiple photos.

Can I extract data from credit card statements to reconcile with receipts?

Yes. PDF credit card statements can be converted to CSV or JSON, giving you all transactions in a structured format. You can then cross-reference these with your receipt data to confirm every charge has a corresponding receipt.

Is this GDPR compliant for employee receipts?

Files are processed and deleted from servers within 24 hours. No data is retained for training or shared with third parties. For formal compliance documentation, a Data Processing Agreement is available on Enterprise plans.