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] = …) -> Any

Parameters

assessment_idstrRequired
referencesOptional[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

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

Was this page helpful? Send us feedback

LLM? Read llms.txt.