SDK reference · Python SDK
prov.authorize.store_orders.report_outcome
prov.authorize.store_orders.report_outcome in Python SDK. Report what happened to a store order after its decision (free); the latest report wins.
Signature
prov.authorize.store_orders.report_outcome(store_order_id: str, outcome: str, note: Optional[str] = …) -> AnyParameters
store_order_idstrRequiredoutcomestrRequirednoteOptional[str]
Request fields
idstringpathRequired- The store order's ID (
sto_). 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/store_orders/{id}/outcome: Report a store order's outcome
Errors
- authentication_required
- insufficient_scope
- manage_policies_required
- parameter_invalid
- rate_limit_exceeded
- resource_missing
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H/outcome`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"outcome": "legitimate",
"note": "Customer confirmed the order by phone"
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H/outcome", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"outcome": "legitimate",
"note": "Customer confirmed the order by phone"
}).json()