Receipt Issuance FAQ

Answers to frequently asked questions about issuance of receipt

Main Calculations

Main calculations are list of predefined validation checks and calculations required to check the validity of receipt content before submitting the receipt.

Click here to view validation rules for all the field values.

Local Validations

The following validations can be done offline on the receipts before storing them locally:

Validation of receipt/return receipt base structure

Validation of the issued document type version to check its structure matching what is required by the document type version. (Only JSON format supported). The structure will be checked against the receipt base structure.

Code Validator

Code validator enables validation of various codes used in issued documents to make sure they are referencing valid codes, for example Payment Methods, Currency Codes, Tax Types, Tax SubTypes, GS1, EGS, Unit Types, Activity Codes, buyer Types, Order Delivery Mode, Branches Codes, allowed receipt types for taxpayer as per activity code.

Code validator depends on cache of code table information that allows it to validate the documents quicker.

Note: System must validate goods and services codes used by the taxpayer against goods and services codes defined for usage by the taxpayer (if access to APIs to retrieve and cache this information is available)

Core Fields Validator

Core fields validator is used to validate that the receipt contains at least the main fields that any receipt should have to be processed by the system.

Core fields validation rules:

  1. tax type must be unique
  2. issuer Id must be the same in the token (submitter of the document must be the issuer)
  3. issuer Id is required
  4. issuer name is required
  5. receiver type is required
  6. if receiver type is not [P], receiver id is required
  7. if receiver type is not [P], receiver name is required
  8. document type is required
  9. document type version is required
  10. internal id is required
  11. issuance date time format must be valid
  12. issuance date time can’t be in the future
  13. issuance date time value must be in the range of submission workflow parameter unless the ReferenceOldUUID is provided
  14. ReferenceOldUUID cannot be equal to the UUID
  15. receiver type is [B], issuer and receiver can’t be the same
  16. issuer branch id is required
  17. if currency is not EGP, currency exchange rate is required, else, currency exchange rate is not required
  18. issuer id owning the POS is the same issuer in the receipt
  19. POS is allowed to submit at the time of receipt issuance
  20. taxpayer is allowed to submit using the submission channel
  21. reference sales receipt can’t be supplied for the document type [s]
  22. document UUID is 64 alphanumeric string that is a valid hash of the content of the serialized receipt with all content excluding the UUID itself.
  23. document previous UUID is a 64 alphanumeric string
  24. if submitted by a POS, validate that all receipts within the submission are issued by the same POS
  25. If Business Buyer Type restricted flag is enabled on the system level, validate that the receipt buyer type isn’t business (B)
  26. For return receipts, the referenceUUID should be a UUID of a receipt from the original document type. Example: If the return receipt is General Services Return Receipt, then the referenceUUID should be a UUID for General Services Receipt receipt

National ID Validator

National ID validator is used to check recipients of type person to verify that they are specified when required and they have valid values supplied. The validator depends on minimal amount parameter that defines when national ID information becomes mandatory for recipients of type person.

National ID becomes mandatory when buyer type is P and totalAmount equals to or greater than a configured value (50000 EGP for receipts with versions 1.0-1.1, 150000 EGP for receipts with version 1.2 and newer)

Taxpayer Validator

Taxpayer validator is the tool that validates if the taxpayers referenced in the submitted document are valid at the date of issuance of the document. It also performs checks on the issuer taxpayer that require async processing and cannot be done synchronously in core fields validator.

Duplicate Document Validator

Duplicate document validator can be used for both validation (that invalidates documents) and for alerting (that generate alerts to employees) as all other processors, but this one is targeted primarily at the alerting pipelines.

Processor tries to find documents submitted recently that are like the document that is being processed to identify cases where the same document (often) by mistake has been submitted twice or even more than twice.

Processor enables configuration of parameters used to identify the match by allowing process administrators to define the combination of attributes that need to match from the list of offered attributes.

How to generate receipt UUID?

Receipt UUID is a unique key on system level, it is generated based on receipt content as per receipt base schema through the following procedure:

  1. Make sure to include all key fields in receipt object including UUID of previous receipt issued by same POS device.
  2. If receipt type is return then make sure to include referenceUUID of the receipt in this return object.
  3. Make sure receipt object has empty receipt UUID which is being generated.
  4. Serialize and normalize receipt object and flatten all its properties in one line text.
  5. Create a hash value of the normalized text using SHA256.
  6. Convert the hash value from array of 32 bytes to hexadecimal string of 64 characters.
  7. Use the hexadecimal string as receipt UUID.

How to sign a receipt batch?

Click here to get the detailed information about signing a receipt batch.

Note! The function to perform signature validation will not be deployed at this point until a decision is provided by ETA to test and deploy the component.

Receipt QR Code

The taxpayer should generate a QR code and place it on the printed receipt. This QR code represents a URL to the receipt details in the eInvoicing portal.

QR Code Content

QR code content is described as per the following sections:

1. Technical

Name Description
URL URL of the Receipt Details Page in e-receipt solution (portal). URL format:

Note {ReceiptDateAndTime} is the receipt issuance date and time in UTC.

You may pick eInvoicing Portal URL from here

URL Example:

2. Seller Information

Name Description Value example
Registration Number Registration Number of Seller 674859545

3. Receipt Data

Name Description Value example
Total Receipt’s Total Amount 1000.000

QR Code Template

All QR code content should be included in one line text as per the following template:

{URL}#Total:{Total},IssuerRIN:{Registration Number}

Example of formated QR Code Content,IssuerRIN:674859545

Receipt batch Schema and Structure

Click here to download sample of the receipt batch schema and structure in the JSON format.

Limitations on receipt submission

The following limitations are managed by the IT Operator for the process of receipt submission:

  1. Maximum Submission Size is 500 receipts (1.5 Mbytes)
  2. Minimum Submission Size is 1 receipt
  3. Average number of lines per receipt (10)
  4. Maximum number of line Items per receipt is 300
  5. The receipt is allowed to be submitted within the allowed duration (24 hours), unless this receipt is being resubmitted and has the OLD UUID added to the receipt/return receipt
  6. Submission datetime can’t be in the future
  7. Supported content type: application/json
  8. Submit with allowed branch
  9. Submit with valid/active document type and document type version

Limitations on POS device

  1. The length of POS Serial Number can be up to 100 characters.
  2. POS device issuing the receipt has to have been registered and linked to the issuer RIN before the receipt is issued.
  3. The issuer should have been allowed to issue receipts by assigning the B2C tag on the system.
  4. The taxpayer should not be blocked.

Taxpayer with B2C only tag and still want to submit Invoice documents

Click here to get the detailed guidelines information about documents submission using B2B.

Note! As a B2C only tagged taxpayer, you need follow the guidelines to perform invoice documents submission using B2B.