# Receipt Creation

Build a `ReceiptPayload` with the completed values from your POS or commerce
system and pass it to the SDK's `issueReceipt` method. The SDK handles local
encryption and submission. Cheqi receives the receipt body encrypted.

## Required values

The issuer supplies these values:

| Field | Meaning |
|  --- | --- |
| `documentNumber` | Issuer-assigned receipt number |
| `issueDate` | Date and time the issuer created the receipt |
| `currency` | ISO 4217 currency code |
| `receiptSubtotal` | Issuer-calculated subtotal |
| `totalBeforeTax` | Issuer-calculated total excluding tax |
| `totalTaxAmount` | Issuer-calculated tax total |
| `totalAmount` | Issuer-calculated final amount |
| `taxesApplied` | Whether taxes apply to this receipt |
| `products` | Receipt line items |


Cheqi does not calculate fiscal totals, tax, signatures,
sequences, or QR values for the issuer. Supply the legally definitive values
from the POS or commerce system.

## Optional values

Common optional fields include:

- `identifiers` for issuer and transaction references
- `discounts` and `charges`
- `taxes` for the receipt-level tax breakdown
- `transactionDate` and `purchaseDate`
- `period` for billing or service periods
- `barcodes`
- `paymentDetails`
- `jurisdictionalData` for country-specific fiscal and legal information


The free receipt message is configured on the company in the Cheqi app. It is
not supplied in each `ReceiptPayload`.

Supply complete `paymentDetails` in the encrypted receipt payload. Matching
identifiers do not replace those values. Include `paymentDetails.cardLastFour`
when available. Last four digits alone cannot identify a customer during
recipient resolution; offer the enabled [web wallet link](/receipts/qr-collection)
when no automatic match is available.

## Country-specific receipts

Use `jurisdictionalData` when your POS, fiscal device, or invoicing system has
country-specific data that must remain attached to the receipt. This includes
external regime identifiers, exact legal wording, fiscalization evidence,
authority references, and namespaced extension fields.

Cheqi preserves supplied country data but does not decide which local regime
applies to a transaction or manufacture authority data. See
[Country Support](/countries/overview) for the supported country set and
[Supplying Jurisdiction Data](/countries/jurisdictional-data) for the
request shape.

## Plaintext shape before encryption

The exact schema is available as `ReceiptPayload` in the API reference. A
minimal illustrative payload looks like this:

```json
{
  "documentNumber": "INV-2026-001",
  "issueDate": "2026-08-02T14:35:02Z",
  "currency": "EUR",
  "receiptSubtotal": 10.00,
  "totalBeforeTax": 10.00,
  "totalTaxAmount": 2.10,
  "totalAmount": 12.10,
  "taxesApplied": true,
  "products": [
    {
      "name": "Coffee",
      "identifier": "SKU-COFFEE-001",
      "quantity": 2,
      "unitCode": "C62",
      "unitPrice": 5.00,
      "subtotal": 10.00,
      "total": 12.10,
      "taxes": [
        {
          "rate": 21.0,
          "type": "VAT",
          "taxableAmount": 10.00,
          "amount": 2.10
        }
      ]
    }
  ],
  "taxes": [
    {
      "rate": 21.0,
      "type": "VAT",
      "taxableAmount": 10.00,
      "amount": 2.10,
      "label": "VAT 21%"
    }
  ],
  "paymentDetails": {
    "paymentMeansCode": "48",
    "description": "Card",
    "cardProvider": "VISA",
    "cardLastFour": "4242"
  }
}
```

This example is plaintext for explanation only. Do not send this JSON directly
to `/receipt/encrypted`.

## Product identifiers

Every product line requires an `identifier`: the SKU, article number, or other
issuer-controlled key for that line. Make it unique within the receipt.

That identifier is also the durable key used in return flows. When a customer
returns an item, it comes back as the `lineItemId`, allowing the issuer to map
the return to the original line. See
[Receiving Return Requests](/creditnote/receiving-returns#matching-returns-to-your-receipt-lines).

Continue with [Sending Receipts](/receipts/sending) for SDK examples, submission
results, and recovery requirements.