Generate Simplified E-Invoice Request (B2C)

Create a valid simplified E-Invoice using a JSON payload and submit it to our server for ZATCA reporting.

For detailed specifications of the data models used in the request.

🚧

This endpoint is specifically used for simplified e-invoices only (B2C) invoices

This endpoint is specifically used for simplified e-invoices only (B2C invoices). According to ZATCA, all simplified E-invoices must be reported to ZATCA within 24 hours from the time of their creation. This endpoint ensures compliance by automatically reporting the generated invoices within this timeframe.

Example Request

{
    "deviceId": "{DeviceId:UUID}",
    "eInvoiceDTO": {
        "invoiceNumber": "PSI25-00020",
        "uuid": "{TransactionId:UUID}",
        "invoiceTypeCode": "0200000",
        "invoiceTypeValue": "388",
        "issuedDateTime": "2024-06-23T17:58:26.115Z",
        "documentCurrencyCode": "SAR",
        "taxCurrencyCode": "SAR",
        "actualDeliveryDate": "2024-06-23T17:58:26.116Z",
        "latestDeliveryDate": "2024-06-23T17:58:26.116Z",
        "supplierInfo": {
            "vat": "{VAT}",
            "registrationName": "{CompanyName}",
            "crn": "{CRN}",
            "partyPostalAddress": {
                "streetName": "",
                "buildingNumber": "",
                "plotIdentification": "",
                "citySubdivisionName": "الرياض",
                "cityName": "",
                "postalZone": "",
                "countrySubentity": "SA",
                "country": "SA"
            }
        },
        "paymentMeans": [
            {
                "code": 42,
                "instructionNote": ""
            }
        ],
        "taxTotals": [
            {
                "taxAmount": {
                    "currencyCode": "SAR",
                    "amount": 0.38 
                },
                "roundingAmount": {
                    "currencyCode": "SAR",
                    "amount": 2.88 
                }
            },
            {
                "taxAmount": {
                    "currencyCode": "SAR",
                    "amount": 0.38 
                },
                "roundingAmount": {
                    "currencyCode": "SAR",
                    "amount": 2.88 
                },
                "taxSubtotals": [
                    {
                        "taxAmount": {
                            "currencyCode": "SAR",
                            "amount": 0.38
                        },
                        "taxableAmount": {
                            "currencyCode": "SAR",
                            "amount": 2.50
                        },
                        "taxCategory": {
                            "id": 0,
                            "percent": 15,
                            "taxSchemeId": "VAT"
                        }
                    }
                ]
            }
        ],
        "allowanceCharges": [
            {
                "chargeIndicator": false, 
                "allowanceChargeReason": "discount", 
                "amount": {
                    "currencyCode": "SAR",
                    "amount": 2.5 
                },
                "taxCategory": {
                    "id": 0,
                    "percent": 15,
                    "taxSchemeId": "VAT"
                }
            }
        ],
        "legalMonetaryTotal": {
            "lineExtensionAmount": {
                "currencyCode": "SAR",
                "amount": 5 
            },
            "taxExclusiveAmount": {
                "currencyCode": "SAR",
                "amount": 2.5 
            },
            "taxInclusiveAmount": {
                "currencyCode": "SAR",
                "amount": 2.88 
            },
            "allowanceTotalAmount": {
                "currencyCode": "SAR",
                "amount": 2.5 
            },
            "prepaidAmount": {
                "currencyCode": "SAR",
                "amount": 0
            },
            "payableAmount": {
                "currencyCode": "SAR",
                "amount": 2.88 
            }
        },
        "invoiceLines": [
            {
                "id": "10000",
                "itemName": {
                    "en": "Item 1",
                    "ar": "عنصر 1"
                },
                "invoicedQuantity": 1,
                "lineExtensionAmount": {
                    "currencyCode": "SAR",
                    "amount": 5 // total after discount excl VAT. (origanl was 10 excl VAT) (11.5 incl VAT).
                },
                "taxAmount": {
                    "currencyCode": "SAR",
                    "amount": 0.75 // vat after discount
                },
                "roundingAmount": {
                    "currencyCode": "SAR",
                    "amount": 5.75 // total incl vat after discount.
                },
                "taxCategory": {
                    "percent": 15,
                    "id": 0,
                    "taxSchemeId": "VAT"
                },
                "priceAmount": {
                    "currencyCode": "SAR",
                    "amount": 5 // discounted unit price excl. VAT.
                },
                "allowanceCharge": {
                    "chargeIndicator": false,
                    "allowanceChargeReason": "discount",
                    "amount": {
                        "currencyCode": "SAR",
                        "amount": 5.75 // Total Discount amount 50% Incl. VAT
                    }
                }
            }
        ]
    }
}

Example Response

{
	"transactionId" : "3fa85f64-5717-4562-b3fc-2c963f66afa6",
	"qrCode": "{QRCode}",
	"status": "Pending",
	"message": "Reporting request created successfully, We will report back to registered webhook when it finishes."
}

Response Body

ParameterData TypeDescription
transactionIdstringA unique identifier for the invoice transaction. This UUID should be used to track the status of the invoice reporting
QRCodestringRendered QR code image in base64 encoded PNG format.
statusstringThe current status of the invoice reporting process, default when the transaction created is "pending"
messagestringA descriptive message providing more details about the status of the invoice submission.

Response Status Code

HTTP Status CodeDescription
200invoice is already reported.
202a new transaction is created or an existing one is updated, indicating pending processing.
400any validation error occurs during processing.
401If the user is not authenticated.
Language
Credentials
Header
Click Try It! to start a request and see the response here!