Export Credit Note v1.0

v1.0 of the Export Credit Note document type is the initial version of the Export Credit Notes supported by the eInvoicing solution

Overview

Export credit note is the document type used to reduce the amounts on the previously issued export invoices that have been registered in eInvoicing solution. This document type is registered with the Tax Authority.

Data Structure

Core

The data structure of the export credit note v1.0 documents follows the structure of the Export Invoice v1.0 and has a single document element.

Export Credit Note has additional references to prior documents and has validation restrictions to ensure that export credit note is changing the amounts of referenced documents only.

Note that this description defines the data structure while actual attribute naming could be different for JSON and XML data structures.

Element Type Description Value example
issuer Issuer Structure representing the issuer information. See structure.
receiver Receiver Structure representing the receiver See structure.
documentType String Document type name. Must be ec for export credit note. ec
documentTypeVersion String Document type version name. Must be 1.0 for this version. 1.0
dateTimeIssued Date The date and time when the document was issued. Date and time cannot be in future. Time to be supplied in UTC timezone. 2015-02-13T13:15:00Z
serviceDeliveryDate Date The date when the service was delivered by the customer or planned to be delivered in CLT timezone. Format supported ‘yyyy-MM-dd’ 2015-02-13
taxpayerActivityCode String Tax activity code of the business issuing the document representing the activity that caused it to be issued. Must be valid activity type code. 9478
internalId String Internal document ID used to link back to the ERP document number. Value defined by the submitter. AZ-24883
purchaseOrderReference String Optional: reference to purchase order that this document is related to. P-233-A6375
purchaseOrderDescription String Optional: Additional information about the purchase order provided to the recipient of the document.  
salesOrderReference String Optional: Reference to the previous sales order for informational purposes. 828874-023/233
salesOrderDescription String Optional: Additional information about the sales order provided to the recipient of the document.  
proformaInvoiceNumber String (max 50) Optional: Reference to the previous proforma invoice. 2020A-012
references String[] Array of document references/UUIDs to previous export invoices for which export credit note is being issued. S98L2CP1SMVBIU
payment Payment Optional: Structure containing fields providing information on how payments needs to be made. See structure.
delivery Delivery Optional: Structure containing fields providing information on how the delivery of goods See structure.
invoiceLines Invoice Line[] Invoice lines of the invoice. Needs to have at least one invoice line. See structure.
totalSalesAmount Decimal Sum all all InvoiceLine/SalesTotal items 8873.29879
totalDiscountAmount Decimal Total amount of discounts: sum of all Discount amount elements of InvoiceLine items. 663.87623
netAmount Decimal TotalSales – TotalDiscount 8183.29863
taxTotals Tax Total[] Totals per tax type. See structure.
extraDiscountAmount Decimal Additional discount amount applied at the level of the overall document, not individual lines. 12.98760
totalItemsDiscountAmount Decimal Total amount of item discounts: sum of all Item Discount amount elements of InvoiceLine items. 663.67823
totalAmount Decimal Total amount of the invoice calculated as NetAmount + Totals of tax amounts. 5 decimal digits allowed. 8934.08760
signatures Signature[] Structure containing one or two digital signatures. At least signature of the Issuer must be present. Signature of the Service provider is optional. See structure.

Issuer

Element Type Description Value example
type String Type of the issuer Must be B for business in Egypt. B
id String Registration number. For business in Egypt must be registration number. 974000525
name String Registration name of the company. My company
address Address Address structure of the issuer branch including branch code. See the structure

Issuer Address

Element Type Description Value example
branchId String Mandatory when issuer is of type B, otherwise optional. The code of the branch as registered with tax authority for the company submitting the document. 1234
country String Country represented by ISO-3166-2 2 symbol code of the countries. Must be EG for internal business issuers. EG
governate String Governorate information as textual value Giza Governorate
regionCity String Region and city information as textual value Dokki
street String street information 17 Nabil Al Wakad
buildingNumber String building information 17
postalCode String Optional: Postal code  
floor String Optional: the floor number  
room String Optional: the room/flat number in the floor  
landmark String Optional: nearest landmark to the address  
additionalInformation String Optional: any additional information to the address  

Receiver

Element Type Description Value example
type String Type of the receiver. Must be F for foreigner. F
id String Foreign company identification number (VAT ID). IE8256796U
name String Registration name of the foreign company. MICROSOFT IRELAND OPERATIONS LIMITED
address Address Address of the receiver. See the structure

Receiver Address

Element Type Description Value example
country String Foreign country represented by ISO-3166-2 2 symbol code of the countries. Must be any value for foreign companies other than ‘EG’. IE
governate String Governorate information as textual value Leinster
regionCity String Region and city information as textual value Dublin
street String street information Carmanhall and Leopardstown
buildingNumber String building information (number, name or both) One Microsoft Place
postalCode String Optional: Postal code D18 P521
floor String Optional: the floor number  
room String Optional: the room/flat number in the floor  
landmark String Optional: nearest landmark to the address  
additionalInformation String Optional: any additional information to the address  

Payment

Element Type Description Value example
bankName String Optional: Name of the bank of document issuer. Alpha Bank
bankAddress String Optional: Address of the bank of document issuer. Captured as single line of text, not a structure.  
bankAccountNo String Optional: Local bank account number in the bank 12-1982939
bankAccountIBAN String Optional: International bank account number used primarily for international documents.  
swiftCode String Optional: International Swift code of the bank.  
terms String Optional: Description of the payment terms describing when and how payments needs to be made, for example.  

Delivery

Element Type Description Value example
approach String Optional: Information on the approach for delivery used, means of transportation.  
packaging String Optional: Information on types of packages used when delivering the goods  
dateValidity String Optional: Validity date for exported products. 2015-02-13T13:15:00Z
exportPort String Optional: Port exporting the goods.  
countryOfOrigin String Optional: Country of origin of goods/services. Country represented by ISO-3166-2 2 symbol code of the countries. SA
grossWeight Decimal Optional: Total weight of the goods delivered. Value in kilograms. 9929.00000
netWeight Decimal Optional: Net weight of the goods delivered. Value in kilograms. 9400.00000
terms String Optional: Delivery terms/shipping terms information.  

Invoice Line

Element Type Description Value example
description String Description of the item being sold. One ton of Aria apples.
itemType String Coding schema used to encode the item type. Must be GS1 or EGS for this version. GS1
itemCode String Code of the goods or services item being sold. GS1 codes targeted for managing goods, EGS codes targeted for managing goods – goods or services. GS1: 6221218058490, EGS: EG-113317713-1234
unitType String Code of the unit type used from the code table of the measures. kgm
weightUnitType String Weight units used, e.g., kilograms or tons code table of the measures. kgm
weightQuantity number Quantity of the weight units, e.g., 1.2 KG. Value should be larger than 0. 1.2
quantity Decimal Number of units of the defined unit type being sold. Number should be larger than 0. 4.44444
unitValue Value The structure defining the price of a single unit sold. See structure.
salesTotal Decimal Total amount for the invoice line considering quantity and unit price in EGP (with excluded factory amounts if they are present for specific types in documents). 23.66787
total Decimal Total amount for the invoice line after adding all pricing items, taxes, removing discounts. 455.98712
valueDifference Decimal Value difference when selling goods already taxed (accepts +/- numbers), e.g., factory value based. 10.09806
totalTaxableFees Decimal Total amount of additional taxable fees to be used in final tax calculation. 1.28942
netTotal Decimal Total amount for the invoice line after applying discount. 23.67984
itemsDiscount Decimal Non-taxable items discount. 12.22345
discount Discount Optional: the structure defining the discount applied on a single unit sold. See structure
taxableItems Taxable Item[] Optional: List of taxable items. Can have zero or more of supported tax items below from the list of all tax types including VAT, WHT and table tax, local authority fees (municipality), development. See structure.
internalCode String Optional: Internal code used for the product being sold – can be used to simplify references back to existing solution. 8383S

Value

Element Type Description Value example
currencySold String Currency code used from ISO 4217. EGP
amountEGP Decimal Price of unit of goods/services sold in EGP. Should be valid decimal with max 5 decimal digits. Value rounded to 5 decimal digits if calculated using currency sold and exchange rate. 1.27941
amountSold Decimal Mandatory if currencySold <> EGP. Should not have value otherwise 1.21875
currencyExchangeRate Decimal Exchange rate of the Egyptian bank on the day of invoicing used to convert currency sold to the value of currency EGP. Mandatory if currencySold is not EGP. Should be valid decimal with max 5 decimal digits. 1.92992

Discount

Element Type Description Value example
rate Decimal Optional: discount percentage rate applied. Must be from 0 to 100. 5.00
amount Decimal Optional: amount of discount provided to customer for this item. Should be smaller or equal to value Total. If percentage specified should be valid amount calculated from total by applying discount percentage. Value with the precision of 5 decimal digits. 10.00000

Taxable Item

Element Type Description Value example
taxType String Type of tax applied - from the list of approved tax type codes. The TaxType needs to be unique across the invoice line (no VAT twice in one invoice line), TaxType is from the list of supported tax types. 123
amount Decimal Amount of the tax applied – tax type defined type of tax applies to support different taxes that are possible depending on the type of sales, customer etc. Value with the precision of 2 2.00000
subType String Subtype of the tax type that might mean exemption rate is applied or specific rate linked to product type being sold is applied.  
rate Decimal Tax rate applied for the invoice line. Value from 0 to 999. 2.00

Tax Total

Element Type Description Value example
taxType String Type of tax applied - from the list of approved tax type codes. The TaxType needs to be unique across the invoice line (no VAT twice in one invoice line), TaxType is from the list of supported tax types. 123
amount Decimal Sum of all amounts of given tax in all invoice lines. 5 decimal digits allowed. 838.18763

Signature

Element Type Description Value example
type String Type of the signature: Issuer (I), ServiceProvider (S) I
value String Signature value that contains CADES-BES structure containing signer certificate, hash value signed and actual signature value. Base64 encoded string

Additional Considerations

Export Credit Note Restrictions

When creating export credit notes submitters need to consider these restrictions:

  • The structure of the receiver and issuer should not be changed
  • The taxpayer activity code reference should not be changed
  • The Service Delivery Date reference should not be changed
  • Referenced export invoices (if multiple) all should be issued by the submitter taxpayer
  • Referenced export invoices (if multiple) all should be issued for the same recipient
  • Referenced export invoices should be issued before issuance date of the export credit note
  • The invoice lines in the export credit note should be the same as in the combination of all export invoices referenced - only quantities and amounts can be changed
  • Total amount of the export credit note should be less than or equal the total amount of referenced export invoices

Signature Creation

Signed content is entire Document structure except signature section for I signature type and entire structure + previous I signature for S type of signature. SHA256 hashing used for creating hash of the elements to sign.

More details on how to define structure of the document to hash, create canonical version, apply hashing, sign the hash and then embed the signature are provided in section Signature Creation.

Signature Validation

The validation rules for signatures are:

  • Base64 encoded value that is a valid CADES-BES structure.
  • CADES-BES signing certificate is valid at the date of submission of document for validation.
  • Signing certificate is issued to:
    1. issuer of the document, i.e., taxpayer registration number matches in certificate and document,
    2. person representative who is active representative of taxpayer at the document issuance date and time.
  • CADES-BES signature is valid RSA signature created using one of the approved eSeal or natural person signature certificates in Egypt.