You are on page 1of 124

Zakat, Tax and Customs Authority (ZATCA)

Electronic Invoice Data Dictionary to the E-Invoicing resolution dated 2021-05-28

Version Date Updates


1.0 2021-05-28

Data dictionary details


Column Details
A Elecronic invoice category
Business term group and ID in ISO CEN/EN 16931:2017 standard. The terms that are not in ISO CEN/EN 16931:2017 standar
receives:
B-C - no group ID
- a KSA term ID (ex: KSA-1)

D-E Name and description for each business term


UBL specifications for each business term:
- XML tag in Invoice document
- XML tag in Credit Note document
G-J - tag cardinality
- data type

Business requirements and rules for each business term:


- rules from ISO CEN/EN 16931:2017
- KSA specific rules
L-O

Saudi context for each business term:


- status for each invoice type
Q-U
- specific format if it is the case

W Example for each business term


1-05-28

16931:2017 standard
ZATCA E-invoice Category Business term ID (EN Business term name Description
16931) / KSA term ID

Grup ID Term ID

Process control BG-3 BT-23 Business process type Identifies a user-defined


profile of the customization
of UBL being used.
Invoice identifier - BT-1 Invoice number A unique identification of the
Invoice.
Invoice UUID - KSA-1 Unique invoice identifier Globally unique reference
identifying the invoice.
Dates - BT-2 Invoice issue date The date when the Invoice
(gregorian calendar) was issued as per Article 53
of the VAT Implementing
Regulation
Times - KSA-25 Invoice issue time The time when the invoice
was issued.
Invoice type code - BT-3 Invoice type code A code specifying the
functional type of the
Invoice.
Invoice transaction code - KSA-2 Invoice type transactions A code of the invoice
subtype and invoices
transactions.

Notes BG-1 BT-22 Invoice note A textual note that gives


unstructured information that
is relevant to the Invoice as
a whole.
Currencies - BT-5 Invoice currency code The currency in which all
Invoice amounts are given,
except for the Total VAT
amount in accounting
currency.
Currencies - BT-6 Tax currency code The currency used for VAT
accounting and reporting
purposes as accepted or
required in the country of the
Seller.

Shall be used in
combination with the Total
VAT amount in accounting
currency (BT-111).

Reference documents - BT-13 Purchase order ID An identifier of a referenced


purchase order, issued by
the Buyer.
Reference documents BG-3 BT-25 Billing reference ID The sequential number
(Invoice number BT-1) of the
original invoice(s) that the
credit/debit note is related
to.
Reference documents - BT-12 Contract ID The identification of a
contract.

Invoice counter value - KSA-16 Invoice counter value Invoice counter value
Previous invoice hash - KSA-13 Previous invoice hash The base64 encoded
SHA256 hash of the
previous invoice.
This hash will be computed
from the business payload
of the previous invoice: UBL
XML of the previous invoice
without tags for QR code
(KSA-14) and cryptographic
stamp (KSA-15).

For the first invoice, the


previous invoice hash is
"NWZlY2ViNjZmZmM4NmY
zOGQ5NTI3ODZjNmQ2OTZ
jNzljMmRiYzIzOWRkNGU5
MWI0NjcyOWQ3M2EyN2Zi
NTdlOQ==", the equivalent
for base64 encoded
SHA256 of "0" (zero)
character.

More details can be found in


the Security Features
Implementation Standard.

QR code - KSA-14 Invoice QR code QR code must contain:


- Seller VAT number
- Seller Name
- VAT Total
- Invoice Total (including
VAT)
- Hash of the XML invoice
- Invoice issue date and time
- QR Code stamp (For
simplified tax invoices and
associated notes, it will be
applied by the seller's
device. For the tax invoice
Cryptographic stamp - KSA-15 Cryptographic stamp Invoice cryptographic stamp

More details can be found in


the Security Features
Implementation Standard.

Seller identification BG-5 KSA-18 Group VAT number Group VAT Registration as
(registered) per Article 10 of VAT
Regulations
Seller identification BG-5 BT-29 Other seller ID Other seller ID is one of the
BT-29-1 list:
- Commercial registration
number with "CRN" as
schemeID
- Momra license with "MOM"
as schemeID
- MLSD license with "MLS"
as schemeID
- Sagia license with "SAG"
as schemeID
- Other OD with "OTH" as
schemeID

Seller address BG-5 BT-35 Address - Street Seller address line 1 - the
main address line in an
address
Seller address BG-5 BT-36 Address - Additional street Seller address line 2 - an
additional address line in an
address that can be used to
give further details
supplementing the main line.
Seller address BG-5 KSA-17 Additional - Building Seller address building
number number
Seller address BG-5 KSA-23 Address - Additional Seller address additional
number number
Seller address BG-5 BT-37 Address - City The common name of the
city, town or village, where
the Seller's address is
located.
Seller address BG-5 BT-38 Address - Seller postal Seller post code
code
Seller address BG-5 BT-39 Address - Province/State Seller country subdivision
Seller address BG-5 KSA-3 Address - Neighborhood The name of the subdivision
of the Seller city, town, or
village in which its address
is located, such as the name
of its district or borough.
Seller address BG-5 BT-40 Address - Country code
Seller country code

Seller identification BG-5 BT-31 VAT number (registered) Seller VAT identifier -
taxpayer entity
Also known as Seller VAT
identification number.
Seller identification BG-5 BT-27 Seller name Seller name
Buyer identification BG-5 KSA-20 Group VAT number Buyer Group VAT
(registered) Registration as per Article
10 of VAT Regulations
Buyer identification BG-7 BT-46 Other buyer ID Other Buyer ID must be one
BT-46-1 of the following list:
- National ID with "NAT" as
schemeID
- Tax Identification Number
"TIN" as schemeID
- Iqama Number with "IQA"
as schemeID
- Passport ID with "PAS" as
schemeID
- Commercial registration
number with "CRN" as
schemeID
- Momra license with "MOM"
as schemeID
- MLSD license with "MLS"
as schemeID
- Sagia license with "SAG"
as schemeID
- GCC ID with "GCC" as
schemeID
- Other ID with "OTH" as
schemeID

Buyer address BG-8 BT-50 Address - Street Buyer address line 1 - the
main address line in an
address
Buyer address BG-8 BT-51 Address - Additional street Buyer address line 2 - an
additional address line in an
address that can be used to
give further details
supplementing the main line.
Buyer address BG-8 KSA-18 Address - Building number Buyer address building
number
Buyer address BG-8 KSA-19 Address - Additional Buyer address additional
number number
Buyer address BG-8 BT-52 Address - City The common name of the
city, town or village, where
the Buyer's address is
located.
Buyer address BG-8 BT-53 Address - Buyer postal Buyer postal code
code

Buyer address BG-8 BT-54 Address - Province/State Buyer country subdivision


Buyer address BG-8 KSA-4 Address - The name of the subdivision
District/Neighborhood of the Buyer city, town, or
village in which its address
is located, such as the name
of its district or borough.
Buyer address BG-8 BT-55 Address - Country code Buyer country code

Buyer identification BG-7 BT-48 VAT number (registered) The Buyer's VAT identifier
(also known as Buyer VAT
identification number).
Buyer identification BG-7 BT-44 Buyer name The full name of the Buyer.

Delivery dates BG-13 KSA-5 Supply date (gregorian The date when the supply is
calendar) performed
For credit and debit notes , it
acts as the original supply
date.
Delivery dates - KSA-24 Supply end date Calendar field "End Date"
for Continuous Supplies.
Payment instructions - Payment mean BG-16 BT-81 Payment means type code The means, expressed as
code, for how a payment is
expected to be or has been
settled.
Entries from the UNTDID
4461 code list
Payment instructions - credit / debit - KSA-10 Reasons for issuance of Reasons for issuance of
note reason credit / debit note credit / debit note as per
Article 40 (paragraph 1) of
KSA VAT regulations, a
Credit and Debit Note is
issued for these 4 instances:
- Cancellation or suspension
of the supplies after its
occurrence either wholly or
partially
- In case of essential change
or amendment in the supply,
which leads to the change of
the VAT due;
- Amendment of the supply
value which is pre-agreed
upon between the supplier
and consumer;
- In case of goods or
services refund.

Payment instructions - Credit transfer BG-17 KSA-22 Payment terms The payment terms, if mode
of payment is credit. Free
text
Allowance (discount) at document BG-20 - Document level allowance An indicator that this
level indicator AllowanceCharge describes
a discount.
The value of this tag
indicating discount
(Allowance) must be "false".
Allowance (discount) at document BG-20 BT-94 Document level allowance The percentage that may be
level percentage used, in conjunction with the
document level allowance
base amount, to calculate
the document level
allowance amount.
Allowance (discount) at document BG-20 BT-92 Document level allowance The amount of an
level amount allowance, without VAT.

Allowance (discount) at document BG-20 BT-5 Currency for document Currency for line allowance
level level allowance amount amount

Allowance (discount) at document BG-20 BT-93 Document level allowance The base amount that may
level base amount be used, in conjunction with
the Invoice line allowance
percentage, to calculate the
Invoice line allowance
amount.
Allowance (discount) at document BG-20 BT-5 Currency for document Currency for invoice line
level level allowance base allowance base amount
amount
Allowance (discount) at document BG-20 BT-95 Document level allowance A coded identification of
level VAT category code what VAT category applies
to the document level
allowance.
Allowance (discount) at document BG-20 BT-96 Document level allowance The VAT rate, represented
level VAT rate as percentage that applies
to the document level
allowance.
Allowance (discount) at document BG-20 KSA-21 Tax scheme ID Mandatory element. Use
level “VAT”

Invoice total amounts - Sum of Invoice BG-22 BT-106 Sum of Invoice line net Sum of all Invoice line net
line net amount amount amounts in the Invoice
without VAT
Invoice total amounts - Sum of Invoice BG-22 BT-5 Currency for sum of Currency for invoicetotal
line net amount invoice line net amount amount
Invoice total amounts - Sum of Invoice BG-22 BT-107 Sum of allowances on Sum of all allowances on
line net amount document level document level in the
Invoice.
Allowances on line level are
included in the Invoice line
net amount which is
summed up into the Sum of
Invoice line net amount.

Invoice total amounts - Sum of Invoice BG-22 BT-5 Currency for sum of Currency for invoice total
line net amount allowances on document amount without VAT
level
Invoice total amounts - Total amount BG-22 BT-109 Invoice total amount The total amount of the
without VAT without VAT Invoice without VAT.

Invoice total amounts - Total amount BG-22 BT-5 Currency for invoice total Currency for invoice total
without VAT amount without VAT amount without VAT
Invoice total amounts - Total VAT BG-22 BT-110 Invoice total VAT amount The total VAT amount for
amount the Invoice.
The Invoice total VAT
amount is the sum of all
VAT category tax amounts.
Invoice total amounts - Total VAT BG-22 BT-5 Currency for total VAT Currency for total VAT
amount amount amount
Invoice total amounts - Total VAT BG-22 BT-111 Invoice total VAT amount The VAT total amount
amount in accounting currency in accounting currency expressed in the accounting
currency accepted or
required in the country of the
Seller.
To be used when the VAT
accounting currency (BT-6)
differs from the Invoice
currency code (BT-5).
The VAT amount in
accounting currency is not
used in the calculation of the
Invoice totals.

Invoice total amounts - Total VAT BG-22 BT-6 Currency for invoice total Currency for invoice total
amount in accounting currency VAT amount in accounting VAT amount in accounting
currency currency
Invoice total amounts - Total amount BG-22 BT-112 Invoice total amount with The total amount of the
with VAT VAT Invoice with VAT.
The Invoice total amount
with VAT is the Invoice total
amount without VAT plus
the Invoice total VAT
amount.
Invoice total amounts - Total amount BG-22 BT-5 Currency for invoice total Currency for invoice total
with VAT amount with VAT amount with VAT
Invoice total amounts - Paid amount BG-22 BT-113 Paid amount The sum of amounts which
have been paid in advance
including VAT.
This amount is subtracted
from the invoice total
amount with VAT to
calculate the amount due for
payment.
Invoice total amounts - Paid amount BG-22 BT-5 Currency for paid amount Currency for paid amount

Invoice total amounts - Payable BG-22 BT-115 Amount due for payment The outstanding amount that
amount is requested to be paid.
This amount is the Invoice
total amount with VAT minus
the paid amount that has
been paid in advance. The
amount is zero in case of a
fully paid Invoice.

Invoice total amounts - Payable BG-22 BT-5 Currency for amount due Currency for paid amount
amount for payment
VAT breakdown BG-23 BT-116 VAT category taxable Sum of all taxable amounts
amount subject to a specific VAT
category code and VAT
category rate (if the VAT
category rate is applicable).

The sum of Invoice line net


amount minus allowances
on document level which are
subject to a specific VAT
category code and VAT
category rate (if the VAT
category rate is applicable).

VAT breakdown BG-23 BT-5 Currency for VAT category Currency for VAT category
taxable amount taxable amount
VAT breakdown BG-23 BT-117 VAT category tax amount Calculated by multiplying the
VAT category taxable
amount with the VAT
category rate for the
relevant VAT category.

VAT breakdown BG-23 BT-5 Currency for category tax Currency for category tax
amount amount
VAT breakdown BG-23 BT-118 VAT category code Coded identification of a
VAT category.

VAT breakdown BG-23 BT-119 VAT category rate The VAT rate, represented
as percentage that applies
for the relevant VAT
category.
VAT breakdown BG-23 BT-121 VAT exemption reason A coded statement of the
code reason for why the amount
is exempted from VAT.
VAT breakdown BG-23 BT-120 VAT exemption reason A textual statement of the
text reason why the amount is
exempted from VAT or why
no VAT is being charged
VAT breakdown BG-23 KSA-21 Tax scheme ID Mandatory element. Use
“VAT”
Line items - ID BG-25 BT-126 Invoice line identifier A unique identifier for the
individual line within the
Invoice.
Line items - Quantity BG-25 BT-129 Invoiced quantity The quantity of items (goods
or services) that is charged
in the Invoice line.
Line items - Quantity BG-25 BT-130 Invoiced quantity unit of The unit of measure that
measure applies to the invoiced
quantity.
Line items - Line extension amount BG-25 BT-131 Invoice line net amount The total amount of the
Invoice line, including
allowances (discounts). It is
the item net price multiplied
with the quantity.
The amount is “net” without
VAT.

Line items - Line extension amount BG-25 BT-5 Currency for invoice line Currency for invoice line net
net amount amount
Line items - Allowance (discount) at BG-27 - Invoice line allowance An indicator that this
line level indicator AllowanceCharge describes
a discount.
The value of this tag
indicating discount
(Allowance) must be "false".
Line items - Allowance (discount) at BG-27 BT-138 Invoice line allowance The percentage that may be
line level percentage used, in conjunction with the
Invoice line allowance base
amount, to calculate the
Invoice line allowance
amount.
Line items - Allowance (discount) at BG-27 BT-136 Invoice line allowance The amount of an
line level amount (discount or allowance, without VAT.
rebate amount)
Line items - Allowance (discount) at BG-27 BT-5 Currency for line Currency for line allowance
line level allowance amount amount
Line items - Allowance (discount) at BG-27 BT-137 Invoice line allowance The base amount that may
line level base amount be used, in conjunction with
the Invoice line allowance
percentage, to calculate the
Invoice line allowance
amount.
Line items - Allowance (discount) at BG-27 BT-5 Currency for invoice line Currency for invoice line
line level allowance base amount allowance base amount

Line items - Line VAT amount - KSA-11 VAT line amount VAT amount as per Article
53

Line items - Line VAT amount - BT-5 Currency for VAT line Currency for VAT line
amount amount

Line items - Line amount with VAT - KSA-12 Line amount inclusive VAT Line amount inclusive VAT

Line items - Line amount with VAT - BT-5 Currency for line amount Currency for line amount
inclusive VAT inclusive VAT

Line items - Description BG-31 BT-153 Item name The description of goods or
services as per Article 53 of
the VAT Implementing
Regulation.
Line items - Identifiers BG-31 BT-156 Item Buyer's identifier An identifier, assigned by
the Buyer, for the item.

Line items - Identifiers BG-31 BT-155 Item Seller's identifier An identifier, assigned by
the Seller, for the item.
Line items - Identifiers BG-31 BT-157 Item standard identifier An item identifier based on a
registered scheme.

This should include the


product code type and the
actual code. This list
includes UPC (11 digit, 12
digit, 13 digit EAN), GTIN
(14 digit), Customs HS Code
and multiple other codes

Line items - Item price BG-29 BT-146 Item net price The price of an item,
exclusive of VAT, after
subtracting item price
discount.
The Item net price has to be
equal with the Item gross
price minus the Item price
discount.

Line items - Item price BG-29 BT-5 Currency for item net price Currency for item net price
Line items - VAT BG-30 BT-151 Invoiced item VAT The VAT category code for
category code the invoiced item.

Line items - VAT BG-30 BT-152 Invoiced item VAT rate The VAT rate, represented
as percentage that applies
to the invoiced item as per
Article 53 of the VAT
Implementing Regulation

Line items - VAT BG-30 KSA-21 Tax scheme ID Mandatory element. Use
“VAT”
Line items - Item price BG-29 BT-149
Item price base quantity The number of item units to
which the price applies.
Line items - Item price BG-29 BT-150 Item price base quantity Item price base quantity unit
unit code code
Line items - Item price BG-29 - Price allowance indicator An indicator that this
AllowanceCharge describes
a discount. The value of this
tag indicating discount
(Allowance) must be "false".
This is in the context of the
line item price level (not the
line item level).

Line items - Item price BG-29 BT-147 Item price discount The total discount
subtracted from the Item
gross price to calculate the
Item net price.
Only applies if the discount
is provided per unit and if it
is not included in the Item
gross price.
This is in the context of the
line item price level (not the
line item level).
Line items - Item price BG-29 BT-5 Currency for item price Currency for item price
discount discount

Line items - Item price BG-29 BT-148 Item gross price The unit price, exclusive of
VAT, before subtracting Item
price discount.
Line items - Item price BG-29 BT-5 Currency for item gross Currency for item gross
prices prices. This is in the context
of the line item price level
(not the line item level).
UBL specifications

Invoice (/ubl:Invoice/) tag Cardinality

cbc:ProfileID 0..1

cbc:ID 1..1

cbc:UUID 1..1

cbc:IssueDate 1..1

cbc:IssueTime 1..1

cbc:InvoiceTypeCode 1..1
cbc:InvoiceTypeCode / @name 0..1

cbc:Note 0..*

cbc:DocumentCurrencyCode 0..1
cbc:TaxCurrencyCode 0..1

cac:OrderReference/cbc:ID 1..1 if its


parent context
exists
cac:BillingReference / cac:InvoiceDocumentReference / cbc:ID 1..1 if its
parent context
exists

cac:ContractDocumentReference / cbc:ID 1..1 if its


parent context
exists
cac:AdditionalDocumentReferene / cbc:UUID 0..1
where
cac:AdditionalDocumentReferene / cbc:ID = ICV
cac:AdditionalDocumentReference / cac:Attachment / cbc:EmbeddedDocumentBinaryObject 0..1

where
cac:AdditionalDocumentReference / cbc:ID = PIH
cac:AdditionalDocumentReference / cac:Attachment / cbc:EmbeddedDocumentBinaryObject
/@mimeCode = text/plain

cac:AdditionalDocumentReference / cac:Attachment / cbc:EmbeddedDocumentBinaryObject 0..1

where
cac:AdditionalDocumentReference / cbc:ID = QR
cac:AdditionalDocumentReference / cac:Attachment / cbc:EmbeddedDocumentBinaryObject
/@mimeCode = text/plain
In the UBL extension 0..1
ext:UBLExtensions / ext:UBLExtension / ext:ExtensionContent / sig:UBLDocumentSignatures xmlns:sig=
"urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2"
xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
xmlns:sbc= "urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
xmlns:xades="urn:oasis:names:specification:ubl:schema:xsd:XAdESv141-2" / sac:SignatureInformation /
cbc:ID = urn:oasis:names:specification:ubl:signature:1 (default value)
sbc:ReferencedSignatureID = urn:oasis:names:specification:ubl:signature:Invoice (default value)
ds:Signature - here is XMLDsig + XAdES XML generated by the EU XAdES tool for the
cryptographic stamp

In the main UBL


cac:Signature / cbc:ID = urn:oasis:names:specification:ubl:signature:Invoice (default value)

cac:Signature / cbc:SignatureMethod = urn:oasis:names:specification:ubl:dsig:enveloped:xades ( default


value)

cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID 0..1

where schemeID = HQ
cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID 0..*

where attribute schemeID is according to the description

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:StreetName 0..1

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:AdditionalStreetName 0..1

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:BuildingNumber 0..1

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:PlotIdentification 0..1

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:CityName 0..1

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:PostalZone 0..1

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:CountrySubentity 0..1


cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cbc:CitySubdivisionName 0..1

cac:AccountingSupplierParty / cac:Party / cac:PostalAddress / cac:Country / cbc:IdentificationCode 1..1 if its


parent context
exists
cac:AccountingSupplierParty / cac:Party / cac:PartyTaxScheme / cbc:CompanyID 1..1 if its
parent context
where cac:AccountingSupplierParty / cac:Party / cac:PartyTaxScheme / cac:TaxScheme = VAT exists

cac:AccountingSupplierParty / cac:Party / cac:PartyLegalEntity / cbc:RegistrationName 1..1


cac:AccountingSupplierParty / cac:Party / cac:PartyIdentification / cbc:ID 0..1

where attribute schemeID = HQ


cac:AccountingCustomerParty / cac:Party / cac:PartyIdentification / cbc:ID 0..*

where attribute "schemeID" is according to the description

cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:StreetName 0..1

cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:AdditionalStreetName 0..1

cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:BuildingNumber 0..1


cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:PlotIdentification 0..1

cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:CityName 0..1

cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:PostalZone 0..1

cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:CountrySubentity 0..1


cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cbc:CitySubdivisionName 0..1

cac:AccountingCustomerParty / cac:Party / cac:PostalAddress / cac:Country / cbc:IdentificationCode 1..1 if its


parent context
exists
cac:AccountingCustomerParty / cac:Party / cac:PartyTaxScheme / cbc:CompanyID 1..1 if its
parent context
where cac:AccountingCustomerParty / cac:Party / cac:PartyTaxScheme / cac:TaxScheme = VAT exists
cac:AccountingCustomerParty / cac:Party / cac:PartyLegalEntity / cbc:RegistrationName 1..1 if its
parent context
exists
cac:Delivery / cbc:ActualDeliveryDate 0..1

cac:Delivery / cbc:LatestDeliveryDate 0..1


cac:PaymentMeans / cbc:PaymentMeansCode 1..1

cac:PaymentMeans / cbc:InstructionNote 0..*

cac:PaymentMeans / cac:PayeeFinancialAccount / cbc:PaymentNote 0..1


cac:AllowanceCharge / cbc:ChargeIndicatorr 1..1 if its
parent context
exists

cac:AllowanceCharge / cbc:MultiplierFactorNumeric 0..1

cac:AllowanceCharge / cbc:Amount 1..1 if its


parent context
exists
cac:AllowanceCharge / cbc:Amount @currencyID 1..1 if its
parent context
exists
cac:AllowanceCharge / cbc:BaseAmount 0..1

cac:AllowanceCharge / cbc:BaseAmount @currencyID 1..1 if its


parent context
exists
cac:AllowanceCharge / cac:TaxCategory / cbc:ID 1..1 if its
parent context
exists
cac:AllowanceCharge / cac:TaxCategory / cbc:Percent 1..1 if its
parent context
exists

cac:AllowanceCharge / cac:TaxCategory / cac:TaxScheme / cbc:ID 1..1 if its


parent context
exists
cac:LegalMonetaryTotal / cbc:LineExtensionAmount 1..1

cac:LegalMonetaryTotal / cbc:LineExtensionAmount @currencyID 1..1

cac:LegalMonetaryTotal / cbc:AllowanceTotalAmount 0..1

cac:LegalMonetaryTotal / cbc:AllowanceTotalAmount @currencyID 1..1 if its


parent context
exists
cac:LegalMonetaryTotal / cbc:TaxExclusiveAmount 1..1

cac:LegalMonetaryTotal / cbc:TaxExclusiveAmount @currencyID 1..1

cac:TaxTotal / cbc:TaxAmount 1..1


cac:TaxTotal / cbc:TaxAmount @currencyID 1..1

cac:TaxTotal / cbc:TaxAmount 1..1

cac:TaxTotal / cbc:TaxAmount @currencyID 1..1

cac:LegalMonetaryTotal / cbc:TaxInclusiveAmount 1..1

cac:LegalMonetaryTotal / cbc:TaxInclusiveAmount @currencyID 1..1

cac:LegalMonetaryTotal / cbc:PrepaidAmount 0..1


cac:LegalMonetaryTotal / cbc:PrepaidAmount @currencyID 1..1 if its
parent context
exists
cac:LegalMonetaryTotal / cbc:PayableAmount 1..1

cac:LegalMonetaryTotal / cbc:PayableAmount @currencyID 1..1

cac:TaxTotal / cac:TaxSubtotal / cbc:TaxableAmount 1..1

cac:TaxTotal / cac:TaxSubtotal / cbc:TaxableAmount /@currencyID 1..1


cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount 1..1

cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount /@currencyID 1..1

cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount / cac:TaxCategory / cbc:ID 1..1

cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount / cac:TaxCategory / cbc:Percent 1..1

cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount / cac:TaxCategory / cbc:TaxExemptionReasonCode 0..1

cac:TaxTotal / cac:TaxSubtotal / cbc:TaxAmount / cac:TaxCategory / cbc:TaxExemptionReason 0..1

cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cac:TaxScheme / cbc:ID 1..1

cac:InvoiceLine / cbc:ID 1..1


cac:InvoiceLine / cbc:InvoicedQuantity 0..1

cac:InvoiceLine / cbc:InvoicedQuantity @ unitCode 0..1

cac:InvoiceLine / cbc:LineExtensionAmount 1..1

cac:InvoiceLine / cbc:LineExtensionAmount @currencyID 1..1

cac:InvoiceLine / cac:AllowanceCharge / cbc:ChargeIndicator 1..1 if its


parent context
exists

cac:InvoiceLine / cac:AllowanceCharge / cbc:MultiplierFactorNumeric 0..1

cac:InvoiceLine / cac:AllowanceCharge / cbc:Amount 1..1 if its


parent context
exists
cac:InvoiceLine / cac:AllowanceCharge / cbc:Amount @currencyID 1..1 if its
parent context
exists
cac:InvoiceLine / cac:AllowanceCharge / cbc:BaseAmount 0..1

cac:InvoiceLine / cac:AllowanceCharge / cbc:BaseAmount @currencyID 1..1 if its


parent context
exists
cac:InvoiceLine / cac:TaxTotal / cbc:TaxAmount 1..1 if its
parent context
exists

cac:InvoiceLine / cac:TaxTotal / cbc:TaxAmount @currencyID 1..1 if its


parent context
exists
cac:InvoiceLine / cac:TaxTotal / cbc:RoundingAmount 0..1

cac:InvoiceLine / cac:TaxTotal / cbc:RoundingAmount @curencyID 1..1 if its


parent context
exists
cac:InvoiceLine / cac:Item / cbc:Name 1..1 if its
parent context
exists

cac:InvoiceLine / cac:Item / cac:BuyersItemIdentification / cbc:ID 1..1 if its


parent context
exists
cac:InvoiceLine / cac:Item / cac:SellersItemIdentification / cbc:ID 1..1 if its
parent context
exists
cac:InvoiceLine / cac:Item / cac:StandardItemIdentification / cbc:ID 1..1 if its
parent context
exists

cac:InvoiceLine / cac:Price / cbc:PriceAmount 1..1

cac:InvoiceLine / cac:Price / cbc:PriceAmount @ schemeID 1..1


cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cbc:ID 1..1

cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cbc:Percent 1..1

cac:InvoiceLine / cac:Item / cac:ClassifiedTaxCategory / cac:TaxScheme / cbc:ID 1..1


cac:InvoiceLine / cac:Price / cbc:BaseQuantity 0..1

cac:InvoiceLine / cac:Price / cbc:BaseQuantity @unitCode 0..1

cac:InvoiceLine / cac:Price / cac:AllowanceCharge / cbc:ChargeIdicator 1..1 if its


parent context
exists

cac:InvoiceLine / cac:Price / cac:AllowanceCharge / cbc:Amount 1..1 if its


parent context
exists

cac:InvoiceLine / cac:Price / cac:AllowanceCharge / cbc:Amount @ currencyID 1..1 if its


parent context
exists
cac:InvoiceLine / cac:Price / cac:AllowanceCharge / cbc:BaseAmount 1..1 if its
parent context
exists
cac:InvoiceLine / cac:Price / cac:AllowanceCharge / cbc:BaseAmount @ currencyID 1..1 if its
parent context
exists
Business requirements and rules KSA context
EN 16931 Rules KSA Rules KSA status (Mandatory / Optional / Conditional / Not applicabl
XML format

Data type Tax invoice Debit note Credit note Simplified


(tax (tax invoice
invoice) invoice)
Text BR-KSA-EN16931-01 M M M M

Identifier BR-02 M M M M

Identifier BR-KSA-03 M M M M

Date BR-03 BR-KSA-04 M M M M


BR-KSA-F-01

Time BR-KSA-70 M M M M

String BR-04 BR-KSA-05 M M M M


BR-CL-01
String BR-KSA-06 M M M M
BR-KSA-07
BR-KSA-31

Text O O O O

Code BR-05 BR-KSA-CL-02 M M M M


BR-CL-04
Code BR-CL-05 BR-KSA-EN16931-02 M M M M
BR-KSA-68

Identifier O O O O

Text BR-55 BR-KSA-56 NA M M NA

Identifier O O O O

Identifier BR-KSA-33 M M M M
BR-KSA-34
Text BR-KSA-26 M M M M
BR-KSA-61

Text BR-KSA-27 M M M M
Complex tag Digital Identity Standards M M M M
BR-KSA-28
BR-KSA-29
BR-KSA-30
BR-KSA-60

Identifier BR-KSA-39 C C C C
BR-KSA-41
Identifier BR-KSA-08 C C C C

Text BR-08 BR-KSA-09 M M M M

Text BR-08 O O O O

Text BR-08 BR-KSA-09 M M M M


BR-KSA-37
Text BR-08 BR-KSA-09 M M M M
BR-KSA-64
Text BR-08 BR-KSA-09 M M M M

Text BR-08 BR-KSA-09 M M M M


BR-KSA-66
Text BR-08 M M M M
Text BR-08 BR-KSA-09 M M M M

Code BR-08 BR-KSA-09 M M M M


BR-09 BR-KSA-38
BR-CL-14
Identifier BR-KSA-39 M M M M
BR-KSA-40

Text BR-06 M M M M
Identifier BR-KSA-45 C C C C
BR-KSA-46
Identifier BR-KSA-14 C C C C
BR-KSA-49

Text BR-10 BR-KSA-10 M M M O


BR-KSA-63

Text M M M O

Text BR-10 BR-KSA-10 M M M O


BR-KSA-63
Text BR-KSA-63 C C C O
BR-KSA-65
Text BR-10 BR-KSA-10 M M M O
BR-KSA-63

Text BR-10 BR-KSA-10 M M M O


BR-KSA-63
BR-KSA-67
Text M M M O
Text BR-KSA-63 M M M O

Code BR-CL-14 BR-KSA-10 M M M O


BR-10 BR-KSA-62
BR-KSA-63
Identifier BR-KSA-44 C C C O
BR-KSA-46

Text BR-KSA-25 M M M C
BR-KSA-42

Date BR-KSA-15 O O O O
BR-KSA-F-01

Date BR-KSA-F-01 O O O O
BR-KSA-35
BR-KSA-36
Code BR-49 BR-KSA-16 M M M O
BR-CL-16

Text BR-KSA-17 NA M M NA

Text O O O O
boolean BR-KSA-F-02 C C C C

Percentage BR-KSA-DEC-01 C C C C
BR-KSA-EN16931-05

Amount BR-31 BR-KSA-EN16931-03 C C C C


BR-DEC-01 BR-KSA-F-04

Code BR-CL-03 BR-KSA-CL-02 C C C C

Amount BR-DEC-02 BR-KSA-F-04 C C C C


BR-KSA-EN16931-04

Code BR-CL-03 BR-KSA-CL-02 C C C C


BR-KSA-EN16931-04

Code BR-32 BR-KSA-18 C C C C


BR-O-13
Percentage BR-S-06 BR-KSA-DEC-02 C C C C
BR-Z-06
BR-E-06
BR-O-06
string BR-KSA-54 C C C C

Amount BR-CO-10 BR-KSA-F-04 M M M M


BR-DEC-09

Code BR-CL-03 BR-KSA-CL-02 M M M M

Amount BR-CO-11 BR-KSA-F-04 C C C C


BR-DEC-10

Code BR-CL-03 BR-KSA-CL-02 C C C C

Amount BR-13 BR-KSA-F-04 M M M M


BR-CO-13
BR-DEC-12
Code BR-CL-03 BR-KSA-CL-02 M M M M

Amount BR-CO-14 BR-KSA-EN16931-08 M M M M


BR-DEC-13 BR-KSA-EN16931-09
BR-KSA-F-04
BR-KSA-55
Code BR-CL-03 BR-KSA-CL-02 M M M M

Code BR-53 BR-KSA-EN16931-08 M M M M


BR-DEC-15 BR-KSA-EN16931-09
BR-KSA-F-04
BR-KSA-55

Amount BR-CL-03 BR-KSA-CL-02 M M M M

Amount BR-14 BR-KSA-F-04 M M M M


BR-CO-15
BR-DEC-14

Code BR-CL-03 BR-KSA-CL-02 M M M M

Amount BR-DEC-16 O O O O
Code BR-CL-03 BR-KSA-CL-02 C C C C

Amount BR-15 BR-KSA-F-04 M M M M


BR-CO-16
BR-DEC-18

Code BR-CL-03 BR-KSA-CL-02 C C C C

Amount BR-45 BR-KSA-F-04 M M M M


BR-S-08
BR-Z-08
BR-E-08
BR-O-08
BR-DEC-19
BR-CO-18

Code BR-CL-03 BR-KSA-CL-02 M M M M


Amount BR-46 BR-KSA-F-04 M M M M
BR-CO-17
BR-S-09
BR-Z-09
BR-E-09
BR-O-09
BR-DEC-20
BR-CO-18

Code BR-CL-03 BR-KSA-CL-02 M M M M


BR-CO-18
Code BR-47 BR-KSA-18 M M M M
BR-S-01
BR-Z-01
BR-E-01
BR-O-01
BR-CO-18
Percentage BR-48 BR-KSA-DEC-02 M M M M
BR-CO-18

Code BR-KSA-CL-04 C C C C
BR-KSA-CL-05

Text BR-S-10 BR-KSA-69 C C C C


BR-E-10
BR-O-10

string BR-CO-18 BR-KSA-54 M M M M

Identifier BR-21 M M M M
BR-16
Quantity BR-22 BR-KSA-F-04 M M M M

string O O O O

Amount BR-24 BR-KSA-EN16931-11 M M M M


BR-DEC-23 BR-KSA-F-04

Code BR-CL-03 BR-KSA-CL-02 M M M M

boolean BR-KSA-F-02 C O O O

Percentage BR-KSA-DEC-01 C O O O
BR-KSA-EN16931-05
BR-KSA-EN16931-04

Amount BR-41 BR-KSA-EN16931-03 C O O O


BR-DEC-24 BR-KSA-F-04

Code BR-CL-03 BR-KSA-CL-02 C O O O


Amount BR-DEC-25 BR-KSA-F-04 C O O O
BR-KSA-EN16931-04

Code BR-CL-03 BR-KSA-CL-02 C O O O

Amount BR-KSA-DEC-03 M M M O
BR-KSA-F-04
BR-KSA-50
BR-KSA-52
Code BR-KSA-CL-01 M M M O
BR-KSA-CL-02

Amount BR-KSA-DEC-04 M M M O
BR-KSA-F-04
BR-KSA-51
BR-KSA-53
Code BR-KSA-CL-01 M M M O
BR-KSA-CL-02

Text BR-25 M M M M

Identifier O O O O

Identifier O O O O
Identifier O O O O

Amount BR-26 BR-KSA-EN16931-07 M M M M


BR-KSA-DEC-05
BR-KSA-F-04

Code BR-CL-03 BR-KSA-CL-02 M M M M


Code BR-CO-04 BR-KSA-18 M M M M
BR-O-12
BR-CL-18
Percentage BR-S-05 BR-KSA-DEC-02 M M M M
BR-Z-05 BR-KSA-F-04
BR-E-05
BR-O-05

string BR-KSA-54 M M M M
Quantity BR-KSA-F-04 O O O O

Code O O O O

Boolean BR-KSA-EN16931-06 C C C C

Amount BR-KSA-F-04 C C C C

Code BR-CL-03 BR-KSA-CL-02 C C C C

Amount BR-KSA-F-04 C C C C

Code BR-CL-03 BR-KSA-CL-02 C C C C


itional / Not applicable) in the KSA specific format Visibility on Invoice for Tax invoices and
associated credit and debit notes

Debit note Credit note


(simplified (simplified
tax invoice) tax invoice)
M M Not Required

M M Required

M M letters, digits and dashes Not Required

M M Required

M M HH:mm:ss Not Required

M M Subset of UN/CEFACT code list 1001, D.16B Not Required


(The invoice type -not the code- will be printed
in the title)
M M Structure: Required
NNPNESB
where
NN (positions 1 and 2) = invoice subtype:
- 01 for tax invoice
- 02 for simplified tax invoice
P (position 3) = 3rd Party invoice transaction, 0
for false, 1 for true
N (position 4) = Nominal invoice transaction, 0
for false, 1 for true
E (position 5) = Exports invoice transaction, 0
for false, 1 for true
S (position 6) = Summary invoice transaction, 0
for false, 1 for true
B (position 7) = Self-billed invoice transaction, )
for false, 1 for true

O O Not Required

M M Not Required
M M ISO 4217 Currency codes Not Required

O O Not Required

M M free text Required

O O Not Required

M M numeric Not Required


M M Not Required

M M Required
M M Not Required

C C number / arabic numerals Required


C C alphanumeric Required

M M Required

O O Required

M M Required

M M fix 4 digits Required

M M Required

M M fix 5 digits Required

M M Required
M M Required

M M Required

M M Required

M M Required
C C number / arabic numerals Required
C C alphanumeric Required

O O Required

O O Required

O O Required
O O Required

O O Required

O O Required

O O Required
O O Required

O O Required

O O Required

C C Required

O O Required

O O Required
O O subset of UNRDID 4461 Not Required

M M string Not Required

O O Not Required
C C Not Required

C C Upto 2 decimal places, in Arabic numerals (The Not Required


following numerals: 1234567890)
Value between 0.00 and 100.00

C C Up to 2 decimal places, Arabic numerals (EX: Required


123456)
Maximum 14 characters
C C Required

C C Up to 2 decimal places, Arabic numerals (EX: Not Required


123456)
Maximum 14 characters

C C Not Required

C C Subset of UNCL5305 Not Required


C C Upto 2 decimal places, in Arabic numerals (EX: Not Required
123456)
Value between 0.00 and 100.00

C C Not Required

M M In Arabic numerals (The following numerals: Not Required


1234567890)

M M Not Required

C C In Arabic numerals (The following numerals: Required


1234567890)

C C Required

M M In Arabic numerals (The following numerals: Required


1234567890)

M M Required

M M In Arabic numerals (The following numerals: Not Required


1234567890)
M M Not Required

M M Required

M M In Arabic numerals (The following numerals: Required


1234567890)

M M In Arabic numerals (The following numerals: Required


1234567890)

M M Required

O O In Arabic numerals (The following numerals: Not Required


1234567890)
C C Not Required

M M In Arabic numerals (The following numerals: Required


1234567890)

C C Required

M M In Arabic numerals (The following numerals: Not Required


1234567890)

M M Not Required
M M In Arabic numerals (The following numerals: Not Required
1234567890)

M M Not Required

M M Subset of UNCL5305 Required

M M Upto 2 decimal places, in Arabic numerals (EX: Required


123456)
Value between 0.00 and 100.00

C C Not Required

C C Required

M M Not Required

M M Not Required
M M Integer, In Arabic numerals (The following Required
numerals: 1234567890)

O O Not Required

M M Up to 2 decimal places, Arabic numerals (EX: Required


123456)
Maximum 14 characters

M M Required

O O Not Required

O O Upto 2 decimal places, in Arabic numerals (EX: Not Required


123456)
Value between 0.00 and 100.00

O O Up to 2 decimal places, Arabic numerals (EX: Required


123456)
Maximum 14 characters
O O Required
O O Up to 2 decimal places, Arabic numerals (EX: Not Required
123456)
Maximum 14 characters

O O Not Required

O O Upto 2 decimal places, in SAR, in Arabic Required


numerals (EX: 123456)

O O Required

O O Upto 2 decimal places, in SAR, in Arabic Required with a statement saying “inclusive of
numerals (EX: 123456) VAT”

O O Required

M M Required

O O Not Required

O O Not Required
O O Not Required

M M Up to 2 decimal places, Arabic numerals (EX: Not Required


123456)
Maximum 14 characters

M M Not Required
M M Subset of UNCL5305 Not Required

M M Upto 2 decimal places, in Arabic numerals (EX: Required


123456)
Value between 0.00 and 100.00

M M Not Required
O O In Arabic numerals (The following numerals: Not Required
1234567890)

O O Not Required

C C Not Required

C C In Arabic numerals (The following numerals: Not Required


1234567890)

C C Not Required

C C In Arabic numerals (The following numerals: Not Required


1234567890)

C C Not Required
Visibility on human readable formats for
Simplified Tax invoices and associated
credit and debit notes

Not Required

Required

Not Required

Required

Not Required

Not Required
(The invoice type -not the code- will be printed
in the title)
Required

Not Required

Not Required
Not Required

Not Required

Required

Not Required

Not Required
Not Required

Required
Not Required

Required
Required

Required

Required

Required

Required

Required

Required

Required
Required

Required

Required

Required
Not Required
Required

Not Required

Not Required

Not Required
Not Required

Not Required

Not Required

Not Required
Not Required

Not Required

Not Required

Required

Not Required

Not Required
Not Required

Required

Not Required
Not Required

Not Required

Required

Required

Not Required

Not Required

Not Required
Not Required

Not Required

Not Required

Not Required

Not Required

Not Required

Required

Required

Not Required
Not Required

Required

Required

Required

Required

Not Required
Not Required

Required

Required

Not Required

Not Required
Not Required

Not Required

Not Required

Not Required

Not Required

Required

Not Required

Not Required
Required

Not Required

Not Required

Required

Not Required

Not Required

Required

Required
Not Required

Not Required

Not Required

Not Required

Required with a statement saying “inclusive of


VAT”

Required

Required

Not Required

Not Required
Not Required

Not Required

Not Required
Not Required

Required

Not Required
Not Required

Not Required

Not Required

Not Required

Not Required

Not Required

Not Required
Example

Default value
reporting:1.0

2021/02/12/1230

3cf5ee18-ee25-44ea-a444-2c37ba7f28be

2021-02-25

16:55:24

380
010100

Unstructured text

SAR
SAR

161313031

156166151

161313031

46531
NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ==

AQkxMjM0NTY3ODkCCjEyLzEyLzIwMjADBDEwMDADAzE1MPaIn2Z2jg6VqWvWV6IrZZNzLF7xvZrWXW5xRV5yFY2xFu0ycXOiyqV0k7Ws
Q1MxIAAAAGKblFMh9nFRSn8tvftXqo9zRSz2VEAPITSZ3W7UDHKhUx+7yXGijLtJSZGXMOc+jpKwARzDl68GmmRd75NWdOs=
In the UBL extension
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI>
<ext:ExtensionContent>
<sig:UBLDocumentSignatures xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2">
<sac:SignatureInformation>
<cbc:ID>urn:oasis:names:specification:ubl:signature:1</cbc:ID>
<sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice</sbc:ReferencedSignatureID>
<ds:Signature Id="signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference Id="invoiceSignedData" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::ext:UBLExtensions)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::cac:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR'])</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>tIgyb6RmuRm+rvj8tL5cbwK5eRk=</ds:DigestValue>
</ds:Reference>
3xxxxxxxxx1xxx3
456789123

Main street 1

Riyadh

72415

Riyadh Region
District A

SA

3xxxxxxxxx00003

SELLER SA
3xxxxxxxxx1xxx3
456789123

Main street 1

PO Box 14
Riyadh

Riyadh Region
District B

SA

3xxxxxxxxx00003

BUYER SA

2021-02-26

2021-02-26
30

Cancellation

Payment by credit
Fixed value "false"

20

24

SAR

120

SAR

S
20

VAT

4200.00

SAR

300

SAR

4000.00

SAR

800.00
SAR

800.00

SAR

4800.00

SAR

100
SAR

4701.52

SAR

200

SAR
40

SAR

20.00

Exemption reason

VAT

1
4

PCE

2000

SAR

Fixed value "false"

20.000000

24.34

SAR
120.34

SAR

20.04

SAR

20.04

SAR

Item name

1234567

123456
1234567891234

50.24

SAR
S

20

VAT
1

PCE

Fixed value "false"

10

SAR

60.25

SAR
In the UBL extension
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI>
<ext:ExtensionContent>
<sig:UBLDocumentSignatures xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggre
xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2" xmlns:sig="urn:oasis:n
<sac:SignatureInformation>
<cbc:ID>urn:oasis:names:specification:ubl:signature:1</cbc:ID>
<sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice</sbc:ReferencedS
<ds:Signature Id="signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference Id="invoiceSignedData" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::ext:UBLExtensions)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::cac:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR'])</ds:
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>tIgyb6RmuRm+rvj8tL5cbwK5eRk=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties" URI="#xades
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>skZ+8g6hyUFzbbTZvJZRyAREMiM=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>

<ds:SignatureValue>J3dQSz3nEQd8wagH2CBlip1fj03NTccYAQTGiU/4IhBYzylKxjB09OMBb5vXj2Lv7eXhciRoMmvSF
XTjvFEBcHVgpt/5wDC8U3PwNfx9hzpU00t/b042GyLECGjPDzr8mGbI09mobT7sSb9oPPzxsC71dph+oU0ug+TAh2N
lrU+NRr5kQA==</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>

<ds:X509Certificate>MIIDaDCCAlCgAwIBAgIKlswlvJ8beIpd9jANBgkqhkiG9w0BAQsFADBiMRkwFwYDVQQDExBNb
QEWDFRlc3RAcHdjLmNvbTELMAkGA1UEBhMCQUUwHhcNMjEwMjI1MTI1NjU3WhcNMjYwMjI1MTI1NjU3WjBiM
AxGzAZBgkqhkiG9w0BCQEWDFRlc3RAcHdjLmNvbTELMAkGA1UEBhMCQUUwggEiMA0GCSqGSIb3DQEBAQUAA4
h7UE+B2ClyW+CRixDx82Qkn9IUX+nw28QO7ux9UBDt3nIeL6euAUPMxrnyESALXXRjTLrJK3p6vsFr3hNbP4V0t/ZDA
+XC3bYmysTPbAgPZ/vT1UgeolOrvnsEKeDR8w43C1Juuw9CVi3duekYf1WVjfuNNClocjZ0N4D7dYdg536bqtc4F8C6s
AQDAgeAMA0GCSqGSIb3DQEBCwUAA4IBAQDACtfjpOtcy5dPp1tS31rB9lJ7aeQ6dayxJGyXGovhjYZ8N60sAR/0Yfe1
wFM0qWErTCh/5wA/GHgqRKjWUA/S2P7UbKbjIA5Ba6N3K/zT4DfspxvvCp50jigPyh1e/UilQdexNFUmkUyZBisKEhp
zilUhJ7GouDYKj3PnUzLMCSd</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties Target="signature" xmlns:xades="http://uri.etsi.org/01903/v1.3.2
<xades:SignedProperties Id="xadesSignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2021-02-25T12:57:51Z</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>p6/1GNOqntK37JwfUub56vSecg0=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<xades:SignedProperties Id="xadesSignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2021-02-25T12:57:51Z</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>p6/1GNOqntK37JwfUub56vSecg0=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>C=SA, E=Test@test Taxpayer.com, OU=&quot;&quot;, O=te
<ds:X509SerialNumber>1234</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
</sac:SignatureInformation>
</sig:UBLDocumentSignatures>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>

In the main UBL


<cac:Signature>
<cbc:ID>urn:oasis:names:specification:ubl:signature:Invoice</cbc:ID>
<cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades</cbc:SignatureMethod>
</cac:Signature>
xades</ext:ExtensionURI>
tion:ubl:schema:xsd:SignatureAggregateComponents-2"
mponents-2" xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2">

>
:signature:Invoice</sbc:ReferencedSignatureID>
00/09/xmldsig#">

rg/2006/12/xml-c14n11"/>
1/04/xmldsig-more#rsa-sha256"/>

99/REC-xpath-19991116">
s)</ds:XPath>

99/REC-xpath-19991116">
s:XPath>

99/REC-xpath-19991116">
cumentReference[cbc:ID='QR'])</ds:XPath>

12/xml-c14n11"/>

/04/xmlenc#sha256"/>
DigestValue>

g#SignatureProperties" URI="#xadesSignedProperties">
/04/xmlenc#sha256"/>
:DigestValue>

xjB09OMBb5vXj2Lv7eXhciRoMmvSF+A9eIUd2a4b5aEm7VBkxIbyGgltNHR8u3oZ7Ee+HNWRAQU+IFCKpZoVA68Bo/g4Gy3pqNQoC7AOghUU
7sSb9oPPzxsC71dph+oU0ug+TAh2NheVih+HWCe870hFJvH3mZ9YcC/lcMXb80Ot+LSjgV8gcTSDz/BaOYLjEGvZrOxmoK2doUZNPi811tbq6nC4j

BAQsFADBiMRkwFwYDVQQDExBNb2hkIEtoYWxpZmEgUDEyMRAwDgYDVQQKEwd0ZXMgcHdjMQkwBwYDVQQLEwAxGzAZBgkqhkiG9w0BC
jU3WhcNMjYwMjI1MTI1NjU3WjBiMRkwFwYDVQQDExBNb2hkIEtoYWxpZmEgUDEyMRAwDgYDVQQKEwd0ZXMgcHdjMQkwBwYDVQQLEw
wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDWaRBaLHqhlZDDAf+YH2H2xgtHT9tMcg3vmGuP4YT2aeG77RWnIu0bqtNiNrOK+p
ALXXRjTLrJK3p6vsFr3hNbP4V0t/ZDAtk36PAn6WfKZICMI63GnzWLAQz6QOGvVmOYNym93Q84W9Ttn844yfun1EVj/
NNClocjZ0N4D7dYdg536bqtc4F8C6sBmk/2YfG/Fsqb6DSU0FU1dSj+rjZvaR6tIDAgMBAAGjIDAeMA8GCSqGSIb3LwEBCgQCBQAwCwYDVR0PB
Q6dayxJGyXGovhjYZ8N60sAR/0Yfe1EkjbFLV25AGw/06jZV7Fy8jK2jR7TJnv2QnxZz4ldg2k8DolC6J4YZqI5R0THFnd09MNHcgV6ChGJNzivRRkTr
igPyh1e/UilQdexNFUmkUyZBisKEhpdHURHCJY2ip0iH8wZtG4oiGtisLEHJT+ZREWIzjTUKlw9ImXu2e4ptzrPBPLMGdWdQ153YCkXFKLbV97JBU

es="http://uri.etsi.org/01903/v1.3.2#">

SigningTime>

3.org/2001/04/xmlenc#sha256"/>
Secg0=</ds:DigestValue>
SigningTime>

3.org/2001/04/xmlenc#sha256"/>
Secg0=</ds:DigestValue>

payer.com, OU=&quot;&quot;, O=test Taxpayer, CN=EGS0001</ds:X509IssuerName>


Number>

d:xades</cbc:SignatureMethod>
-2">

ZoVA68Bo/g4Gy3pqNQoC7AOghUU
EGvZrOxmoK2doUZNPi811tbq6nC4jj

wYDVQQLEwAxGzAZBgkqhkiG9w0BC
wd0ZXMgcHdjMQkwBwYDVQQLEw
GuP4YT2aeG77RWnIu0bqtNiNrOK+p
44yfun1EVj/
GSIb3LwEBCgQCBQAwCwYDVR0PB
R0THFnd09MNHcgV6ChGJNzivRRkTr
PBPLMGdWdQ153YCkXFKLbV97JBU

You might also like