Environments and sandboxes
Purpose
Each API key is bound to one environment. Calls made with that key stay in that environment.
Production and sandbox
The environments are production and sandbox. A new key defaults to sandbox. The key prefix is bk_user_ in both; the prefix does not tell you which environment you are in. The environment is the one selected when the key was created.
Create keys in the Developer Portal. Sandboxes are managed on the portal's Sandboxes page. An organization can have at most 5 sandboxes.
A sandbox request names the sandbox organization with the X-Organization-Id header.
The API base URL is the same for both environments: https://app.billyou.ro/api.
e-Factura inside a sandbox
Sandbox e-Factura follows the sandbox efacturaMode:
| Mode | Behavior |
|---|---|
smart_mock (default) | Validates locally with ANAF's rules and returns a mock result in the same response (200, simulation: true). No call to ANAF. A valid invoice comes back validated with a mock upload index. An invalid invoice comes back rejected with validationErrors. |
full_test | Submits to ANAF's test environment. Requires ANAF test credentials. The call is asynchronous (202, then you poll), same shape as production. |
The submission flow, status values, and error codes are in the e-Factura reference.