KSA APIs Online
Product DocsWebsite
  • Intro
  • Environments
  • Authentication
    • Access Tokens
    • API KEY
  • Generate Einvoice API
    • UBL2.1 XML
    • UBL2.1 XML (VAT IN URL)
    • JSON
    • JSON (VAT IN URL)
    • Responses
    • Callback Response
    • Technical Guidelines
  • Get Invoice Process Status
  • Get Invoice in PDF
Powered by GitBook
On this page
  • Request Method
  • Request Path
  • Request Headers
  • Request Body
  1. Generate Einvoice API

UBL2.1 XML

We accept the UBL2.1 XML compliant directly as the input for the generate einvoice API. The xml input needs to be base64 encoded. Here are some attached documents for your reference

  • Standard Invoice

  • Standard Credit Note

  • Standard Debit Note

  • Simplified Invoice

  • Simplified Credit Note

  • Simplified Debit Note

As part of our responsibilities we will enrich the following elements within the document before sending it to ZATCA

  • ProfileID

  • UUID

  • IssueDate

  • IssueTime

  • Previous Invoice Hash

  • Invoice Counter Value

  • Signature (Simplified Document Only)

  • QR Code (Simplified Document Only)

  • UBL Extensions (Simplified Document Only)

If you want to do a quick test without registering your company within our website you can try out the following ENV. Basic test can be done here to see if your document is compliant or not.

Request Method

POST

Request Path

{{API_URL}}/api/v2/ksa_einvoice/online_service/generate_einvoice/

Request Headers

Parameter
Value
Description

Productid

einvoicing_global

Keep as is

Authorization/MiplApiKey

api_key/auth token

Value and header type is mentioned in the Authentication Page

Request Body

Parameter
Value
Description

invoice

""

Base64 Encoded XML document

The response for the API can be found here.

PreviousGenerate Einvoice APINextUBL2.1 XML (VAT IN URL)

Last updated 1 year ago