# AI Receipt Scanning

Upload a photo of your receipt or invoice and Frihet uses computer vision (Gemini AI) to automatically extract data. Save time from manual data entry.

## How it Works

### On Mobile

1. Open Frihet on your phone
2. Go to **Expenses > New expense > Camera**
3. Point the camera at the receipt (ensure it's legible)
4. Frihet captures the photo and sends it for analysis
5. Review the extracted data and confirm

### On Desktop

1. Go to **Expenses > New expense > Upload receipt**
2. Select JPG, PNG, or PDF file from your computer
3. Frihet analyzes the image
4. Review and confirm data

## Data Extracted by AI

Frihet automatically recognizes:

- **Vendor/Company**: Name of the business that issued the receipt
- **Total amount**: Amount paid (with or without tax)
- **Date**: When the transaction occurred
- **Invoice number**: Internal reference of the receiver
- **Tax breakdown**: VAT, IGIC, or other (if present)
- **Description**: Description of the expense (services, products)

The AI also **automatically detects**:

- If it's an invoice (tax document) or a simple receipt
- Type of business (restaurant, store, services)
- If there is IRPF withholding indicated

## Review and Confirm

Before saving, Frihet shows you the extracted data:

```
Vendor:           Telefónica [editable]
Amount:           45,99 EUR [editable]
Date:             15 Feb 2026 [editable]
Invoice No.:      INV-2026-0145 [editable]
VAT:              21% [editable]
Category:         Services (detected)
```

You can **edit any field** if the AI made a mistake. For example:

- If it incorrectly detected the amount (poor image quality)
- If it confused the category
- If it did not extract the invoice number

After reviewing, click **Save** and the expense is recorded with an automatic attachment.

## Plan Limits

Frihet offers AI scanning based on your subscription. Compare the [plans and pricing](https://www.frihet.io/es/pricing) to choose the one that best suits your business.

| Plan | Scans/month | Size limit | Support |
|------|-------------|-------------------|---------|
| **Free** | 5 | 5 MB | Community |
| **Pro** | 50 | 25 MB | Email (24h) |
| **Premium** | 200 | 100 MB | Priority (4h) |

If you run out of scans, you can:
- Wait until next month (they reset automatically)
- Upgrade your plan
- Record the expense manually

## Tips for Better Results

### Clear Photo of the Receipt

- Sufficient lighting (no shadows)
- Receipt completely visible in the frame
- Perpendicular angle to the document (not oblique)
- No screen or flash reflections

### Image Quality

- Minimum resolution: 2MP (recommended 8MP+)
- Format: JPG, PNG, or PDF
- Avoid very old or degraded documents (blurry ink)

### Problematic Documents

Frihet may have difficulty with:

- Very old thermal receipts (faded ink)
- Documents with many mixed languages
- Logos or images that occupy 80%+ of the page
- Handwriting

In such cases, fill in manually (it's faster than waiting for the AI to fail).

## Privacy and Security

- Images are sent to Google Gemini API for analysis
- They are processed **anonymously** (without associating them with your account before analysis)
- Files are deleted from Google's servers **after 30 minutes**
- Your connection is **HTTPS encrypted**
- The attached file is saved on your Frihet servers (not on Google)

Frihet **never** sells scanning data to third parties.

## Troubleshooting

### "No receipt detected"

- Check that it is a real receipt/invoice (not a screenshot)
- Upload a clearer version
- Try manually if the image is very old

### "Incorrect amount"

- The AI likely confused tax with total
- Edit the **Amount** field before confirming
- If it occurs frequently with a vendor, notify support

### "Scans exhausted"

- Switch to a higher plan
- Or record manually (it takes 30 seconds per receipt)

## Upcoming Improvements

We are working on:

- Scanning **multiple receipts** in one photo
- Extraction of **line item details** (product, quantity, unit price)
- **QR** recognition on electronic invoices
- Automatic import from **email** (received invoices)
