SDK reference · Python SDK
prov.authorize.assessments.create_evidence_pack
prov.authorize.assessments.create_evidence_pack in Python SDK. A chargeback evidence pack for a frictionless assessment, or one whose challenge was approved (Growth+).
Signature
prov.authorize.assessments.create_evidence_pack(assessment_id: str, references: Optional[list] = …) -> AnyParameters
assessment_idstrRequiredreferencesOptional[list]
Request fields
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The assessment's ID (
cas_…). referencesarray of objects- Your own fulfillment references, labelled as yours in the pack (
references.json).Show child attributes
kindenumRequired- What the reference is. One of
tracking,delivery_photo,login,note. valuestringRequired- The reference (a tracking number, a photo URL, a login record, a note).
Returns
Any The pack, ready to download.
HTTP operation
POST /v1/authorize/checkout_assessments/{id}/evidence_packs: Build an evidence pack from an assessment
Errors
- authentication_required
- insufficient_scope
- invalid_json
- parameter_invalid
- plan_required
- rate_limit_exceeded
- resource_missing
Example
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
"action_description": "Checkout at harborbean.example: order ord_8814, USD 38.00",
"action_payload": {
"order_id": "ord_8814",
"total": 3800,
"currency": "usd",
"merchant_id": "harborbean",
"origin": "https://harborbean.example",
"items": [
{
"sku": "mug-sage",
"name": "Stoneware mug",
"quantity": 2,
"unit_amount": 1900
}
]
},
"agent_session_id": "sess_reference_evidence",
"device_id": "dev_00000000000000000000000000000001",
"biometric_present": true,
"audience": "https://harborbean.example"
}),
})).json();
const intentToken = step1.intent_token;
const step2 = 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_8814",
"total": 3800,
"currency": "USD",
"merchant_id": "harborbean",
"origin": "https://harborbean.example",
"items": [
{
"sku": "mug-sage",
"name": "Stoneware mug",
"quantity": 2,
"unit_amount": 1900
}
]
},
"intent_token": intentToken
}),
})).json();
const assessmentId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/checkout_assessments/${assessmentId}/evidence_packs`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"references": [
{
"kind": "tracking",
"value": "1Z999AA10123456784"
},
{
"kind": "note",
"value": "Delivered to the front door."
}
]
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
"action_description": "Checkout at harborbean.example: order ord_8814, USD 38.00",
"action_payload": {
"order_id": "ord_8814",
"total": 3800,
"currency": "usd",
"merchant_id": "harborbean",
"origin": "https://harborbean.example",
"items": [
{
"sku": "mug-sage",
"name": "Stoneware mug",
"quantity": 2,
"unit_amount": 1900
}
]
},
"agent_session_id": "sess_reference_evidence",
"device_id": "dev_00000000000000000000000000000001",
"biometric_present": True,
"audience": "https://harborbean.example"
}).json()
intent_token = step1["intent_token"]
step2 = httpx.post(f"{api}/v1/authorize/checkout_assessments", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"cart": {
"order_id": "ord_8814",
"total": 3800,
"currency": "USD",
"merchant_id": "harborbean",
"origin": "https://harborbean.example",
"items": [
{
"sku": "mug-sage",
"name": "Stoneware mug",
"quantity": 2,
"unit_amount": 1900
}
]
},
"intent_token": intent_token
}).json()
assessment_id = step2["id"]
data = httpx.post(f"{api}/v1/authorize/checkout_assessments/{assessment_id}/evidence_packs", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"references": [
{
"kind": "tracking",
"value": "1Z999AA10123456784"
},
{
"kind": "note",
"value": "Delivered to the front door."
}
]
}).json()