Skip to main content
POST
/
api
/
predict
/
outcome
Record Prediction Outcome
curl --request POST \
  --url https://api.revtain.com/api/predict/outcome \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "paymentMethodToken": "pm_1234567890",
  "actualOutcome": "succeeded"
}
'
{
  "success": true,
  "predictionId": "pred_a1b2c3d4e5f6",
  "predictedRecommendation": "proceed_with_caution",
  "actual": "succeeded",
  "accurate": true
}

Authorizations

X-API-KEY
string
header
required

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

Body

application/json
paymentMethodToken
string
required

The same token used in the /predict/risk call.

Example:

"pm_1234567890"

actualOutcome
enum<string>
required

What actually happened.

Available options:
succeeded,
failed,
blocked
Example:

"succeeded"

Response

Outcome recorded

success
boolean
Example:

true

predictionId
string
Example:

"pred_a1b2c3d4e5f6"

predictedRecommendation
string
Example:

"proceed_with_caution"

actual
enum<string>

The outcome you reported in the request (echoed back so you can correlate).

Available options:
succeeded,
failed,
blocked
Example:

"succeeded"

accurate
boolean

Whether the prediction matched the actual outcome — feeds the model's accuracy tracking.

Example:

true