markedasfraud quickstart

Risk scoring API for signup, login and checkout

Create an account, add your allowed domain, install the browser SDK and decide what your app does with allow, challenge or deny.

  1. Register via /api/v1/accounts/register or ask the owner to create your account.
  2. Copy the first API key from the welcome email or create another key in the dashboard.
  3. Add your production origin, for example https://checkout.example.
  4. Install the SDK script and handle the returned decision in your app.

Install SDK

<script src="/static/risk-sdk.js"
  data-risk-key="YOUR_PUBLIC_API_KEY"
  data-risk-url="/api/v1/score"
  data-risk-site-id="checkout"
  defer></script>

Collect risk

const result = await window.RiskSDK.collect({
  event: 'signup',
  // session_id is generated pseudonymously by default; never send email, phone or user ID.
  extra: { flow: 'registration', page: 'signup' }
});

Handle decisions

if (result.decision === 'allow') {
  continueSignup();
} else if (result.decision === 'challenge') {
  showStepUpCheck();
} else if (result.decision === 'deny') {
  blockOrReviewSignup();
}

Server-side shape

curl -X POST /api/v1/score \
  -H "Content-Type: application/json" \
  -H "X-Risk-Key: YOUR_PUBLIC_API_KEY" \
  -d '{"api_key":"YOUR_PUBLIC_API_KEY","event":"signup","site_id":"checkout","enc_key":"...","iv":"...","ciphertext":"..."}'