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 onlyIn 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-Idheader, and creating or changing a connected account.- Bulk endpoints:
bulk-report,bulk-validateandbulk-issue.- Automatic retries: documents with an
ERRORstatus are resent every hour. On other plans, resend them with theretryendpoint.To enable them for your organization, contact our sales team at
sales@wafeq.com.
Updated 5 days ago