Skip to main content
AntifraudAI offers two isolated environments to serve different stages of your integration lifecycle. The sandbox environment gives you a safe, free space to build and test without affecting real user data. The production environment runs live fraud screening against real events and real users.

Environment Overview

Creating Environment Keys

You can generate API keys for each environment directly from the AntifraudAI dashboard. Sandbox key
  1. Log in to the AntifraudAI dashboard.
  2. Navigate to Settings → API Keys.
  3. Click Create Key under the Sandbox section.
  4. Copy and securely store the generated sk_test_ key — it will not be shown again.
Production key
  1. From the same Settings → API Keys page, switch to the Production section.
  2. Click Create Key.
  3. Copy and securely store the generated sk_live_ key.
Production keys are only available after your account has been activated. Complete onboarding in the dashboard before generating live keys.

Switching Environments

Switching between environments requires only two changes: the base URL and the API key. All request shapes, response schemas, and endpoint paths are identical across environments.

Best Practices

Always test in sandbox first. Validate your integration end-to-end — including error handling and edge cases — before pointing your application at the production environment.
Use separate key storage per environment. Store sandbox keys in .env.development and production keys in .env.production (or your secrets manager). Never load both key sets at the same time in a running process.
Never mix sandbox and production data. Sandbox uses synthetic data that does not reflect real-world fraud patterns. Sending real user PII to the sandbox endpoint — or test IDs to production — will corrupt your analytics and may have compliance implications.
Rotate production keys regularly. Treat sk_live_ keys like passwords. Rotate them on a schedule or immediately after any suspected exposure. Old keys can be revoked instantly from the dashboard without downtime.