# Policy abuse (/score-api/endpoints/policy-abuse)



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

**Keep your offers for the customers they were meant for.** Promo codes, free trials, refunds and returns are abused by people who look like customers. Send the claim with the customer's history, and get a score before you honor it.

| Endpoint                      | Price           | Group          |
| ----------------------------- | --------------- | -------------- |
| `POST /v1/score/policy_abuse` | $0.002 per call | Policy & Abuse |

## Request [#request]

Send what you know in one `context` object. `claim` 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/policy_abuse \
      --header "Authorization: Bearer $FINIC_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{
        "context": {
          "claim": { "type": "refund", "reason": "item_not_received", "amount_usd": 240, "customer_message": "Package never showed up, I want my money back" },
          "order": { "id": "1150", "items": "2 x wireless headphones", "total_usd": 240, "tracking": { "status": "delivered", "signed_by": "resident", "delivered": "2026-11-12" } },
          "history": "order,total_usd,claim\n1041,89,item_not_received\n1077,310,item_not_received\n1102,45,\n1150,240,item_not_received",
          "customer": { "created": "2026-08-20", "linked_accounts": [{ "id": "cus_4471", "status": "closed_for_abuse" }, { "id": "cus_5120", "status": "closed_for_abuse" }] }
        }
      }'
    ```
  </Tab>

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

    response = requests.post(
        "https://api.finic.ai/v1/score/policy_abuse",
        headers={"Authorization": f"Bearer {os.environ['FINIC_API_KEY']}"},
        json={
            "context": {
                "claim": { "type": "refund", "reason": "item_not_received", "amount_usd": 240, "customer_message": "Package never showed up, I want my money back" },
                "order": { "id": "1150", "items": "2 x wireless headphones", "total_usd": 240, "tracking": { "status": "delivered", "signed_by": "resident", "delivered": "2026-11-12" } },
                "history": "order,total_usd,claim\n1041,89,item_not_received\n1077,310,item_not_received\n1102,45,\n1150,240,item_not_received",
                "customer": { "created": "2026-08-20", "linked_accounts": [{ "id": "cus_4471", "status": "closed_for_abuse" }, { "id": "cus_5120", "status": "closed_for_abuse" }] }
            }
        },
        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/policy_abuse", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.FINIC_API_KEY}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        context: {
          "claim": { "type": "refund", "reason": "item_not_received", "amount_usd": 240, "customer_message": "Package never showed up, I want my money back" },
          "order": { "id": "1150", "items": "2 x wireless headphones", "total_usd": 240, "tracking": { "status": "delivered", "signed_by": "resident", "delivered": "2026-11-12" } },
          "history": "order,total_usd,claim\n1041,89,item_not_received\n1077,310,item_not_received\n1102,45,\n1150,240,item_not_received",
          "customer": { "created": "2026-08-20", "linked_accounts": [{ "id": "cus_4471", "status": "closed_for_abuse" }, { "id": "cus_5120", "status": "closed_for_abuse" }] }
        },
      }),
    });
    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                                                                                                          |
| --------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
| `claim`         | Required | The refund, return or promotion being claimed, with the reason and the customer's own words.                         |
| `order`         | Optional | A description of the order, not an order ID: the items, the total, and what tracking shows.                          |
| `history`       | Optional | The customer's earlier orders and claims, with the reason for each claim.                                            |
| `customer`      | Optional | A description of the customer, not a customer ID: the account's age, its addresses, and any links to other accounts. |
| `policy`        | Optional | The policy the claim falls under, written out.                                                                       |
| `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": 902,
  "questions": [
    {
      "text": "Does the carrier show the order as delivered?",
      "probability": 0.96
    },
    {
      "text": "Does this customer ask for refunds far more often than is usual?",
      "probability": 0.93
    },
    {
      "text": "Do the earlier claims give the same reason?",
      "probability": 0.88
    },
    {
      "text": "Is the customer linked to accounts closed for abuse?",
      "probability": 0.85
    }
  ],
  "request_id": "req_01M4YF1068X8B4C458ENPD4JHT"
}
```

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

1. Does the carrier show the order as delivered?
2. Does this customer ask for refunds far more often than is usual?
3. Do the earlier claims give the same reason?
4. Is the customer linked to accounts closed for abuse?

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 | Honor the claim.   |
| 300 to 599  | Step up | Ask for proof.     |
| 600 to 849  | Review  | Hold for an agent. |
| 850 or more | Block   | Decline the claim. |

## Errors [#errors]

| Status | `type`                 | When                                                                                                         |
| ------ | ---------------------- | ------------------------------------------------------------------------------------------------------------ |
| 400    | `invalid_request`      | `context` is missing, is not a JSON object, or a required field (`claim`) 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.
