Skip to main content
This guide walks you through everything you need to make your first AntifraudAI API call and receive a real fraud decision. By the end, you’ll have a working integration that screens a transaction and returns a risk score, a decision (allow, review, or block), and the signals that influenced the result — all in a single API round-trip.
Start with a sandbox API key (prefix sk_test_) while you build and test your integration. Sandbox keys behave identically to production keys but operate against isolated data with no real-world consequences. Switch to a production key (prefix sk_live_) only when you’re ready to go live.
1

Create an account

Head to app.antifraudai.com and sign up for a free account. After verifying your email you’ll land on the AntifraudAI dashboard — your central hub for API keys, event logs, case management, and configuration.
2

Generate an API key

In the dashboard, navigate to Settings → API Keys and click Create Key. Give your key a descriptive label (e.g., local-dev or staging-server) and select the appropriate environment:Copy your new key immediately — it is shown only once. If you lose it, you’ll need to create a replacement.
Never commit API keys to version control or paste them into client-side code. Store them as environment variables or in a secrets manager. See the Authentication guide for best practices.
3

Make your first request

Call the POST /transactions/screen endpoint with your API key and a minimal transaction payload. Replace YOUR_API_KEY with the key you just created.
4

Read the response

A successful request returns an HTTP 200 with a JSON body like this:
Here’s what each field means:Your application should branch on decision:
  • allow — proceed with the transaction as normal.
  • review — hold the transaction and trigger your review workflow.
  • block — reject the transaction and notify the user.
5

Test in sandbox

To run tests without affecting live data or incurring real consequences, point your requests at the sandbox base URL and use a sk_test_ key:
The sandbox mirrors all production endpoints and returns realistic risk scores and decisions, making it ideal for integration testing, CI pipelines, and QA. No transactions screened in the sandbox are counted against your production quota.

What’s Next

Screen a Transaction

Go deeper with the full transaction payload — add device fingerprints, shipping data, and custom attributes.

Set Up Webhooks

Receive real-time push notifications when decisions change or cases are resolved.

Risk Scoring Explained

Understand how scores are calculated, what drives each signal, and how to tune thresholds.

Environments

Learn the differences between sandbox and production, and how to manage environment-specific configuration.