AvrixDocumentation
API referenceStatusAvrix.ioConsole
Seller API

Welcome

  • Home
  • Getting started
  • Topic index
  • Glossary

Get started

  • Overview
  • How Avrix works
  • Architecture patterns
  • Quickstart
  • Integration tutorial
  • Authentication
  • OAuth tokens
  • Environments
  • Sandbox

Connect a partner

  • Partner onboarding
  • Sellable SKU readiness
  • Territory enforcement
  • AI assistants (MCP)
  • Connect your AI client
  • Sign-in and permissions

Catalog

  • Catalog & allocations
  • Product field matrix
  • Pricing authority
  • Currency and FX
  • Promotions
  • Caching & fairness

Sell an order

  • Store integration profiles
  • Order preview
  • Creating orders
  • Idempotency
  • Order context
  • Checkout holds
  • Hot drop
  • Fulfillment & keys
  • Keyless fulfilment
  • Order lifecycle
  • Refunds & returns

Stay in sync

  • Webhooks
  • Event reference
  • Polling & reconciliation
  • Reconciliation
  • Finance & settlement

Operate

  • Error reference
  • Troubleshooting
  • Key recovery
  • Rate limits
  • Security
  • Secrets & config
  • API key management
  • IP allowlist
  • Monitoring & support
  • Data handling
  • Partner runbook

Go live

  • Testing
  • Certification
  • Integration checklist
  • Sandbox to production
  • Go-live
  • Deployment targets

Reference

  • Integration recipes
  • Scope matrix
  • Commerce platforms
  • API clients
  • Client & helpers
  • Versioning
  • Changelog
  • FAQ
  • API reference
  1. Home
  2. /Operate
  3. /Secrets & config

Secrets & config

Key storage, sandbox vs production separation, and zero-downtime rotation.

TopicsOperate

How to store Seller API credentials, separate sandbox from production, and rotate keys without downtime.

What this covers#

Secret storage, environment variables, webhook secrets, and a zero-downtime rotation sequence. Complements Authentication and Security.

What you store#

SecretUsed for
AVRIX_API_KEYBearer token on Seller API requests
AVRIX_BASE_URLAPI host (usually https://api.avrix.io)
AVRIX_WEBHOOK_SECRETHMAC verification of webhook bodies

Avrix shows the raw API key once at creation. Store it immediately in your secret manager; you cannot retrieve the plaintext later.

Environment separation#

Sandbox and production share the same host. The key selects the environment.

  • Sandbox keys see the shared sandbox catalog and magic SKUs.
  • Production keys see only your live commercial catalog.
  • Mixing a production key with sandbox expectations (or the reverse) fails with environment mismatch errors — see Environments.

Inject different secret values per deploy stage (development, pre-production, production). Never paste a production key into a shared chat or CI log.

Client config from env#

Load secrets at process start; fail fast if the key is missing.

# 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"

Rotation without downtime#

Both the old and new keys remain valid until you revoke the old one.

Diagram
Seller APIConsoleDeploySeller APIConsoleDeployCreate second keyCopy IP allowlistDeploy new keyGET /whoamiRevoke old key
Seller APIConsoleDeploySeller APIConsoleDeployCreate second keyCopy IP allowlistDeploy new keyGET /whoamiRevoke old key

Checklist#

  1. Create a second key with the same scopes and environment.
  2. Copy optional IP allowlist entries onto the new key.
  3. Deploy the new AVRIX_API_KEY to your pre-production stack first.
  4. Verify with GET /whoami, a catalog read, and a dry-run preview.
  5. Revoke the old key after traffic moves off it.

Webhook secrets rotate the same way: register the new secret with overlap, verify signatures against either secret during the window, then drop the old one.

Least privilege#

Mint keys with only the scopes your integration needs. A catalog-sync worker does not need refund write scopes. Confirm effective scopes on GET /whoami after every create or rotate — see Scope matrix.

Logging hygiene#

  • Never log the full API key or webhook secret.
  • Prefer requestId, key id (if shown in console), and orderReference in support tickets.
  • Redact Authorization headers from HTTP debug dumps in non-production.

Common mistakes#

  • Committing .env files that contain live keys.
  • Rotating by deleting the only key before the deploy finishes.
  • Using one key for both sandbox experiments and production traffic.
  • Sharing a production key in a group chat “just for a quick test”.

Next steps#

  • Authentication — scopes and key lifecycle
  • IP allowlist — optional egress restrictions
  • Go-live — production cutover

Related pages

  • AuthenticationAPI keys, scopes, environments, rotation, and IP allowlists.
  • SecurityCredential handling, rotation, allowlisting, and webhook safety.
  • EnvironmentsSandbox and production share api.avrix.io; key prefixes, fixtures, and behavioral differences.
  • API clientsProduction HTTP client patterns per language — config, reuse, and retries.
  • Go-liveProduction prerequisites, cutover procedure, and rollback.

What links here

Published guides that link to this page.

  • API clientsProduction HTTP client patterns per language — config, reuse, and retries.
  • API key managementCreate child keys, rotate secrets, update IP allowlists, and revoke keys over the API without signing into the console.
  • Deployment targetsServerless, containers, and workers — cold starts, secrets, and webhook timeouts.
  • Seller API OAuth tokensMint short-lived Bearer tokens with OAuth2 client credentials mapped to your API key when you cannot ship a long-lived secret.
  • TroubleshootingSymptom-first trees for auth, empty catalog, inventory, idempotency, and webhooks.
PreviousSecurityNextAPI key management

Need help with this page?

Contact support

AI tools

  • Ask ChatGPT
  • Ask Claude

On this page

  • What this covers
  • What you store
  • Environment separation
  • Client config from env
  • Rotation without downtime
  • Checklist
  • Least privilege
  • Logging hygiene
  • Common mistakes
  • Next steps

Search docs

Search documentation…