SDK reference · Python SDK
prov.authorize.issuer.programs.update
prov.authorize.issuer.programs.update in Python SDK. mode="live" with processor credentials is Enterprise (402 issuer_live_plan_required).
Signature
prov.authorize.issuer.programs.update(program_id: str, **body: Any = …) -> AnyParameters
program_idstrRequired**bodyAny
Request fields
idstringpathRequired- The program's ID (
iprg_). namestring- The program's name.
processorenum- The card processor. One of
lithic,marqeta. modeenum- Shadow or live. One of
shadow,live. fail_modeenum- The fail mode. One of
processor_default,fail_open,fail_closed. suspectedobject- How a program finds suspected agents (purchases no network marked and no grant carries) and what a suspected match may do. By default a match is logged and notified only.
Show child attributes
thresholdnumber- A match below this confidence is ignored. Default 0.5.
heuristicsobject- Which heuristics run (all on by default).
Show child attributes
merchantboolean- The merchant is one of
agent_merchants. deviceboolean- 3-D Secure data shows a headless or hosted browser, or a device the cardholder never used.
velocityboolean- Several distinct merchants on one card in a short window.
networkboolean- The network flags the purchase as an agent's.
actionenumlog(default): record and notify only.ask: needs an approval.apply_rules: your rules apply as to a marked agent. One oflog,ask,apply_rules.agent_merchantsarray of strings- Patterns over the merchant id or name (
*any run,?one character). They add to your issuer's list and each card's (/v1/authorize/issuer_agent_merchants). inherit_agent_merchantsboolean- False leaves your issuer account's merchant list out of this program. Default true.
velocityobject- The velocity heuristic's window.
Show child attributes
window_secondsinteger- The window. Default 600.
distinct_merchantsinteger- Distinct merchants in the window that count. Default 4.
approvalsobject- A program's approval settings.
Show child attributes
tolerance_percentnumber- An authorization may be this much over the approved amount (0 to 0.5 of it; default 0.1).
tolerance_amountinteger- Plus this many minor units (default 0).
use_within_secondsinteger- How long after it is asked for an approval may be used (default 86400).
decoupled_three_dsboolean- Answer an ask at the 3-D Secure hooks with a challenge that a Provenance approval answers (default false).
deliveryenum- Who tells the cardholder: Provenance (
provenance, the default) or your own app's push (issuer_push: theauthorize.issuer_approval.requestedwebhook carries the link and token; with no endpoint taking it, Provenance sends to the contact given). One ofprovenance,issuer_push.
appobject | null- The issuer's mobile app, so the approval SDK can use platform passkeys on Provenance's domain: listed in
/.well-known/assetlinks.json(passkeys only) andapple-app-site-association(webcredentials), and the Android app's origin is accepted on this program's approvals. Null removes it.Show child attributes
android_packagestring | null- The Android application id (
com.bank.app); needsandroid_cert_sha256. android_cert_sha256array of strings- SHA-256 fingerprints of the app's signing certificates,
AA:BB:…(32 bytes). ios_app_idsarray of strings- iOS app ids,
TEAMID.bundle.id.
Returns
Any The program.
HTTP operation
PATCH /v1/authorize/issuer_programs/{id}: Update a card program
Errors
- authentication_required
- insufficient_scope
- issuer_live_plan_required
- parameter_invalid
- 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" }),
})).json();
const program = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs/${program}`, {
method: "PATCH",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"mode": "live",
"suspected": {
"action": "apply_rules",
"threshold": 0.6
}
}),
})).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"
}).json()
program = step1["id"]
data = httpx.patch(f"{api}/v1/authorize/issuer_programs/{program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"mode": "live",
"suspected": {
"action": "apply_rules",
"threshold": 0.6
}
}).json()