Sample - Stripe API
POST/v1/radar/payment_evaluations

Create a Payment Evaluation

Request a Radar API fraud risk score from Stripe for a payment before sending it for external processor authorization.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

5 body fields
client_device_metadata_detailsobjectoptional
Details about the Client Device Metadata to associate with the payment evaluation.
customer_detailsobjectrequired
Details about the customer associated with the payment evaluation.
expandarray<string>optional
Specifies which fields in the response should be expanded.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
payment_detailsobjectrequired
Details about the payment.

2 status codes
200Successful response.
client_device_metadata_detailsobjectoptional
Client device metadata attached to this payment evaluation.
created_atintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
customer_detailsobjectoptional
Customer details attached to this payment evaluation.
eventsarray<InsightsResourcesPaymentEvaluationEvent>required
Event information associated with the payment evaluation, such as refunds, dispute, early fraud warnings, or user interventions.
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:radar.payment_evaluation
outcomeobjectoptional
Indicates the final outcome for the payment evaluation.
payment_detailsobjectoptional
Payment details attached to this payment evaluation.
recommended_actionstringrequired
Recommended action based on the score of the `fraudulent_payment` signal. Possible values are `block`, `continue` and `request_three_d_secure`.
Allowed:blockcontinue
signalsobjectrequired
Collection of signals for this payment evaluation.
defaultError response.
errorobjectrequired

Error handling

Any other status is an error: Error response.