SDK reference · Python SDK
prov.authorize.issuer.decisions.create
prov.authorize.issuer.decisions.create in Python SDK. Decide one authorization (processor-neutral).
Signature
prov.authorize.issuer.decisions.create(**authorization: Any = …) -> AnyParameters
**authorizationAny
Request fields
program_idstring- The program (
iprg_). Required on a decision; on a simulate or backtest it is the scope's program. authorization_idstring- The processor's id for the authorization.
kindenum- An authorization (the default) or a 3-D Secure request. One of
authorization,three_ds. occurred_attimestamp- When the processor received it.
amountintegerRequired- Amount in minor units (cents).
currencystringRequired- ISO 4217 currency.
cardobjectRequired- The card, by the processor's token.
Show child attributes
tokenstringRequired- The processor's card token (never the card number).
last4string- The last four digits.
countrystring- Card country (ISO 3166 alpha-2).
merchantobject- The merchant fields on the authorization.
Show child attributes
mccstring- Merchant category code.
idstring- Acquirer merchant id.
namestring- Merchant descriptor.
countrystring- Merchant country.
channelenum- The channel. One of
card_not_present,ecommerce,recurring,card_present. three_dsobject- 3-D Secure data on this authorization, if any.
Show child attributes
resultenum- The 3-D Secure result. One of
authenticated,attempted,failed,not_authenticated. headless_browserboolean- The browser was headless.
hosted_browserboolean- The browser ran in a hosted environment.
cardholder_device_knownboolean- The cardholder used this device before.
tokenobject- Network token data.
Show child attributes
requestor_idstring- The token requestor id.
requestor_typestring- The token requestor type (
AI_AGENTmarks an agent).
networkobject- What the network says about the purchase.
Show child attributes
programenum- The network's agent program. One of
visa_vic,mastercard_agent_pay. agent_idstring- The network's agent identifier.
agent_flagboolean- The network flags the purchase as an agent's.
provenanceobject- A Provenance grant the purchase carries.
Show child attributes
grant_idstring- The grant (
grt_); counts only when it resolves and is active.
intentobject- Whether an AP2 mandate or Verifiable Intent chain verified for the purchase.
Show child attributes
verifiableboolean- It verified.
labelenum- Backtest only: what you know the purchase was. One of
agent,human.
Returns
Any The decision.
HTTP operation
POST /v1/authorize/issuer_decisions: Decide an authorization
Errors
- authentication_required
- card_number_refused
- insufficient_scope
- parameter_invalid
- parameter_missing
- plan_required
- rate_limit_exceeded
- resource_missing
Example
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Fernhill agent cards",
"processor": "lithic",
"mode": "live"
}),
})).json();
const program = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/issuer`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"document": {
"rules": [
{
"label": "Agent purchases over $200",
"when": [
{
"fact": "auth.amount",
"op": "gt",
"value": 20000
}
],
"require": {
"approval": true
}
}
]
}
}),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_decisions`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"program_id": program,
"authorization_id": "auth_7Hq2",
"occurred_at": "2026-11-22T15:04:05Z",
"amount": 24900,
"currency": "USD",
"card": {
"token": "card_tok_fernhill_1",
"last4": "4242"
},
"merchant": {
"mcc": "5732",
"id": "mid_brightbox",
"name": "Brightbox Electronics",
"country": "US"
},
"channel": "ecommerce",
"token": {
"requestor_id": "40010030273",
"requestor_type": "AI_AGENT"
}
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/authorize/issuer_programs", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Fernhill agent cards",
"processor": "lithic",
"mode": "live"
}).json()
program = step1["id"]
step2 = httpx.put(f"{api}/v1/authorize/issuer_policies/issuer", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"document": {
"rules": [
{
"label": "Agent purchases over $200",
"when": [
{
"fact": "auth.amount",
"op": "gt",
"value": 20000
}
],
"require": {
"approval": True
}
}
]
}
}).json()
data = httpx.post(f"{api}/v1/authorize/issuer_decisions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"program_id": program,
"authorization_id": "auth_7Hq2",
"occurred_at": "2026-11-22T15:04:05Z",
"amount": 24900,
"currency": "USD",
"card": {
"token": "card_tok_fernhill_1",
"last4": "4242"
},
"merchant": {
"mcc": "5732",
"id": "mid_brightbox",
"name": "Brightbox Electronics",
"country": "US"
},
"channel": "ecommerce",
"token": {
"requestor_id": "40010030273",
"requestor_type": "AI_AGENT"
}
}).json()