Sandbox
Sandbox is a portal mode, separate from Live. Switch to Sandbox before creating API keys, taxpayers or webhook endpoints. Sandbox is free and has its own test quotas; activity there does not create Live billing usage.
Make your first Sandbox request
- Select Sandbox in the portal, then create an API key under Developer → API keys.
- Start your app's connection flow at
https://portal-einvoicing.wafeq.com/sandbox/oauth/authorize, using the Sandbox OAuth client. Choose Simulate EmaraTax onboarding. It creates a test taxpayer with yourtin_hint, or a random unused TIN, then shows consent. - Exchange the code at
POST /oauth/token, or obtain the taxpayer'stxpay_…ID fromGET /taxpayersafter consent. - Use the same API base URL with your Sandbox key and matching Taxpayer ID.
curl 'https://api.wafeq.com/ae/v1/invoices' \
-H "Authorization: Api-Key $UAE_API_KEY" \
-H "x-ae-taxpayer-id: $AE_TAXPAYER_ID"The pk_test_ key routes the request to Sandbox. The portal's /sandbox prefix selects the mode for portal pages: do not append /sandbox to API paths. Switching the portal mode does not change your integration's base URL. API consumers do not configure the server's PEPPOL_NETWORK setting.
What is simulated
FTA reporting is disabled in Sandbox. No documents are submitted to the FTA. Developer → Webhooks lets you send simulated accepted, rejected or failed document.reported events. These contain test: true and never change a document's reporting status.
Sandbox sends convert the document to PINT-AE UBL, run validation, record it and emit document events. No external SMP lookup or AS4 dispatch takes place. When the recipient is an active taxpayer in the same Sandbox, the local simulation also creates its inbound document, so you can test both sides of an exchange.
Queued delivery (Prefer: respond-async) is simulated locally too. It does not deliver over the Peppol test network. See the API reference for server enablement and idempotency requirements. Peppol test-network delivery is separate from portal Sandbox mode.
Move to Live
Switch to Live, activate the required paid service, onboard the Live taxpayer and obtain its consent, then create a Live API key. The base URL stays the same; replace both the key and Taxpayer ID with their Live counterparts.
Configure Live webhooks separately. Sandbox taxpayers, grants, tokens, keys and webhook endpoints are not promoted to Live and cannot be reused there.
Updated 5 days ago