Skip to content

API documentation

REST over HTTPS with JSON bodies. Base URL https://api.rifraux.com. Every response carries a request_id to quote when you contact support.

Quick start

  1. Create an account and copy your test key. It is shown once.
  2. Store it on your server as RIFRAUX_API_KEY. Never put it in an app or browser.
  3. Score a transaction, screen a customer and run monitoring with the examples below.
  4. Act on action and show reason_codes to the analyst who reviews the decision.

Prefer a walkthrough? Read Getting started with the Rifraux API.

Authentication

Send your key in the X-API-Key header on every request.

X-API-Key: rfx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Key prefixUse
rfx_test_Development and testing
rfx_live_Production traffic

Keys carry scopes that follow the products your organisation uses. A key without the right scope gets 403.

ScopeGrants
fraudPOST /v1/check/*, POST /v1/batch/check, GET /v1/models
amlPOST /v1/aml/monitor, /screen, /customers/risk-rating; GET /v1/aml/scenarios
casesGET /v1/cases, GET /v1/cases/{id}
iiotAll /v1/iot/* endpoints (Rifraux Industrial)

We store only a keyed hash of each key, so a lost key cannot be recovered. Create a new one in the dashboard and revoke the old.

Fraud scoring

Score a payment, a login or sensitive action, or a loan application in real time. Models and rules run together; the strictest action wins.

POST/v1/check/transaction· scope fraud

Request

curl -X POST https://api.rifraux.com/v1/check/transaction \
  -H "X-API-Key: $RIFRAUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "TXN000000000001",
    "user_id": "U123456",
    "transaction_type": "p2p_transfer",
    "amount": 25000000,
    "balance": 100000,
    "channel": "mobile_app",
    "merchant_category": "retail",
    "timestamp": "2025-12-09T16:00:00",
    "device_id": "D123456000",
    "ip_address": "41.220.12.34",
    "latitude": 6.5244,
    "longitude": 3.3792,
    "device_model_raw": "Samsung S21",
    "sim_details_raw": "SIM_ID_B",
    "merchant_id": "M7890",
    "agent_id": null,
    "network_operator": "MTN",
    "recipient_network": "GLO",
    "recipient_id": "R112233"
  }'

Response

{
  "request_id": "35411c7beab5160c",
  "fraud_type": "transaction",
  "fraud_probability": 0.89,
  "is_fraud": true,
  "risk_level": "CRITICAL",
  "action": "block",
  "reasons": ["Block extremely large transactions (>= ₦10M)", "Block transactions with critical fraud probability"],
  "matched_rules": ["extreme_high_value_transaction", "critical_fraud_score"],
  "reason_codes": [
    { "code": "RC_AMOUNT_TO_BALANCE_RATIO", "feature": "amount_to_balance_ratio", "value": 250.0, "contribution": 1.42,
      "description": "Amount is far above the available balance" },
    { "code": "RC_RECIPIENT_NETWORK_MISMATCH", "feature": "recipient_network_mismatch", "value": 1.0, "contribution": 0.38,
      "description": "Recipient is on a different network from the sender" }
  ],
  "confidence": 0.95,
  "model_version": "transaction-xgb-2026.11",
  "timestamp": "2026-11-09T16:00:01Z",
  "processing_time_ms": 172.8
}
FieldMeaning
actionallow, review, challenge or block. This is the field to act on.
risk_levelMINIMAL, LOW, MEDIUM, HIGH or CRITICAL.
fraud_probabilityModel score from 0 to 1.
matched_rulesRules that fired. A rule can block even when the score is low.
reason_codesThe features that pushed the score up or down, with plain-language descriptions.
model_versionRecord it with the decision for audit and model validation.

To score historical events, POST /v1/batch/check?fraud_type=transaction accepts up to 1,000 events of one type.

Transaction monitoring

Send a customer’s transactions (or a day’s batch across customers). Rifraux runs the monitoring scenarios, returns alerts with their evidence, and opens a case per customer when create_cases is true.

POST/v1/aml/monitor· scope aml

Request

curl -X POST https://api.rifraux.com/v1/aml/monitor \
  -H "X-API-Key: $RIFRAUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transactions": [
      { "transaction_id": "T-1001", "customer_id": "C-77", "timestamp": "2026-11-02T09:14:00Z",
        "amount": 4900000, "direction": "credit", "channel": "branch", "is_cash": true },
      { "transaction_id": "T-1002", "customer_id": "C-77", "timestamp": "2026-11-02T13:40:00Z",
        "amount": 4850000, "direction": "credit", "channel": "branch", "is_cash": true },
      { "transaction_id": "T-1003", "customer_id": "C-77", "timestamp": "2026-11-03T08:05:00Z",
        "amount": 9600000, "direction": "debit", "counterparty_bank": "058", "channel": "nip" }
    ],
    "customer_names": { "C-77": "Adebayo Okafor Ventures" },
    "create_cases": true
  }'

Response (abridged)

{
  "request_id": "6f1c2a0e-9a51-4c0e-8a3e-1d2b7f6c9e10",
  "transactions_analysed": 3,
  "alerts": [
    {
      "alert_id": "ALT-3f9c2b7d10e4a6c1",
      "scenario_code": "TM-STR-01",
      "scenario_name": "Structuring below the cash reporting threshold",
      "report_type": "STR",
      "customer_id": "C-77",
      "severity": 82,
      "total_amount": 9750000,
      "transaction_ids": ["T-1001", "T-1002"],
      "narrative": "Two cash deposits of ₦4.90m and ₦4.85m within 5 hours, each just under the ₦5m threshold."
    }
  ],
  "cases": [{ "id": "c0a8…", "customer_id": "C-77", "status": "open", "severity": 82 }],
  "config_version": "2026.11.0"
}

Scenarios

CodeDetects
TM-CTR-01Cash at or above the CTR threshold (₦5m individual, ₦10m corporate)
TM-STR-01Structuring just below the cash threshold
TM-RMV-01Rapid movement: funds in and out within a short window
TM-FAN-01Fan-in: many senders to one account
TM-FAN-02Fan-out: one account to many recipients
TM-DOR-01Dormant account suddenly active
TM-RND-01Repeated round-amount transfers
TM-GEO-01High-risk jurisdiction counterparties
TM-VEL-01Unusual velocity against the customer’s own history

Current thresholds: GET /v1/aml/scenarios. Amounts are in naira.

Sanctions and PEP screening

Fuzzy name matching tuned for Nigerian names. Honorifics such as Alhaji, Chief and Dr are removed before matching. Decisions are clear, potential_match or strong_potential_match. Pass customer_id to open a case automatically when the result is not clear.

POST/v1/aml/screen· scope aml

Request

curl -X POST https://api.rifraux.com/v1/aml/screen \
  -H "X-API-Key: $RIFRAUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alhaji Musa Ibrahim",
    "entity_type": "individual",
    "dob": "1968",
    "country": "NG",
    "customer_id": "C-100",
    "open_case_on_match": true
  }'

Response (abridged)

{
  "screening_id": "5b0f…",
  "query": "Alhaji Musa Ibrahim",
  "normalised": ["musa ibrahim"],
  "decision": "potential_match",
  "matches": [
    {
      "matched_name": "Musa Ibraheem",
      "score": 0.93,
      "dob_match": false,
      "reasons": ["Name similarity 0.93", "Country matches"],
      "entry": { "list_type": "sanctions", "source": "UN Consolidated List" }
    }
  ],
  "list_versions": { "un": "2026-11-07", "ofac_sdn": "2026-11-06" },
  "cases": [{ "id": "9e2d…", "status": "open", "severity": 90 }]
}

Customer risk rating

Rates a customer’s money-laundering and terrorist-financing risk, shows which factors drove the score, flags enhanced due diligence and sets the next review date. Sanctions hits and PEP status override the score.

POST/v1/aml/customers/risk-rating· scope aml

Request

curl -X POST https://api.rifraux.com/v1/aml/customers/risk-rating \
  -H "X-API-Key: $RIFRAUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "C-77",
    "customer_type": "corporate",
    "is_pep": false,
    "nationality": "NG",
    "countries": ["NG", "AE"],
    "industry": "bureau_de_change",
    "kyc_tier": 3,
    "onboarding_channel": "agent",
    "account_age_days": 45,
    "alerts_last_12m": 3
  }'

Response (abridged)

{
  "customer_id": "C-77",
  "score": 74.2,
  "band": "HIGH",
  "edd_required": true,
  "overrides": [],
  "factors": [
    { "factor": "industry", "risk": 1.0, "weight": 20, "contribution": 20.0,
      "detail": "Bureau de change is a high-risk business type." },
    { "factor": "alerts_last_12m", "risk": 0.6, "weight": 15, "contribution": 9.0,
      "detail": "3 monitoring alerts in the last 12 months." },
    { "factor": "onboarding_channel", "risk": 0.5, "weight": 10, "contribution": 5.0,
      "detail": "Onboarded through an agent, not in branch." }
  ],
  "next_review_date": "2027-05-08",
  "methodology": "additive-weighted-v1"
}

Cases

Alerts and screening matches roll up into one case per customer. Your systems can read cases with an API key; decisions on a case (review, escalate, close, STR approval) are made by named people in the dashboard, so every step in the audit trail has an accountable person.

EndpointWho can call it
GET /v1/cases?status=openAPI key with cases scope, or a signed-in user
GET /v1/cases/{id}API key with cases scope, or a signed-in user
POST /v1/cases/{id}/transitionSigned-in analyst, MLRO or admin (dashboard)
POST /v1/cases/{id}/notesSigned-in user (dashboard)
POST /v1/cases/{id}/goaml-draftSigned-in MLRO (dashboard)

Workflow: open → in_review → escalated → STR submitted → approved by a second person → filed, or closed as a false positive or with no action. STR approval always needs a different person from the one who submitted it.

Webhooks

We post decisions and case updates to your endpoint. Send us your URL during onboarding and we will issue a signing secret. Each delivery has an X-Rifraux-Event header and a body of the form {"type": "...", "data": {...}}.

EventSent when
fraud.decisionEvery scored event, with its action and reasons
aml.case.updatedA case is opened or changes status

Verify the X-Rifraux-Signature header (t=<unix time>,v1=<hex>) before trusting the body: HMAC-SHA256 of <t>.<raw body> with your secret, compared in constant time, rejecting anything older than five minutes. Reply 2xx quickly; we make up to three delivery attempts.

// Next.js / Express: read the RAW body, not parsed JSON.
import crypto from 'crypto';

export function verifyRifraux(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(String(header || '').split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  if (!t || !parts.v1 || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest('hex');
  const a = Buffer.from(expected), b = Buffer.from(parts.v1);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Errors and limits

Errors return JSON with a detail message.

StatusMeaning
401Missing or invalid X-API-Key.
403The key is valid but lacks the scope for this endpoint, or the action needs a signed-in user.
404Case or resource not found in your organisation.
409The case is not in a state that allows this action.
413Batch too large. Split it into batches of 1,000 events or fewer.
422Invalid JSON or a field failed validation. The detail field says which.
429Rate limit reached. Wait for the Retry-After header, then retry.
503A model or service is temporarily unavailable. Retry with backoff; check GET /ready.

The default limit is 600 requests a minute per key. Monitoring requests accept up to 50,000 transactions each. Use GET /health for liveness and GET /ready to see which capabilities are available.

Ready to build?

Create a free account and get a test key in a minute.

Get a test key