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.
- Register via
/api/v1/accounts/registeror ask the owner to create your account. - Copy the first API key from the welcome email or create another key in the dashboard.
- Add your production origin, for example
https://checkout.example. - 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":"..."}'