SDK reference · Python SDK

prov.authorize.verifications.create

prov.authorize.verifications.create in Python SDK.

Signature

prov.authorize.verifications.create(intent_token: str, action_description: Optional[str] = …, action_payload: Any = …, context: Optional[dict] = …) -> Any

Parameters

intent_tokenstrRequired
action_descriptionOptional[str]
action_payloadAny
contextOptional[dict]

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
intent_tokenstringRequired
The token the agent presented.
action_descriptionstring
The action the token was minted for, if you know it.
action_payloadany
The exact payload (for a checkout, your checkoutBinding of the order). Required without action_description.
contextobject
Facts your checkout rules read.

Returns

Any The check. valid is false with a reason when a check fails.

HTTP operation

POST /v1/authorize/verifications: Verify an intent token (paid)

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": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_1",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/verifications`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "intent_token": intentToken,
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    }
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.