Skip to main content

Receipt

Description

Receipt document represents a proof of purchase for products or services. It includes key transaction information such as items purchased, quantities, prices, payment method, and the total amount paid.

Schema Information

{
"type": "object",
"title": "Receipt",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"receiptNumber",
"receiptType",
"paymentDate",
"totalAmountWithVat",
"totalAmountWithoutVat"
],
"properties": {
"buyer": {
"$ref": "#/definitions/entity"
},
"seller": {
"$ref": "#/definitions/entity"
},
"vatAmount": {
"type": [
"number",
"null"
]
},
"paymentDate": {
"type": [
"string",
"null"
]
},
"receiptType": {
"enum": [
"Taxi",
"Hotel",
"Groceries",
"Sales",
"Pharmacy",
"Service",
"Restaurant",
"Donation",
"Rent",
"Other",
null
],
"type": [
"string",
"null"
]
},
"vatBreakdown": {
"type": [
"array",
"null"
],
"items": {
"type": "object",
"required": [
"vatPercentage",
"vatAmount",
"totalWithVat",
"totalWithoutVat"
],
"properties": {
"vatAmount": {
"type": [
"number",
"null"
]
},
"totalWithVat": {
"type": [
"number",
"null"
]
},
"vatPercentage": {
"type": [
"number",
"null"
]
},
"totalWithoutVat": {
"type": [
"number",
"null"
]
}
}
}
},
"paymentMethod": {
"type": [
"string",
"null"
]
},
"receiptNumber": {
"type": [
"string",
"null"
]
},
"totalAmountWithVat": {
"type": [
"number",
"null"
]
},
"totalAmountWithoutVat": {
"type": [
"number",
"null"
]
},
"lineItems": {
"type": "array",
"items": {
"type": "object",
"required": [
"productCode",
"productName",
"quantity",
"unit",
"price",
"total"
],
"properties": {
"gtin": {
"type": [
"string",
"null"
],
"description": "Global Trade Item Number, can be null"
},
"unit": {
"type": [
"string",
"null"
],
"description": "Unit of measure, can be null"
},
"price": {
"type": [
"number",
"null"
],
"description": "Price of a single unit, can be null"
},
"rowNo": {
"type": [
"string",
"null"
],
"description": "Row number of the item, can be null"
},
"total": {
"type": "number",
"description": "Total amount for the item after applying discount, calculated as (quantity * price) - discountSum"
},
"quantity": {
"type": [
"number",
"null"
],
"description": "Quantity of the item, can be null"
},
"discountSum": {
"type": [
"number",
"null"
],
"description": "Total discount sum for the item, calculated from the discount percentage, can be null"
},
"productCode": {
"type": [
"string",
"null"
],
"description": "Product code, can be null"
},
"productName": {
"type": [
"string",
"null"
],
"description": "Name of the product, can be null"
},
"discountPercentage": {
"type": [
"number",
"null"
],
"description": "Discount percentage applicable to the item, can be null"
},
"additionalProductCodes": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "Array of additional product codes, can be null"
}
},
"additionalProperties": false
},
"description": "Array of invoice line items"
}
},
"definitions": {
"entity": {
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"name": {
"type": "string"
},
"address": {
"$ref": "#/definitions/address"
},
"contact": {
"$ref": "#/definitions/contactInfo"
},
"VATNumber": {
"type": "string"
}
}
},
"address": {
"type": "object",
"properties": {
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"country": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"streetAddress": {
"type": "string"
}
}
},
"contactInfo": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"phone": {
"type": "string"
}
}
}
},
"additionalProperties": false
}