|| "en_GB"
🛡️

Fraud Prevention

E-commerce and payment fraud detection

Order risk scoring
Account takeover prevention
Payment fraud detection

Överblick

Denna guide visar hur du implementerar fraud prevention med Scorika API. Vi täcker hela integrationen med kodexempel på flera språk.

Använda API-slutpunkter

  • /v1/score
  • /v1/check/email
  • /v1/check/ip
  • /v1/check/phone

Länder som stöds

Alla länder stöds

Steg-för-steg-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"}'

2Fatta beslut

Fatta beslut
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

✓ Gör

  • • Set timeout (3-5s) on all API calls
  • • Implement fallback for timeouts/errors
  • • Cache results when appropriate
  • • Log case_ids for debugging

✗ Gör inte

  • • Block critical flows on API errors
  • • Make sync calls without timeout
  • • Expose API keys in client-side code
  • • Store raw API responses with PII

Relaterade guider

Redo att implementera Fraud Prevention?

Få din API-nyckel på 30 sekunder. Inget kreditkort krävs.

Hämta API-nyckel →