Skip to main content
GET
/
operations
/
{operationId}
/
receipt
Retrieve a receipt
curl --request GET \
  --url https://api.openfiskal.com/v1/operations/{operationId}/receipt \
  --header 'Authorization: Bearer <token>'
{
  "object": "<string>",
  "id": "rcpt_01HXYZ",
  "version": "1.0",
  "created_at": "2023-11-07T05:31:56Z",
  "issuer": {
    "organization_id": "<string>",
    "legal_name": "<string>",
    "trade_name": "<string>",
    "tax_id": "<string>",
    "address": {
      "line1": "Friedrichstraße 42",
      "line2": "<string>",
      "city": "Berlin",
      "state": "<string>",
      "postal_code": "10117",
      "country": "DE"
    },
    "location_id": "<string>",
    "location_name": "<string>",
    "register_id": "<string>",
    "register_label": "<string>"
  },
  "operation": {
    "id": "<string>",
    "external_id": "<string>",
    "type": "sale",
    "sequence_number": 123,
    "started_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "currency": "<string>",
    "cashier": {
      "id": "<string>",
      "display_name": "Maria R."
    }
  },
  "line_items": [
    {
      "id": "li_01HXYZ",
      "position": 1,
      "description": "Wiener Schnitzel",
      "quantity": 2,
      "unit": "piece",
      "unit_price_gross": 1800,
      "product_ref": "<string>",
      "flags": [
        "deposit"
      ],
      "subtotal_gross": 3600,
      "line_discounts": [
        {
          "source": "manual",
          "amount": 360,
          "id": "ldsc_01HXYZ",
          "type": "percentage",
          "label": "Happy Hour",
          "rate": "0.10"
        }
      ],
      "line_discount_amount": 360,
      "subtotal_after_line_discounts": 3240,
      "cart_discount_allocations": [
        {
          "discount_id": "cdsc_01HXYZ",
          "amount": 162,
          "label": "SAVE10 coupon"
        }
      ],
      "cart_discount_amount": 324,
      "total_gross": 2916,
      "tax": {
        "rate": "0.19",
        "category": "standard",
        "included_in_price": true,
        "taxable_amount": 2651,
        "tax_amount": 265
      },
      "total_net": 2651
    }
  ],
  "totals": {
    "subtotal_gross": 123,
    "total_line_discounts": 123,
    "subtotal_after_line_discounts": 123,
    "total_cart_discounts": 123,
    "subtotal_after_all_discounts": 123,
    "rounding_adjustment": 123,
    "total_gross": 123,
    "total_net": 123,
    "total_tax": 123,
    "tax_breakdown": [
      {
        "rate": "<string>",
        "category": "<string>",
        "taxable_amount": 123,
        "tax_amount": 123,
        "total_gross": 123
      }
    ],
    "net_payable": 123
  },
  "payments": [
    {
      "method": "cash",
      "direction": "inbound",
      "amount": 4250,
      "currency": "<string>",
      "reference": "<string>",
      "cash": {
        "amount_tendered": 5000
      },
      "card": {
        "scheme": "visa",
        "last4": "4242",
        "authorization_code": "<string>",
        "terminal_id": "<string>",
        "application_id": "<string>"
      },
      "wallet": {
        "provider": "apple_pay",
        "scheme": "visa",
        "last4": "4242",
        "authorization_code": "<string>"
      },
      "voucher": {
        "code": "SUMMER20",
        "type": "promotional"
      },
      "gift_card": {
        "gift_card_id": "<string>",
        "last4": "8821"
      },
      "online": {
        "provider": "paypal",
        "transaction_reference": "<string>"
      },
      "id": "<string>",
      "status": "approved"
    }
  ],
  "fiscal": {
    "regime": "<string>",
    "document_type": "Kassenbeleg",
    "transmission_status": "transmitted",
    "fiscal_unit_id": "fu_01HXYZ",
    "document_number": "2026-004822",
    "transmitted_at": "2023-11-07T05:31:56Z",
    "verification": {
      "url": "<string>",
      "qr_data": "<string>"
    },
    "tse_serial": "<string>",
    "client_id": "<string>",
    "signature_algorithm": "ecdsa-plain-SHA384",
    "time_format": "utcTime",
    "start_event": {
      "signed_at": "2023-11-07T05:31:56Z",
      "transaction_counter": 4821,
      "signature": "aSDinaTvuI8gbWludGxpZnk=",
      "process_type": "<string>",
      "process_data": "<string>"
    },
    "end_event": {
      "signed_at": "2023-11-07T05:31:56Z",
      "transaction_counter": 4821,
      "signature": "aSDinaTvuI8gbWludGxpZnk=",
      "process_type": "<string>",
      "process_data": "<string>"
    }
  },
  "customer": {
    "id": "<string>",
    "display_name": "<string>",
    "tax_id": "<string>",
    "tax_id_type": "codice_fiscale",
    "email": "jsmith@example.com",
    "phone": "<string>",
    "loyalty_number": "<string>"
  },
  "notes": [
    {
      "type": "custom",
      "text": "<string>"
    }
  ],
  "references": {
    "original_operation_id": "<string>",
    "reason": "<string>"
  },
  "links": {
    "self": "<string>",
    "pdf": "<string>",
    "operation": "<string>"
  },
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Platform API key sent as Authorization: Bearer ofk_platform_.... Platform integrators also pass OpenFiskal-Organization: org_xxx to act on behalf of a merchant.

Headers

OpenFiskal-Organization
string

Merchant organization ID. Required for platform integrators acting on behalf of a specific merchant. Omit when using an organization-scoped API key directly.

Path Parameters

operationId
string
required

Response

Receipt retrieved

The OpenFiskal canonical receipt. Self-contained and verifiable — everything needed to render, archive, or verify is present in this object.

The fiscal block contains both start and end events with their signatures. In Germany, both must be printed. The fiscal.verification.qr_data field contains the exact string to encode in the receipt QR code.

object
string
Allowed value: "receipt"
id
string
Example:

"rcpt_01HXYZ"

version
string
Example:

"1.0"

created_at
string<date-time>
issuer
object
operation
object
line_items
object[]
totals
object

Order-level totals, derived from line items. All fields are positive integers in minor currency units. net_payable is the only field that can be negative (on refunds).

Derivation: subtotal_gross − total_line_discounts = subtotal_after_line_discounts subtotal_after_line_discounts − total_cart_discounts = subtotal_after_all_discounts subtotal_after_all_discounts + rounding_adjustment = total_gross total_gross → total_net + total_tax

payments
object[]
fiscal
object

Jurisdiction-specific fiscal output attached to every operation. Discriminated by regime — each variant carries typed fields for its fiscal security device and signing protocol.

customer
object
notes
object[]
references
object

Links to related operations. The audit chain between operations lives here at the envelope level — not inside the type-specific data block — because any operation type can reference any other.

metadata
object