Skip to main content
This guide walks you through everything you need to send your first transaction to FraudEG and interpret the response. By the end, you will have a working API call that returns a real-time risk score, a machine decision, and a set of explainable signals — the building blocks of every FraudEG integration.

Prerequisites

Before you begin, make sure you have:
  • A FraudEG accountsign 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, 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:
Set it as an environment variable so you don’t hard-code it in any file:
2

Score your first transaction

Send a 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.
Request field reference:
3

Understand the response

A successful request returns HTTP 200 with a JSON body. Here is a typical response for a low-risk transaction:
Response field reference: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 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
Store the 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.
Always use a test API key (feg_test_sk_...) during development and CI. Test keys hit the sandbox environment, which mirrors production behavior exactly but never affects your live fraud models or billing. Switch to a live key (feg_live_sk_...) only when you deploy to production.

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.