Authentication

API Key

To call the Wafeq ZATCA API, create an API key yourself on the API keys page of the E-invoicing Platform app: sign in, switch the app to the environment you want, open Settings → API keys and select Create key.

  • Simulation keys start with zatca_sim_ and send documents to ZATCA's simulation environment. Any organization can create one to build and test its integration.
  • Production keys start with zatca_live_ and report documents to ZATCA. Choose a plan on the Subscription page before you create one.

A key opens the ZATCA API only, in the environment it was created in, so requests made with it don't need the X-Zatca-Environment header. You can see a key only once, when you create it, so store it somewhere secure.

When making an API call to a Wafeq endpoint, use an Authorization header with the Api-Key prefix followed by your API key.

Example:

curl --location \
--request POST 'https://api.wafeq.com/v1/zatca/invoices/report/' \
--header 'Authorization: Api-Key <api_key>' \
...
🚧

Enterprise only

In production, these features are part of the E-invoicing Platform Enterprise plan. Without it, requests that use them are refused with enterprise_plan_required. In simulation, every organization can use them to test its integration.

  • Connected accounts: requests sent with the X-ZATCA-Connected-Account-Id header, and creating or changing a connected account.
  • Bulk endpoints: bulk-report, bulk-validate and bulk-issue.
  • Automatic retries: documents with an ERROR status are resent every hour. On other plans, resend them with the retry endpoint.

To enable them for your organization, contact our sales team at sales@wafeq.com.