Environments

Sandbox and production share api.avrix.io; key prefixes, fixtures, and behavioral differences.

Sandbox and production share the same API host. Your API key selects the environment — not a different base URL.

Hosts#

EnvironmentBase URLHow you select it
Productionhttps://api.avrix.ioAPI key with environment = production
Sandboxhttps://api.avrix.ioAPI key with environment = sandbox

Prefer a sandbox key for everyday integration work; use a production key only after go-live.

Confirm the environment on every deployment with:

# Prefer env vars — never hardcode secrets in source control
export AVRIX_API_KEY="avrix_sk_sbx_your_key_here"
export AVRIX_BASE_URL="https://api.avrix.io"

data.key.environment must match the key you intended, and data.requestEnvironment must equal it.

Key prefixes#

New and rotated secrets encode key type in the token prefix. Auth looks keys up by hash; the Console badge and GET /whoami remain authoritative when the prefix is ambiguous.

Key typeExample prefix
Live (production)avrix_sk_live_…
Sandboxavrix_sk_sbx_…

Legacy keys may still use a plain avrix_sk_… shape until rotated. Always send the raw token in Authorization: Bearer … — never a display label or a double Bearer prefix.

Behavioural differences#

TopicSandboxProduction
CatalogShared fixture catalogYour real agreements and allocations
VendorsFixture vendorYour vendor relationships
Key materialTest keys, no commercial valueReal inventory, real cost
Magic SKUs (SANDBOX-*)AcceptedRejected (SANDBOX_MAGIC_VALUE_REJECTED)
Magic order / payment refs (sandbox_*)AcceptedRejected
Commercial evidence (integrationOrderContext)Minimal acceptedFull production set enforced
Consumer geo enforcementNever enabledEnabled when the deployment enables it
WebhooksIsolated per API key on the shared sandbox catalogPer registered endpoint on your company
Financial impactNoneSettlement obligations

Sandbox fixtures#

Use these SKUs for certification and day-to-day testing:

SKUPurpose
SANDBOX-ALWAYS-001Happy-path key fulfilment (pool replenished)
SANDBOX-NOALLOC-001Not sellable — no allocation
SANDBOX-NOSHARE-001Not sellable — no share
SANDBOX-LIFECYCLE-001Discoverable but not transactable lifecycle state
SANDBOX-NOKEYS-001Out-of-stock / NO_AVAILABLE_KEYS path

Prefer SANDBOX-ALWAYS-001 for load and concurrent tests — other pools can be exhausted by other integrators on the shared sandbox catalog.

Commercial evidence (production keys)#

Production keys enforce a larger integrationOrderContext set than sandbox keys. Implement the production set from day one in sandbox so cutover does not surprise you with 422 responses.

See Order context for the full field matrix.

Capability discovery#

Optional features (checkout hold, consumer geo) appear on GET /whoami under capabilities. Gate your client on those flags — do not assume a capability is on because it worked in another environment.

What links here

Published guides that link to this page.

Search docs

Search documentation…