A Billomat API key has the same read and write access as the user it belongs to. Treat it like a password.
- Never commit it. Keep credentials out of
composer.json, the README, tests and any other versioned file. For local tests the SDK uses.env.test.local, which is already in.gitignore. - Load it from the environment (
getenv('BILLOMAT_API_KEY')) or a secret manager (Vault, AWS Secrets Manager, Doppler, …). The scripts underexamples/show the pattern. - Separate keys per environment (sandbox, staging, production) and rotate them when people leave.
X-AppId/X-AppSecretonly if you need them. These headers are for registered third-party apps. A regular Billomat account only needs the API key (X-BillomatApiKey). The SDK sends the app headers only when both values are set.
HttpExceptionand its subclasses keep Billomat's raw response body ingetResponseBody(). It helps with debugging but can contain customer data, so don't write it unfiltered to shared logs.- The SDK's own PSR-3 logging (
logger:onBillomatClient) never logs headers, query strings or bodies, only method, path, status, attempt and timing. - The PSR-14 events (
events:) carry the full PSR-7 request, including theX-BillomatApiKeyheader. Mask it before you log requests from event listeners. - The SDK sends the API key only as a header, never in URLs.
| Version | Supported |
|---|---|
| 4.x | Yes |
| 3.x | Security fixes until 2027-05-31 |
| < 3.0 | No |
Security fixes are released as patch releases of the latest minor version.
Please don't open a public GitHub issue for security findings. Email the maintainer instead:
- Email:
dimitri@justpilot.io - Subject:
[Security] billomat-php-api: <short description>
Please include:
- the affected code path (file and function),
- a minimal reproduction,
- the possible impact,
- a suggested fix, if you have one.
We usually confirm receipt within a few working days and then coordinate the fix and the disclosure date with you.
- Vulnerabilities in the Billomat API itself: please report them to Billomat.
- Vulnerabilities in dependencies (PSR-18 clients,
php-http/discovery, …): please report them upstream. We raise our constraints once a fix is available.