| Parameter | Data Type | Field Validations | Description |
|---|---|---|---|
| DeviceID | string | Mandatory. | DeviceId is mandatory must be registered and activated. |
| EInvoiceDTO | object | Mandatory. | E-Invoice object. |
EInvoiceDTO Object
| Parameter | Data Type | Field Validations | Description |
|---|---|---|---|
| InvoiceNumber | string | Mandatory. | Invoice Number |
| UUID | uuid | Mandatory, should be uniq | A unique identifier for the invoice. |
| IssuedDateTime | DateTime | Mandatory. | date and time when the invoice was issued. |
| InvoiceTypeCode | string | Mandatory, 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. |
| InvoiceTypeValue | string | Mandatory | 388 indicates (Tax invoice). |
| DocumentCurrencyCode | string | Mandatory. | indicates the currency used in the invoice. "SAR" is the default currency. "USD" (US Dollar) is also accepted. |
| TaxCurrencyCode | string | Mandatory. | Must be "SAR" |
| SupplierInfo | Object | Mandatory. | contain valid information about the supplier like VAT and CRN. |
| CustomerInfo | Object | Mandatory if the invoice type was B2B | contain valid information about the customer like VAT and CRN |
| PaymentMeans | List of PaymentMeans | Mandatory | an invoice must contain one or more Payment instruction |
| AllowanceCharges | List of AllowanceCharges | Mandatory, if the invoice contain fees or discount | objects detailing all charges or discounts applied to the invoice. |
| LegalMonetaryTotal | Object | Mandatory. | the invoice level totals inclusive Amount exlusive amount check the LegalMonetaryTotal table. |
| TaxTotals | List of TaxTotal | Mandatory. if not passed on the invoice lines | Invoice total VAT amount |
| InvoiceLines | List of InvoiceLines | Mandatory | single line item on an invoice, Incorporating all the necessary details that describe individual products or services sold. |
SupplierInfo and CustomerInfo Objects
| Parameter | Data Type | Field Validations | Description |
|---|---|---|---|
| CRN | string | Mandatory | - |
| VAT | string | Valid VAT - 15 digits, starting and ending with 3 | VAT or Group VAT Registration Number. |
| RegistrationName | string | Mandatory | Taxpayer/Organization Name. |
| PartyPostalAddress | Object | Mandatory | the postal address details for Taxpayer/Organization |
PaymentMeans
| Parameter | Data Type | Field Validations | Description |
|---|---|---|---|
| Code | int | Mandatory | The value must be one of the following specific two-digit codes: 10 - In cash 30 - Credit 42 - Payment to bank account etc... |
| InstructionNote | string | Optional | Optional. |
LegalMonetaryTotal Object
| Parameter | Data Type | Field Validations | Description |
|---|---|---|---|
| LineExtensionAmount | Money Object | Mandatory | Invoice total exclusive of vat before discounts or additional fees added |
| TaxExclusiveAmount | Money Object | Mandatory | Total exclusive amount of the invoice after invoice allowance charge is applied. |
| TaxInclusiveAmount | Money Object | Mandatory | the total amount of the invoice including all applicable taxes |
| AllowanceTotalAmount | Money Object | Mandatory | The total allowances on the invoice level, if any. |
| PrepaidAmount | Money Object | Mandatory | Any payments made in advance toward the total amount due for the transaction. |
| PayableAmount | Money Object | Mandatory | invoice 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
| Parameter | Data Type | Field Validations | Description |
|---|---|---|---|
| TaxAmount | Money | Mandatory | The amount of tax on the invoice after all operations, such as discounts and if it is tax-exempt. |
| RoundingAmount | Money | Mandatory | The total of the invoice after all opretions such as disscount and if it is tax-exempt |
| TaxSubtotals | List of TaxSubtotal | Mandatory | spicify all the tax category applied on this invoice |
InvoiceLine Object
| Parameter | Data Type | Field Validations | Description |
|---|---|---|---|
| ID | string | Mandatory | holds a unique identifier for the line item within the invoice |
| ItemName | MultilingualData | Mandatory | stores the name of the item in arabic - "ar" and english "en" |
| InvoicedQuantity | decimal | Mandatory | represents the quantity of the item sold. |
| UnitCode | string | Optional | specifies the unit of measurement for the invoiced item, using standard codes like "KG" for kilograms, "L" for liters. The default "PCE" for piece |
| LineExtensionAmount | Money Object | Mandatory | Total after discount, excluding VAT. |
| TaxAmount | Money Object | Mandatory | Vat amount after discount. |
| RoundingAmount | Money Object | Mandatory | Total including VAT after discount. (either up or down) |
| TaxCategory | TaxCategory | Mandatory | This property specifies the tax applicable to the item, such as standard, reduced, zero rate. |
| PriceAmount | Money Object | Mandatory | Discounted unit price excluding VAT. |
| AllowanceCharge | AllowanceCharge Object | Optional | details 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 |