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. /Key recovery

Key recovery

Ordered runbook for lost key material — idempotency replay, orderReference re-reveal, bulk export, and when to escalate to support.

Your buyer paid, your POST /orders call happened — and the response with the key plaintext is gone: a crash mid-request, a dropped connection, a deploy at the wrong second. This page is the complete, ordered recovery procedure. Work it top to bottom; each step is strictly safer than inventing a new order.

Danger: Never "recover" by re-submitting the purchase with a new Idempotency-Key or a new orderReference. That is a second sale against the same charge — the exact failure this runbook exists to prevent.

What never works#

Key plaintext exists in exactly one place on the wire: the synchronous response of POST /orders (and the pull/export responses below). It is never available via:

  • webhooks — payloads are redacted by design (order.fulfilled carries key ids, not codes);
  • GET /orders — lookup and listing responses carry key ids only;
  • delivery replay — replays are clones of redacted payloads.

If a path promises key plaintext outside the synchronous responses listed below, it is wrong.

Step 1 — Replay with the same Idempotency-Key#

Retry POST /orders with the same Idempotency-Key and the identical JSON body. Within the 24-hour replay window the cached response — including key plaintext — is returned with Idempotency-Replayed: true and no second side effect.

Warning: The replay namespace includes the API key id. A retry sent with a different key (for example after a rotation) cannot see the old key's cache — it executes as a brand-new request. Drain in-flight retries before retiring a key (Idempotency — key rotation voids replay).

Step 2 — Re-reveal via orderReference#

If the idempotency window has passed (or the key was lost), submit POST /orders with a new Idempotency-Key but the same orderReference, the same allocation/SKU, and the same quantity. When the reference already has enough live keys, Avrix re-reveals the original keys' plaintext — no additional inventory is consumed.

  • Replay requires the requested quantity to be covered by the prior fulfilment. A larger quantity returns 409 ORDER_REFERENCE_CONFLICT — there is no top-up.
  • Scope is per allocation: the same reference on a different allocation is a different pull.

Step 3 — Bulk export#

For batch recovery (for example, rebuilding an entitlement vault), POST /keys/export returns a ZIP of the plaintext for keys your company already pulled. Requires the seller:keys:export scope and an Idempotency-Key; every 2xx is always audited.

Step 4 — Support escalation#

When the steps above cannot recover (for example, the original request never committed), contact support@avrix.io with:

  • the X-Request-Id of the failed call (or requestId from the error body),
  • the Idempotency-Key and orderReference you used,
  • the approximate timestamp with timezone.

Avrix can trace exactly what the request did — including whether keys were issued — from the request id alone.

Deferred reveal#

If you deliberately ordered with immediateFulfilment: false (deferred reveal), the plaintext was never in the response; reveal follows the deferred reveal contract instead of this runbook.

Related#

  • Idempotency — the full retry contract
  • Order lifecycle — states and events
  • Fulfilment keys — custody model
  • Troubleshooting

What links here

Published guides that link to this page.

  • Idempotency & retriesIdempotency-Key contract, orderReference, and safe retry behavior.
  • Polling & reconciliationRecover from missed webhooks with deliveries replay and order reads.
  • TroubleshootingSymptom-first trees for auth, empty catalog, inventory, idempotency, and webhooks.
PreviousTroubleshootingNextRate limits

Need help with this page?

Contact support

AI tools

  • Ask ChatGPT
  • Ask Claude

On this page

  • What never works
  • Step 1 — Replay with the same `Idempotency-Key`
  • Step 2 — Re-reveal via `orderReference`
  • Step 3 — Bulk export
  • Step 4 — Support escalation
  • Deferred reveal
  • Related

Search docs

Search documentation…

Related pages

  • Idempotency & retriesIdempotency-Key contract, orderReference, and safe retry behavior.
  • Order lifecycleStates, transitions, and recovery from preview to fulfillment.
  • Fulfillment & keysKey custody, deferred reveal, and why GET /orders never returns plaintext.
  • TroubleshootingSymptom-first trees for auth, empty catalog, inventory, idempotency, and webhooks.
  • Error referenceHTTP statuses, canonical error codes, and recovery actions.