Prerequisites
Before you begin, make sure you have:- A FraudEG account — sign up free if you don’t have one.
- Your API key — you’ll retrieve this in Step 1 below.
- A terminal or HTTP client to run cURL commands (or Node.js if you prefer the code examples).
Steps
1
Get your API key
Log in to the FraudEG dashboard, navigate to Settings → API Keys, and click Create new key. Give the key a descriptive label (for example, Set it as an environment variable so you don’t hard-code it in any file:
local-dev) and select the Test environment.Your new key will be shown once. Copy it and store it in a safe place — you will not be able to view it again. It will look like this:2
Score your first transaction
Send a Request field reference:
POST request to /v1/transactions/score with your transaction context. The request below represents a card payment of $150.00 from a known user, including device session and merchant details.3
Understand the response
A successful request returns HTTP Response field reference:
200 with a JSON body. Here is a typical response for a low-risk transaction:The
decision field is the primary value to act on. Your risk thresholds are configurable in the FraudEG dashboard under Platform → Risk Rules.4
Handle the decision in your code
Branch your application logic on the Store the
decision field. The three possible values map to clear actions:allow— proceed with the transaction normally.challenge— require additional verification (for example, 3DS, OTP, or a manual review queue).block— decline the transaction and present an appropriate message to the user.
Node.js
transaction_id alongside your own transaction record. You can use it to retrieve the full assessment, submit feedback, and link events in the FraudEG dashboard.Next Steps
Authentication
Learn about key types, security best practices, and how to rotate credentials.
Risk Scoring Concepts
Understand how scores are calculated and how to tune decision thresholds.
Payment Fraud Prevention
End-to-end guide for protecting card and wallet payments in production.