SDK reference · Node SDK
prov.authorize.assessments.get
prov.authorize.assessments.get in Node SDK.
Signature
prov.authorize.assessments.get(id: string, opts?: { raw?: boolean }): Promise<CheckoutAssessment | Record<string, unknown>>Parameters
idstringRequiredopts{ raw?: boolean }
Request fields
idstringpathRequired- The assessment's ID (
cas_…).
Returns
Promise<CheckoutAssessment | Record<string, unknown>> The assessment.
HTTP operation
GET /v1/authorize/checkout_assessments/{id}: Retrieve a checkout assessment
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}`, {
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();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.get(f"{api}/v1/authorize/checkout_assessments/{assessment_id}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()