> ## Documentation Index
> Fetch the complete documentation index at: https://next-developers.opencard.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Digital Receipts

> How OpenCard matches card transactions against merchant digital receipt networks and which webhooks deliver receipt, VAT, and line item data to your EMS.

When `receiptable: true` on a transaction, OpenCard tries to match it against merchant digital receipt networks.

***

## What you receive

Three separate webhooks, in any order:

| Event                    | Contains                               |
| ------------------------ | -------------------------------------- |
| `receipt.fetched`        | PDF/image URL (expires — download it!) |
| `transaction.true.vat`   | Correct VAT breakdown from merchant    |
| `transaction.line.items` | Individual purchase items              |

Subscribe to all three in your webhook config for the full picture.

***

## Receipt URL handling

```json theme={null}
{
  "url": "https://api.opencard.io/files/receipts/abc123",
  "content_type": "application/pdf",
  "expiration_time": "2022-10-02 11:12:14",
  "purchase_merchant": "Coop",
  "original_amount": 109.38,
  "original_currency": "SEK"
}
```

Sample file: [Coop receipt (109.38 SEK)](https://api.opencard.io/files/receipts/abc123) — same purchase as in [Webhook events](/ems/webhooks/events).

1. Download immediately when webhook arrives
2. Store in your system
3. Don't hotlink — URLs expire

***

## When no receipt comes

Not all merchants are in the receipt network. If `receiptable: true` but no `receipt.fetched` within reasonable time → no match found. Your users can still upload photo receipts via your UI or use [Receipt Scanner](/ems/receipt-scanner).
