> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openfiskal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hosted Receipts API

> Retrieve, render, and deliver hosted receipts for completed fiscalized operations.

<Warning>
  **Planned — not yet available.** The endpoints described here are not implemented in sandbox or production. This page documents the intended contract. Calls to `GET /operations/{id}/receipt`, `GET /receipts/{id}`, `GET /receipts/{id}/pdf`, and `POST /receipts/{id}/send` currently return `404 not_found`.
</Warning>

The Hosted Receipts API will be the separate public surface for receipt retrieval and delivery. Use it after an operation reaches `completed` state in the fiscalization API.

<Info>
  The Hosted Receipts API uses the same server-to-server authentication model as the fiscalization API: `Authorization: Bearer ...` plus `X-OpenFiskal-Merchant`.
</Info>

## What it covers

* Retrieve a receipt by receipt ID
* Look up the receipt generated for a completed operation
* Download a rendered PDF
* Send a receipt by email or SMS

## Typical flow

1. Complete an operation in the Fiscalization API.
2. Resolve the receipt with `GET /operations/{operationId}/receipt`.
3. Use the returned `receipt.id` for follow-up retrieval, PDF download, or delivery.

## Receipt entity

The Hosted Receipts API centers on the `Receipt` entity. A receipt is a denormalized document that packages merchant identity, line items, totals, payments, and fiscal evidence into a portable object.

Key sections include:

* `issuer` for merchant, location, and register identity
* `line_items` for the purchased goods or services
* `totals` for net, tax, and gross amounts
* `payments` for the payment mix used at completion
* `fiscal` for the jurisdiction-specific fiscal payload
* `links` for JSON, PDF, and hosted-view URLs

## Delivery workflows

Use `POST /receipts/{receiptId}/send` to trigger server-side delivery. The current API supports:

* `email`
* `sms`

The response returns a delivery object with queued delivery state so your backend can track the request.

## Related guides

* [Getting started](/getting-started)
* [Transaction lifecycle](/pos-operation-ingestion)
