SDK reference · Python SDK

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

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

Parameters

assessment_idstrRequired
outcomestrRequired
noteOptional[str]

Request fields

idstringpathRequired
The checkout assessment's ID (cas_).
outcomeenumRequired
What happened to the order. One of chargeback, fraud, refund_abuse, legitimate.
notestring
A note for your team. Leave out customer details.

Returns

Any The recorded outcome.

HTTP operation

POST /v1/authorize/checkout_assessments/{id}/outcome: Report an order's outcome

Errors

Example

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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.