Using the sandbox environment for testing
Goal
Make test requests to the POP API without consuming account credits.
Prerequisites
- A valid
license_key(see get-your-license-key).
Steps
You can activate the sandbox in two equivalent ways:
- Explicit parameter — send
"environment": "sandbox"in the body tohttps://popapi.io/wp-json/api/v2/.... - Sandbox gateway — call
https://sandbox.popapi.io/wp-json/api/v2/...without specifyingenvironment: the gateway forces it automatically. If you still send an explicitenvironment, that one takes priority.
All document-generation routes (SdI, PEPPOL, KSeF, PDF, ZUGFeRD, legacy Facturae) accept
environment: sandbox.
Verify
- Sandbox requests don’t consume credit.
- On the XML routes,
invoice_numberis returned with aSANDBOX-prefix.
Common errors
- The configured webhook doesn’t receive anything in sandbox — webhook delivery isn’t available in sandbox: this is an expected limitation, not a configuration error.
- Delivery to Fatture in Cloud doesn’t start in sandbox — same reason: not supported in sandbox.
- PDF email sending doesn’t work in sandbox — this isn’t a limitation: PDF email delivery is allowed even in sandbox.
Related configuration
See api/sdi and the other api/* pages for the specific behavior of each route in
sandbox.