The required header
X-API-Key is the standard.
Key prefixes and what they mean
| Prefix | Environment | Behavior |
|---|---|---|
yonne_live_ | Production | Real wallet deductions, real rider dispatch, live webhooks |
yonne_test_ | Sandbox | Safe for development — see Environments |
Validate your key on startup
CallGET /api/v1/external/validate during application boot or when debugging. It returns your merchant context in one shot:
Authentication errors
401 Unauthorized — key missing
X-API-Key header is present in every request.
401 Unauthorized — key invalid or inactive
Same HTTP status, same error shape. Check that the key is copied correctly from your dashboard and is marked active.
Security best practices
- Store your key in an environment variable, never in source code.
- Use your
yonne_test_key in local development and CI. - Rotate your
yonne_live_key immediately if it is exposed — do this from merchant.yonne.app. - Never log the full key — log only the prefix (e.g.
yonne_live_***) if you need a reference in your logs.
