Skip to main content
POST
/
api
/
predict
/
risk
Predict Transaction Risk
curl --request POST \
  --url https://api.revtain.com/api/predict/risk \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "paymentMethodToken": "pm_1234567890",
  "amount": 5000,
  "currency": "USD"
}
'
{
  "success": true,
  "prediction": {
    "riskScore": 72.5,
    "confidence": 68,
    "reasoning": "Card has 3 prior declines in last 30 days. Amount matches a historically recoverable pattern.",
    "factors": [
      "prior_decline_history",
      "amount_pattern_match",
      "time_of_day_risk"
    ],
    "recommendation": "proceed_with_caution"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.revtain.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-KEY
string
header
required

Your Revtain API key (format: rev_xxx). Provided during onboarding.

Body

application/json
paymentMethodToken
string
required

Your gateway's payment token or Revtain vault token.

Example:

"01KKZ10AD66A3VX260WKM0YFPG"

amount
integer
required

Amount in cents.

Example:

5000

currency
string
default:USD
Example:

"USD"

scheduledDate
string<date-time>

ISO 8601 date for scheduled transactions. Improves prediction accuracy.

Example:

"2026-04-15T10:00:00.000Z"

Response

Risk prediction

success
boolean
Example:

true

prediction
object