# Customer risk rating (/score-api/endpoints/customer-risk-rating)



{/* Written by scripts/build-use-cases.mjs from internal/usecases/catalog.json and use-cases/site.json. Change those, not this file. */}

**A risk rating for every customer, kept up to date.** Rate each customer at onboarding, and again whenever something changes. Send the profile, the purpose of the account and recent activity, and get a rating with reasons you can show an auditor.

| Endpoint                       | Price          | Group            |
| ------------------------------ | -------------- | ---------------- |
| `POST /v1/score/customer_risk` | $0.01 per call | KYB & Compliance |

## Request [#request]

Send what you know in one `context` object. `customer` is required; every other field is optional. A field can hold text, JSON or CSV.

<Tabs items="[&#x22;curl&#x22;, &#x22;Python&#x22;, &#x22;TypeScript&#x22;]">
  <Tab value="curl">
    ```bash
    curl https://api.finic.ai/v1/score/customer_risk \
      --header "Authorization: Bearer $FINIC_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "context": {
          "customer": { "name": "Halcyon Trading FZE", "type": "business", "industry": "general trading", "incorporated": "2025-02-10", "country": "AE" },
          "owners": [{ "name": "R. Haddad", "role": "sole owner", "other_directorships": 11 }],
          "account_purpose": "Paying suppliers in Asia, about $50,000 a month",
          "source_of_funds": "Sales revenue. No financial statements provided yet.",
          "activity": "date,direction,amount_usd,counterparty\n2026-11-03,in,250000,Third party A\n2026-11-04,out,249500,Supplier in Hong Kong\n2026-11-10,in,400000,Third party B\n2026-11-11,out,399000,Supplier in Hong Kong"
        }
      }'
    ```
  </Tab>

  <Tab value="Python">
    ```python
    import os
    import requests

    response = requests.post(
        "https://api.finic.ai/v1/score/customer_risk",
        headers={"Authorization": f"Bearer {os.environ['FINIC_API_KEY']}"},
        json={
            "context": {
                "customer": { "name": "Halcyon Trading FZE", "type": "business", "industry": "general trading", "incorporated": "2025-02-10", "country": "AE" },
                "owners": [{ "name": "R. Haddad", "role": "sole owner", "other_directorships": 11 }],
                "account_purpose": "Paying suppliers in Asia, about $50,000 a month",
                "source_of_funds": "Sales revenue. No financial statements provided yet.",
                "activity": "date,direction,amount_usd,counterparty\n2026-11-03,in,250000,Third party A\n2026-11-04,out,249500,Supplier in Hong Kong\n2026-11-10,in,400000,Third party B\n2026-11-11,out,399000,Supplier in Hong Kong"
            }
        },
        timeout=30,
    )
    response.raise_for_status()
    print(response.json()["score"])
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const response = await fetch("https://api.finic.ai/v1/score/customer_risk", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.FINIC_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        context: {
          "customer": { "name": "Halcyon Trading FZE", "type": "business", "industry": "general trading", "incorporated": "2025-02-10", "country": "AE" },
          "owners": [{ "name": "R. Haddad", "role": "sole owner", "other_directorships": 11 }],
          "account_purpose": "Paying suppliers in Asia, about $50,000 a month",
          "source_of_funds": "Sales revenue. No financial statements provided yet.",
          "activity": "date,direction,amount_usd,counterparty\n2026-11-03,in,250000,Third party A\n2026-11-04,out,249500,Supplier in Hong Kong\n2026-11-10,in,400000,Third party B\n2026-11-11,out,399000,Supplier in Hong Kong"
        },
      }),
    });
    const { score, questions } = await response.json();
    ```
  </Tab>
</Tabs>

## Fields you send [#fields-you-send]

Send the details, not only an ID: an account ID tells the score nothing, but the account's age, profile and history do. Fields that are not in this list are also read.

| Field                 |          | Description                                                                                      |
| --------------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `customer`            | Required | A description of the person or business, not a customer ID: what they do, where, and since when. |
| `owners`              | Optional | The owners and controllers, with their roles and other businesses.                               |
| `account_purpose`     | Optional | What the customer says the account is for, and the volume they expect.                           |
| `source_of_funds`     | Optional | Where the customer says the money comes from, and what supports it.                              |
| `activity`            | Optional | Recent transactions, listed or summarized: amounts, counterparties and timing.                   |
| `kyc`                 | Optional | What your identity and business checks found, written out. Not just pass or fail.                |
| `adverse_information` | Optional | The text of news or records about the customer.                                                  |
| `other_context`       | Optional | Any other information, structured or unstructured, that is useful for scoring.                   |

## Response [#response]

`score` runs from 0, the lowest risk, to 1000, the highest. `questions` are the yes/no questions behind it, each with the probability that the answer is yes.

```json title="200 OK"
{
  "score": 812,
  "questions": [
    {
      "text": "Is the activity out of line with the stated purpose of the account?",
      "probability": 0.94
    },
    {
      "text": "Does money leave soon after it arrives?",
      "probability": 0.92
    },
    {
      "text": "Is the source of funds left unexplained?",
      "probability": 0.8
    },
    {
      "text": "Is this a type of business with a higher risk of money laundering?",
      "probability": 0.71
    }
  ],
  "request_id": "req_01M4YF1068X8B4C458ENPD4JHT"
}
```

## The questions behind the score [#the-questions-behind-the-score]

1. Is the activity out of line with the stated purpose of the account?
2. Does money leave soon after it arrives?
3. Is the source of funds left unexplained?
4. Is this a type of business with a higher risk of money laundering?

Every organization gets the same questions for this score. To use your own questions, or to calibrate a score to your own outcomes, copy it to a [custom scoring model](/score-model) in the Finic app (Starter plan and above).

## Turn the score into an action [#turn-the-score-into-an-action]

These thresholds are examples. Choose your own, and change them as you learn.

| Score       | Action  | Example                       |
| ----------- | ------- | ----------------------------- |
| Under 300   | Approve | Rate as low risk.             |
| 300 to 599  | Step up | Ask for more information.     |
| 600 to 849  | Review  | Send to a compliance analyst. |
| 850 or more | Block   | Decline or close the account. |

## Errors [#errors]

| Status | `type`                 | When                                                                                                            |
| ------ | ---------------------- | --------------------------------------------------------------------------------------------------------------- |
| 400    | `invalid_request`      | `context` is missing, is not a JSON object, or a required field (`customer`) is empty. `param` names the field. |
| 401    | `authentication_error` | The API key is missing or not valid.                                                                            |
| 402    | `insufficient_credit`  | The organization has no credit. Add credit in the Finic app.                                                    |
| 429    | `rate_limited`         | Too many requests. Retry with exponential backoff.                                                              |

See the [API reference](/reference) for every error and limit, and [Pricing](/pricing) for what a call costs.
