# prov.authorize.assessments.report_outcome

prov.authorize.assessments.report_outcome in Python SDK. Report what happened to the order after its decision (free): `chargeback`, `fraud`, `refund_abuse` or `legitimate`.

## Signature

```python
prov.authorize.assessments.report_outcome(assessment_id: str, outcome: str, note: Optional[str] = …) -> Any
```

## Parameters

- `assessment_id` (str)
- `outcome` (str)
- `note` (Optional[str], optional)

## Returns

`Any`

## HTTP operation

[`POST /v1/authorize/checkout_assessments/{id}/outcome`](https://provenanceauth.com/docs/api/assessments.md#post-v1-authorize-checkout-assessments-id-outcome): Report an order's outcome

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`manage_policies_required`](https://provenanceauth.com/docs/platform/errors.md#manage_policies_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

## Example

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/checkout_assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "cart": {
      "order_id": "ord_8813",
      "total": 3800,
      "currency": "USD",
      "merchant_id": "harborbean",
      "origin": "https://harborbean.example",
      "items": [
        {
          "sku": "mug-sage",
          "name": "Stoneware mug",
          "quantity": 2,
          "unit_amount": 1900
        }
      ]
    }
  }),
})).json();
const assessmentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/checkout_assessments/${assessmentId}/outcome`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({ "outcome": "chargeback", "note": "Card holder disputed the charge" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/authorize/checkout_assessments", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "cart": {
        "order_id": "ord_8813",
        "total": 3800,
        "currency": "USD",
        "merchant_id": "harborbean",
        "origin": "https://harborbean.example",
        "items": [
            {
                "sku": "mug-sage",
                "name": "Stoneware mug",
                "quantity": 2,
                "unit_amount": 1900
            }
        ]
    }
}).json()
assessment_id = step1["id"]
data = httpx.post(f"{api}/v1/authorize/checkout_assessments/{assessment_id}/outcome", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "outcome": "chargeback",
    "note": "Card holder disputed the charge"
}).json()
```
