🛡️
Fraud Prevention
E-commerce and payment fraud detection
Order risk scoring
Account takeover prevention
Payment fraud detection
Overview
This guide shows you how to implement fraud prevention using Scorika API. We'll cover the complete integration with code examples in multiple languages.
API Endpoints Used
/v1/score/v1/check/email/v1/check/ip/v1/check/phone
Supported Countries
All countries supported
Step-by-Step Implementation
1Score Order Risk
Use the main scoring endpoint to evaluate order risk:
curl -X POST https://api.scorika.com/v1/score \
-H "X-Api-Key: sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"email": "customer@example.com", "ip": "185.1.2.3"}'2Make Decision
Make Decision
def handle_order_risk(score_result): """Handle order risk decision with fallback.""" decision = score_result["decision"] score = score_result["score"] reason_codes = score_result.get("reason_codes", []) if decision == "block": # High risk - reject return { "action": "reject", "reason": f"High risk score: {score}", "reason_codes": reason_codes } elif decision == "review": # Medium risk - manual review return { "action": "review", "reason": f"Medium risk score: {score}", "reason_codes": reason_codes } else: # Low risk - approve return { "action": "approve", "reason": f"Low risk score: {score}" }Best Practices
✓ Do
- • Set timeout (3-5s) on all API calls
- • Implement fallback for timeouts/errors
- • Cache results when appropriate
- • Log case_ids for debugging
✗ Don't
- • Block critical flows on API errors
- • Make sync calls without timeout
- • Expose API keys in client-side code
- • Store raw API responses with PII
Related Guides
Ready to Implement Fraud Prevention?
Get your API key in 30 seconds. No credit card required.
Get API Key →