Belegformat
Hier findest du ein vollständiges Beispiel eines Belegs.
JSON
Gesamter Beleg
{
"version": "0.0.1",
"cash_register": {
"serial_number": "ZX999333"
},
"head": {
"id": "d9ddea50-d136-4c56-b23d-61d5577a0ae3",
"number": "2020/547",
"date": "2020-02-06T00:00:00+01:00",
"seller": {
"name": "Musterfirma",
"tax_number": "123/456/789",
"tax_exemption": false,
"tax_exemption_note": "Gemäß § 19 UStG wird keine Umsatzsteuer berechnet.",
"address": {
"street": "Muster Weg 19",
"postal_code": "10115",
"city": "Berlin",
"country_code": "DEU"
}
},
"buyer_text": "Erika Mustermann\nHeidestrasse 17\n51147 Köln",
"buyer": {
"customer_number": "K3476",
"name": "Erika Mustermann",
"tax_number": "123/456/789",
"address": {
"street": "Heidestrasse 17",
"postal_code": "51147",
"city": "Köln",
"country_code": "DEU"
}
}
},
"data": {
"full_amount_incl_vat": 3.5,
"payment_types": [
{
"name": "Visa",
"currency_code": "EUR",
"amount": 3.5,
"foreign_amount": 12.2
}
],
"vat_amounts": [
{
"percentage": 19,
"incl_vat": 3.5,
"excl_vat": 2.94,
"vat": 0.56
}
],
"lines": [
{
"text": "0,5 RADLER",
"vat_amounts": [
{
"percentage": 19,
"incl_vat": 3.5,
"excl_vat": 2.94
}
],
"item": {
"number": "106",
"quantity": 1,
"quantity_measure": "Stück",
"price_per_unit": 3.5
}
},
{
"text": "Corona-Rabatt 5%",
"vat_amounts": [
{
"percentage": 19,
"incl_vat": -0.12
}
]
}
]
},
"security": {
"tse": {
"serial_number": "BF1B13C1CF8A6F7958C190201DAF9E18B850CF2CDC0885078D48868F625955E3",
"signature_algorithm": "ecdsa-plain-SHA384",
"log_time_format": "unixTime",
"certificate": "...base64, PER?, complete chain?",
"timestamp_start": "2020-02-06T00:00:00+01:00",
"timestamp_end": "2020-02-10T14:28:10+01:00",
"first_order": "2020-02-10T14:28:09+01:00",
"transaction_number": 21,
"signature_number": 36519,
"process_data": "Beleg^3.50_0.00_0.00_0.00_0.00^3.50:Unbar",
"process_type": "KassenBeleg-V1",
"signature": "SgjhxeU5X6J9y+h0PAIbHrdENQNF4XV12ORChZeZTelqQtkCodzWrSrjax0H1nTCGG\/1VRzTHmTQmwNtyxs+J3x5\/rBAKpV7b78jQ9oudiABa9xDPp10G\/KLAlu4wy7c;"
}
},
"misc": {
"logo": {
"content_type": "image/png",
"content": "<base64>"
},
"footer_text": "Beachten Sie unsere Sonderangebote im August!",
"additional_receipts": [
{
"content_type": "text/plain",
"content": "base64Content"
}
]
}
}
{
"$schema": "http://json-schema.org/draft-04/schema",
"$id": "http://dfka.net/electronic_receipt.json",
"title": "Electronic receipt",
"version": "0.0.1",
"type": "object",
"required": [
"version",
"cash_register",
"head",
"data"
],
"additionalProperties": true,
"definitions": {
"address": {
"type": "object",
"properties": {
"street": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"postal_code": {
"type": "string",
"minLength": 1,
"maxLength": 10
},
"city": {
"type": "string",
"minLength": 1,
"maxLength": 62
},
"country_code": {
"$ref": "#/definitions/country_code"
}
}
},
"country_code": {
"enum": [
"ALA",
"AFG",
"ALB",
"DZA",
"ASM",
"AND",
"AGO",
"AIA",
"ATA",
"ATG",
"ARG",
"ARM",
"ABW",
"AUS",
"AUT",
"AZE",
"BHS",
"BHR",
"BGD",
"BRB",
"BLR",
"BEL",
"BLZ",
"BEN",
"BMU",
"BTN",
"BOL",
"BIH",
"BWA",
"BVT",
"BRA",
"IOT",
"BRN",
"BGR",
"BFA",
"BDI",
"KHM",
"CMR",
"CAN",
"CPV",
"CYM",
"CAF",
"TCD",
"CHL",
"CHN",
"CXR",
"CCK",
"COL",
"COM",
"COD",
"COG",
"COK",
"CRI",
"CIV",
"HRV",
"CUB",
"CYP",
"CZE",
"DNK",
"DJI",
"DMA",
"DOM",
"ECU",
"EGY",
"SLV",
"GNQ",
"ERI",
"EST",
"ETH",
"FLK",
"FRO",
"FJI",
"FIN",
"FRA",
"GUF",
"PYF",
"ATF",
"GAB",
"GMB",
"GEO",
"DEU",
"GHA",
"GIB",
"GRC",
"GRL",
"GRD",
"GLP",
"GUM",
"GTM",
"GIN",
"GNB",
"GUY",
"HTI",
"HMD",
"HND",
"HKG",
"HUN",
"ISL",
"IND",
"IDN",
"IRN",
"IRQ",
"IRL",
"ISR",
"ITA",
"JAM",
"JPN",
"JOR",
"KAZ",
"KEN",
"KIR",
"PRK",
"KOR",
"KWT",
"KGZ",
"LAO",
"LVA",
"LBN",
"LSO",
"LBR",
"LBY",
"LIE",
"LTU",
"LUX",
"MAC",
"MKD",
"MDG",
"MWI",
"MYS",
"MDV",
"MLI",
"MLT",
"MHL",
"MTQ",
"MRT",
"MUS",
"MYT",
"MEX",
"FSM",
"MDA",
"MCO",
"MNG",
"MSR",
"MAR",
"MOZ",
"MMR",
"NAM",
"NRU",
"NPL",
"NLD",
"ANT",
"NCL",
"NZL",
"NIC",
"NER",
"NGA",
"NIU",
"NFK",
"MNP",
"NOR",
"OMN",
"PAK",
"PLW",
"PSE",
"PAN",
"PNG",
"PRY",
"PER",
"PHL",
"PCN",
"POL",
"PRT",
"PRI",
"QAT",
"REU",
"ROU",
"RUS",
"RWA",
"SHN",
"KNA",
"LCA",
"SPM",
"VCT",
"WSM",
"SMR",
"STP",
"SAU",
"SEN",
"SCG",
"SYC",
"SLE",
"SGP",
"SVK",
"SVN",
"SLB",
"SOM",
"ZAF",
"SGS",
"ESP",
"LKA",
"SDN",
"SUR",
"SJM",
"SWZ",
"SWE",
"CHE",
"SYR",
"TWN",
"TJK",
"TZA",
"THA",
"TLS",
"TGO",
"TKL",
"TON",
"TTO",
"TUN",
"TUR",
"TKM",
"TCA",
"TUV",
"UGA",
"UKR",
"ARE",
"GBR",
"USA",
"UMI",
"URY",
"UZB",
"VUT",
"VAT",
"VEN",
"VNM",
"VGB",
"VIR",
"WLF",
"ESH",
"YEM",
"ZMB",
"ZWE"
],
"description": "ISO 3166 alpha-3 country code"
},
"currency": {
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BOV",
"BRL",
"BSD",
"BTN",
"BWP",
"BYN",
"BYR",
"BZD",
"CAD",
"CDF",
"CHE",
"CHF",
"CHW",
"CLF",
"CLP",
"CN",
"COP",
"COU",
"CRC",
"CUC",
"CUP",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"FKP",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KPW",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRO",
"MUR",
"MVR",
"MWK",
"MXN",
"MXV",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SSP",
"SEK",
"SGD",
"SHP",
"SLL",
"SOS",
"SRD",
"STD",
"SVC",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"UYI",
"UYU",
"UZS",
"VEF",
"VND",
"VUV",
"WST",
"XAF",
"XCD",
"XOF",
"XPF",
"XSU",
"YER",
"ZAR",
"ZMW",
"ZWL"
],
"description": "ISO 4217 currency code"
}
},
"properties": {
"version": {
"type": "string",
"description": "Version of the electronic receipt specification",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
},
"cash_register": {
"type": "object",
"description": "Information about the originating cash register",
"required": [
"serial_number"
],
"additionalProperties": true,
"properties": {
"serial_number": {
"type": "string",
"description": "TODO"
}
}
},
"head": {
"type": "object",
"description": "TODO",
"required": [
"number",
"date"
],
"additionalProperties": true,
"properties": {
"id": {
"type": "string",
"description": "TODO"
},
"number": {
"type": "string",
"description": "TODO"
},
"date": {
"type": "string",
"format": "date-time",
"description": "TODO"
},
"seller": {
"type": "object",
"description": "TODO",
"additionalProperties": true,
"required": [
"name",
"address",
"tax_number"
],
"properties": {
"name": {
"type": "string",
"description": "TODO"
},
"tax_number": {
"type": "string",
"description": "Tax number"
},
"tax_exemption": {
"type": "boolean",
"description": "Set this is if the seller is exempt from turnover tax",
"default": false
},
"tax_exemption_note": {
"type": "string",
"description": "A note to be shown on the receipt if the seller is exempt from turnover tax"
},
"address": {
"$ref": "#/definitions/address"
}
}
},
"buyer_text": {
"type": "string",
"description": "TODO",
"examples": [
"Erika Mustermann\nHeidestrasse 17\n51147 Köln"
]
},
"buyer": {
"type": "object",
"description": "TODO",
"required": [
"name",
"address"
],
"additionalProperties": true,
"properties": {
"customer_number": {
"type": "string",
"description": "TODO"
},
"name": {
"type": "string",
"description": "TODO"
},
"tax_number": {
"type": "string",
"description": "TODO"
},
"address": {
"$ref": "#/definitions/address"
}
}
}
}
},
"data": {
"type": "object",
"description": "TODO",
"required": [
"full_amount_incl_vat",
"payment_types",
"vat_amounts",
"lines"
],
"additionalProperties": true,
"properties": {
"full_amount_incl_vat": {
"type": "number",
"description": "TODO"
},
"payment_types": {
"type": "array",
"description": "TODO",
"additionalItems": true,
"items": {
"type": "object",
"description": "TODO",
"required": [
"name",
"currency_code",
"amount"
],
"additionalProperties": true,
"properties": {
"name": {
"type": "string",
"description": "TODO"
},
"currency_code": {
"$ref": "#/definitions/currency"
},
"amount": {
"type": "number",
"description": "TODO"
},
"foreign_amount": {
"type": "number",
"description": "TODO"
}
}
}
},
"vat_amounts": {
"type": "array",
"description": "Totals per VAT as normally printed on receipt",
"additionalItems": true,
"items": {
"type": "object",
"required": [
"percentage",
"incl_vat",
"excl_vat",
"vat"
],
"additionalProperties": true,
"properties": {
"percentage": {
"type": "number",
"description": "VAT percentage",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.01
},
"incl_vat": {
"type": "number",
"description": "Gross amount",
"multipleOf": 0.01
},
"excl_vat": {
"type": "number",
"description": "Net amount",
"multipleOf": 0.01
},
"vat": {
"type": "number",
"description": "VAT amount (vat = incl_vat - excl_vat)",
"multipleOf": 0.01
}
}
}
},
"lines": {
"type": "array",
"description": "TODO",
"additionalItems": true,
"items": {
"type": "object",
"description": "TODO",
"required": [
"text"
],
"additionalProperties": true,
"properties": {
"text": {
"type": "string",
"description": "TODO"
},
"vat_amounts": {
"type": "array",
"description": "Total amount of the line per VAT",
"additionalItems": true,
"items": {
"anyOf": [
{
"type": "object",
"description": "When the line is calculated based on the gross amount",
"required": [
"percentage",
"incl_vat"
],
"additionalProperties": true,
"properties": {
"percentage": {
"type": "number",
"description": "VAT percentage",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.01
},
"incl_vat": {
"type": "number",
"description": "Gross amount",
"multipleOf": 0.00001
}
}
},
{
"type": "object",
"description": "When the line is calculated based on the net amount",
"required": [
"percentage",
"excl_vat",
"vat"
],
"additionalProperties": true,
"properties": {
"percentage": {
"type": "number",
"description": "VAT percentage",
"minimum": 0,
"maximum": 100,
"multipleOf": 0.01
},
"excl_vat": {
"type": "number",
"description": "Net amount",
"multipleOf": 0.00001
},
"vat": {
"type": "number",
"description": "VAT amount (vat = incl_vat - excl_vat)",
"multipleOf": 0.00001
}
}
}
]
}
},
"item": {
"type": "object",
"description": "TODO",
"required": [
"number",
"quantity",
"price_per_unit"
],
"additionalProperties": true,
"properties": {
"number": {
"type": "string",
"description": "TODO"
},
"quantity": {
"type": "number",
"description": "TODO",
"multipleOf": 0.001
},
"quantity_measure": {
"type": "string",
"description": "TODO"
},
"price_per_unit": {
"type": "number",
"description": "TODO",
"multipleOf": 0.00001
}
}
}
}
}
}
}
},
"security": {
"type": "object",
"description": "TODO",
"additionalProperties": true,
"properties": {
"tse": {
"type": "object",
"description": "TODO",
"required": [
"serial_number",
"signature_algorithm",
"log_time_format",
"certificate",
"timestamp_start",
"timestamp_end",
"first_order",
"transaction_number",
"signature_number",
"process_data",
"process_type",
"signature"
],
"additionalProperties": true,
"properties": {
"serial_number": {
"type": "string",
"description": "TODO"
},
"signature_algorithm": {
"type": "string",
"description": "TODO",
"default": "ecdsa-plain-SHA256",
"enum": [
"ecdsa-plain-SHA224",
"ecdsa-plain-SHA256",
"ecdsa-plain-SHA384",
"ecdsa-plain-SHA512",
"ecdsa-plain-SHA3-224",
"ecdsa-plain-SHA3-256",
"ecdsa-plain-SHA3-384",
"ecdsa-plain-SHA3-512",
"ecsdsa-plain-SHA224",
"ecsdsa-plain-SHA256",
"ecsdsa-plain-SHA384",
"ecsdsa-plain-SHA512",
"ecsdsa-plain-SHA3-224",
"ecsdsa-plain-SHA3-256",
"ecsdsa-plain-SHA3-384",
"ecsdsa-plain-SHA3-512"
]
},
"log_time_format": {
"type": "string",
"description": "TODO",
"default": "unixTime",
"enum": [
"unixTime",
"utcTime",
"utcTimeWithSeconds",
"generalizedTime",
"generalizedTimeWithMilliseconds"
]
},
"certificate": {
"type": "string",
"description": "TODO"
},
"timestamp_start": {
"type": "string",
"description": "TODO",
"format": "date-time"
},
"timestamp_end": {
"type": "string",
"description": "TODO",
"format": "date-time"
},
"first_order": {
"type": "string",
"description": "TODO",
"format": "date-time"
},
"transaction_number": {
"type": "integer",
"description": "TODO"
},
"signature_number": {
"type": "integer",
"description": "TODO"
},
"process_data": {
"type": "string",
"description": "TODO"
},
"process_type": {
"type": "string",
"description": "TODO"
},
"signature": {
"type": "string",
"description": "TODO",
"contentEncoding": "base64"
}
}
}
}
},
"misc": {
"type": "object",
"description": "TODO",
"additionalProperties": true,
"properties": {
"logo": {
"type": "object",
"description": "TODO",
"required": [
"content_type",
"content"
],
"additionalProperties": true,
"properties": {
"content_type": {
"type": "string",
"contentEncoding": "base64",
"description": "TODO"
},
"content": {
"type": "string",
"description": "TODO",
"contentEncoding": "base64"
}
}
},
"footer_text": {
"type": "string",
"description": "TODO"
},
"additional_receipts": {
"type": "array",
"description": "Additional receipts as text, image or PDF",
"items": {
"type": "object",
"description": "TODO",
"required": [
"content_type",
"content"
],
"additionalProperties": true,
"properties": {
"content_type": {
"type": "string",
"description": "Content type of receipt",
"examples": [
"text/plain",
"application/pdf",
"image/png"
]
},
"content": {
"type": "string",
"description": "BASE64 encoded receipt content"
}
}
}
}
}
}
}
}