J.

Jev Fraud Review Code Example

Use transaction context to decide whether a payment should be approved, reviewed or held for human review.

Someone just attempted an $842 payment from a new device after four failed attempts.

Payment $842
Device New device
Location Berlin
Recent Attempts 4 attempts in 6 minutes

Should this payment be reviewed?

0% Review.
Review 91%
Approve 6%
Block 3%

Hold the payment and send it to fraud review.

Code
Conceptual pseudocode — not official Jev SDK syntax
// Conceptual pseudocode — not Jev SDK syntax
const state = {
  "payment": "$842",
  "device": "New device",
  "location": "Berlin",
  "recent_attempts": "4 attempts in 6 minutes"
};

const decision = await evaluateDecision({
  state,
  question: "Should this payment be reviewed?",
  options: ["Review","Approve","Block"],
});

// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Review"
    && decision.probability >= 0.85) {
  holdPaymentForReview(decision);
} else {
  queueForReview(decision);
}

This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.