# Create a customer evaluation Creates a new `CustomerEvaluation` object. ## Returns Returns a `CustomerEvaluation` object if creation succeeds. ## Parameters - `evaluation_context` (array of objects, required) Array of context entries for the evaluation. - `evaluation_context.type` (enum, required) The type of context entry. Possible enum values: - `client_details` - `customer_details` - `evaluation_context.client_details` (object, optional) Client details context. - `evaluation_context.client_details.radar_session` (string, required) ID for the Radar Session associated with the customer evaluation. - `evaluation_context.customer_details` (object, optional) Customer details context. - `evaluation_context.customer_details.customer` (string, optional) Stripe customer ID - `evaluation_context.customer_details.customer_data` (object, optional) Customer data - `evaluation_context.customer_details.customer_data.email` (string, optional) Customer email - `evaluation_context.customer_details.customer_data.name` (string, optional) Customer name - `evaluation_context.customer_details.customer_data.phone` (string, optional) Customer phone - `event_type` (enum, required) The type of evaluation event. Possible enum values: - `login` - `registration` #### Registration from customer ID #### Registration from customer ID ```curl curl https://api.stripe.com/v1/radar/customer_evaluations \ -u "<>" \ -d event_type=registration \ -d "evaluation_context[0][type]=client_details" \ -d "evaluation_context[0][client_details][radar_session]=rse_1ST9qQ9XxSPY66dBmI6YhJ9u" \ -d "evaluation_context[1][type]=customer_details" \ -d "evaluation_context[1][customer_details][customer]=cus_1STA7a9XxSPY66dBhVL80eEC" ``` ### Response ```json { "id": "ceval_1STAJ19XxSPY66dBEesAnzjw", "object": "radar.customer_evaluation", "event_type": "registration", "livemode": true, "created_at": 1715769600, "customer": "cus_1STA7a9XxSPY66dBhVL80eEC", "events": null, "signals": { "multi_accounting": { "score": 50, "evaluated_at": 1715769600, "risk_level": null } } } ``` #### Registration from customer data #### Registration from customer data ```curl curl https://api.stripe.com/v1/radar/customer_evaluations \ -u "<>" \ -d event_type=registration \ -d "evaluation_context[0][type]=client_details" \ -d "evaluation_context[0][client_details][radar_session]=rse_1ST9qQ9XxSPY66dBmI6YhJ9u" \ -d "evaluation_context[1][type]=customer_details" \ --data-urlencode "evaluation_context[1][customer_details][customer_data][email]=test@example.com" \ -d "evaluation_context[1][customer_details][customer_data][name]=Test User" \ -d "evaluation_context[1][customer_details][customer_data][phone]=1234567890" ``` ### Response ```json { "id": "ceval_1STAJ19XxSPY66dBEesAnzjw", "object": "radar.customer_evaluation", "event_type": "registration", "livemode": true, "created_at": 1715769600, "customer": "cus_1STA7a9XxSPY66dBhVL80eEC", "events": null, "signals": { "multi_accounting": { "score": 50, "evaluated_at": 1715769600, "risk_level": null } } } ``` #### Login from customer ID #### Login from customer ID ```curl curl https://api.stripe.com/v1/radar/customer_evaluations \ -u "<>" \ -d event_type=login \ -d "evaluation_context[0][type]=client_details" \ -d "evaluation_context[0][client_details][radar_session]=rse_1ST9qQ9XxSPY66dBmI6YhJ9u" \ -d "evaluation_context[1][type]=customer_details" \ -d "evaluation_context[1][customer_details][customer]=cus_1STA7a9XxSPY66dBhVL80eEC" ``` ### Response ```json { "id": "ceval_1STAJ19XxSPY66dBEesAnzjw", "object": "radar.customer_evaluation", "event_type": "login", "livemode": true, "created_at": 1715769600, "customer": "cus_1STA7a9XxSPY66dBhVL80eEC", "events": null, "signals": { "account_sharing": { "score": 50, "evaluated_at": 1715769600, "risk_level": null } } } ```