E-Invoice Models

ParameterData TypeField ValidationsDescription
DeviceIDstringMandatory.DeviceId is mandatory must be registered and activated.
EInvoiceDTOobjectMandatory.E-Invoice object.

EInvoiceDTO Object

ParameterData TypeField ValidationsDescription
InvoiceNumberstringMandatory.Invoice Number
UUIDuuidMandatory, should be uniqA unique identifier for the invoice.
IssuedDateTimeDateTimeMandatory.date and time when the invoice was issued.
InvoiceTypeCodestringMandatory, The value must be either 0200000 or 0100000.Invoice type code :
0200000 indicates a B2C (Business-to-Consumer) transaction.
0100000 indicates a B2B (Business-to-Business) transaction.
InvoiceTypeValuestringMandatory

388 indicates (Tax invoice).
386 indicates (Prepayment Invoice).
383 indicates (Debit note).
381 indicates (Credit note).

DocumentCurrencyCodestringMandatory.indicates the currency used in the invoice. "SAR" is the default currency. "USD" (US Dollar) is also accepted.
TaxCurrencyCodestringMandatory.Must be "SAR"
SupplierInfoObjectMandatory.contain valid information about the supplier like VAT and CRN.
CustomerInfoObjectMandatory if the invoice type was B2Bcontain valid information about the customer like VAT and CRN
PaymentMeansList of PaymentMeansMandatoryan invoice must contain one or more Payment instruction
AllowanceChargesList of
AllowanceCharges
Mandatory, if the invoice contain fees or discount objects detailing all charges or discounts applied to the invoice.
LegalMonetaryTotalObjectMandatory.the invoice level totals inclusive Amount exlusive amount check the LegalMonetaryTotal table.
TaxTotalsList of TaxTotalMandatory. if not passed on the invoice linesInvoice total VAT amount
InvoiceLinesList of InvoiceLinesMandatorysingle line item on an invoice, Incorporating all the necessary details that describe individual products or services sold.

SupplierInfo and CustomerInfo Objects

ParameterData TypeField ValidationsDescription
CRNstringMandatory-
VATstringValid VAT - 15 digits, starting and ending with 3VAT or Group VAT Registration Number.
RegistrationNamestringMandatoryTaxpayer/Organization Name.
PartyPostalAddressObjectMandatorythe postal address details for Taxpayer/Organization

PaymentMeans

ParameterData TypeField ValidationsDescription
CodeintMandatoryThe value must be one of the following specific two-digit codes:
10 - In cash
30 - Credit
42 - Payment to bank account etc...
InstructionNotestringOptionalOptional.

LegalMonetaryTotal Object

ParameterData TypeField ValidationsDescription
LineExtensionAmountMoney ObjectMandatoryInvoice total exclusive of vat before discounts or additional fees added
TaxExclusiveAmountMoney ObjectMandatoryTotal exclusive amount of the invoice after invoice allowance charge is applied.
TaxInclusiveAmountMoney ObjectMandatorythe total amount of the invoice including all applicable taxes
AllowanceTotalAmountMoney ObjectMandatoryThe total allowances on the invoice level, if any.
PrepaidAmountMoney ObjectMandatoryAny payments made in advance toward the total amount due for the transaction.
PayableAmountMoney ObjectMandatoryinvoice inclusive of vat and allowance charge final amount that is actually due for payment after considering all other factors like allowances, taxes, and prepaid amounts.

TaxTotal Object

ParameterData TypeField ValidationsDescription
TaxAmountMoneyMandatoryThe amount of tax on the invoice after all operations, such as discounts and if it is tax-exempt.
RoundingAmountMoneyMandatoryThe total of the invoice after all opretions such as disscount and if it is tax-exempt
TaxSubtotalsList of TaxSubtotalMandatoryspicify all the tax category applied on this invoice


InvoiceLine Object

ParameterData TypeField ValidationsDescription
IDstringMandatoryholds a unique identifier for the line item within the invoice
ItemNameMultilingualDataMandatorystores the name of the item in arabic - "ar" and english "en"
InvoicedQuantitydecimalMandatoryrepresents the quantity of the item sold.
UnitCodestringOptionalspecifies the unit of measurement for the invoiced item, using standard codes like "KG" for kilograms, "L" for liters. The default "PCE" for piece
LineExtensionAmountMoney ObjectMandatoryTotal after discount, excluding VAT.
TaxAmountMoney ObjectMandatoryVat amount after discount.
RoundingAmountMoney ObjectMandatoryTotal including VAT after discount. (either up or down)
TaxCategoryTaxCategoryMandatoryThis property specifies the tax applicable to the item, such as standard, reduced, zero rate.
PriceAmountMoney ObjectMandatoryDiscounted unit price excluding VAT.
AllowanceChargeAllowanceCharge ObjectOptionaldetails any allowances (discounts) or charges (additional fees) that apply specifically to this line item, this field is mandatory if there is an additional cost or any discount applied