🛡️
Fraud Prevention
E-commerce and payment fraud detection
Order risk scoring
Account takeover prevention
Payment fraud detection
Přehled
Tento průvodce vám ukáže, jak implementovat fraud prevention pomocí API Scorika. Pokryjeme kompletní integraci s příklady kódu v několika jazycích.
Použité API endpointy
/v1/score/v1/check/email/v1/check/ip/v1/check/phone
Podporované země
Všechny země jsou podporovány
Implementace krok za krokem
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"}'2Učiňte rozhodnutí
Učiňte rozhodnutí
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
✓ Co dělat
- • Set timeout (3-5s) on all API calls
- • Implement fallback for timeouts/errors
- • Cache results when appropriate
- • Log case_ids for debugging
✗ Co nedělat
- • Block critical flows on API errors
- • Make sync calls without timeout
- • Expose API keys in client-side code
- • Store raw API responses with PII
Související průvodci
Jste připraveni implementovat Fraud Prevention?
Získejte svůj API klíč za 30 sekund. Bez kreditní karty.
Získat API klíč →