Authorize · Guide
Issuer agent controls
Use this if you issue cards, or run a card program on a processor, and want your own rules for purchases agents make: ask about large purchases, decline gambling, ask the first time an agent uses a card. Provenance decides each authorization your program asks about and answers approve, decline or no_opinion, which hands it back to your program's own rules.
Before you begin: a Pro plan or above, and an API key with the authorize scope (or a console session with Manage policies for changes). Your processor calls Provenance directly (Lithic or Marqeta, step 6), or you send authorizations to POST / yourself.
1. Create a card program
POST / with a name and your processor. A program starts the safe way:
| Setting | Starts as | Means |
|---|---|---|
mode | shadow | Every decision is recorded with what it would have answered; your processor hears no_ |
fail_ | processor_ | When Provenance is slow or down, your processor's own rules and stand-in decide. fail_ approves, fail_ declines |
suspected. | log | Purchases that only look like an agent's are recorded and sent on the webhook, never acted on |
Change any of them with PATCH /.
2. Which purchases count as an agent's
Every decision says why it was in scope, in agent.basis, and how sure Provenance is, in agent.confidence:
| Basis | When | Confidence |
|---|---|---|
network_ | The token requestor's type is AI_, or the network names its agent program or agent | 1 |
provenance_ | The purchase names an active Provenance grant | 1 |
suspected | Heuristics: a merchant you list in suspected., a headless or hosted browser in 3-D Secure data, several merchants on one card in minutes, a network agent flag | Below 1 |
none | Anything else: your program's own rules decide | 0 |
A suspected match needs at least the program's suspected.threshold (0.5 by default). Set suspected.action to apply_rules (your rules apply as to a marked agent) or ask once the backtest shows how many of your cardholders' own purchases it would catch.
Merchant lists at three scopes. The merchants that mark a suspected agent can be listed for your whole issuer account, for a program, and for one card. The lists add up, the narrower to the broader:
| Scope | Where | Opt out of the broader lists |
|---|---|---|
| Issuer account (every program) | PUT / with scope: issuer | — |
| Program | suspected. on the program | suspected. leaves the issuer's list out |
| Card | PUT / with scope: card, program_ and card_ | inherit: false leaves the issuer's and the program's lists out |
Provenance has no built-in list. A backtest reads each card's merged list.
3. Write the rules
Rules read the issuer facts (GET / lists each with its meaning) and take one action: frictionless (approve), approval (ask), deny (decline) or notify. Save them for every program with PUT / and scope issuer, or for one program with its ID:
{
"document": {
"rules": [
{
"label": "Agent purchases over $200",
"when": [
{ "fact": "auth.amount", "op": "gt", "value": 20000 },
{ "fact": "agent.key", "op": "is_not_empty", "value": true }
],
"require": { "approval": true }
},
{
"label": "A new agent on the card",
"when": [{ "fact": "agent.first_seen", "op": "eq", "value": true }],
"require": { "approval": true }
}
]
}
}
Both scopes run on every decision and the stricter outcome wins (decline, then ask, then approve), so a program can tighten your rules but never loosen them. A fact your processor doesn't send is null, and a rule on null doesn't match.
An authorization never waits for a person. A rule that asks approves only when a matching approval already exists; otherwise the decision declines, so the agent can get the approval and try again (step 8).
4. Try it before it answers
- POST
/runs one authorization through a draft and writes nothing.v1/ authorize/ issuer_ policies/ {scope}/ simulate - POST
/replays up to 10,000 authorizations from your history. Label rowsv1/ authorize/ issuer_ policies/ {scope}/ backtest agentorhumanand the result shows how many of each the suspected-agent thresholds 0.3, 0.5, 0.7 and 0.9 would catch. - In the console, Rules › Authorizations edits a scope's rules one at a time (the bank's or a program's), in
words, with amounts in dollars rather than cents. Its 30-day test is the shadow comparison. Read a saved
version with GET
/.v1/ authorize/ issuer_ policies/ {scope}/ versions/ {version} - Save a draft with POST
/, run it beside the live rules with POSTv1/ authorize/ issuer_ policies/ {scope}/ versions /, and read GETv1/ authorize/ issuer_ policies/ {scope}/ versions/ {version}/ shadow /.v1/ authorize/ issuer_ policies/ {scope}/ shadow_ report - See how each rule performs with GET
/: the authorizations each rule decided, their value, the outcome shares and the four labelled results, over the last 30 days by default. A decline or an ask counts as right or wrong once a member reviews it ("Right call" or "Should have approved"); an approve shows as No label yet, since no processor tells us one was disputed. A scope's page lists its own rules and the fallback, the authorizations neither scope's rules decided.v1/ authorize/ issuer_ policies/ {scope}/ performance
5. Decide authorizations
Send each authorization with the processor's card token, never the card number. A body with a card number anywhere is refused with card_number_refused, unread, and no request log keeps it.
{
"program_id": "iprg_01M82YKHK2HDGTC7V1YPWKW153",
"authorization_id": "auth_7Hq2",
"amount": 24900,
"currency": "USD",
"card": { "token": "card_tok_fernhill_1", "last4": "4242" },
"merchant": { "mcc": "5732", "id": "mid_brightbox", "name": "Brightbox Electronics", "country": "US" },
"token": { "requestor_id": "40010030273", "requestor_type": "AI_AGENT" }
}
The decision carries outcome (what the rules decided), action (what to tell your processor) and reason. Every purchase in scope, suspected ones included, is sent to your endpoints on authorize.issuer_decision.made. When the shadow decisions look right, set the program's mode to live.
6. Connect your processor
Set the program's processor, then POST /. It returns the URL for each hook to set at your processor.
| Processor | Hooks | Credentials |
|---|---|---|
| Lithic | Auth Stream Access (lithic_) and 3DS Customer Decisioning (lithic_) | Send the HMAC secret Lithic gives you (whsec_); requests are checked against it, with 5 minutes' tolerance |
| Marqeta | Gateway JIT Funding (marqeta_) and the 3DS decision (marqeta_) | Send an empty body; set the username and password returned (shown once) as the gateway's Basic credentials |
Each answer is in your processor's own shape. Card-number fields in a request are dropped before anything reads them.
| Decision | Lithic ASA | Lithic 3DS | Marqeta JIT | Marqeta 3DS |
|---|---|---|---|---|
| Approve | APPROVED | APPROVE | 200, funded | EXEMPT |
| Ask | AGENT_ (a custom decline) | CHALLENGE_ | 402, SOFT_ | CHALLENGE |
| Decline | AGENT_ (a custom decline) | DECLINE | 402, TRANSACTION_ | DECLINE |
| Decline over a card limit (step 7) | AGENT_ (a custom decline) | DECLINE | 402, TRANSACTION_ | DECLINE |
| No opinion | APPROVED (Lithic's Auth Rules already ran) | 503, Lithic decides | 200, funded | 503, Marqeta decides |
Every hook has a budget: Lithic ASA and Marqeta JIT 3 seconds, Lithic 3DS 1 second, Marqeta 3DS 1.5 seconds. A decision not ready a quarter of a second before it gets the program's fail_mode answer: processor_default (503 at the 3-D Secure hooks and Marqeta JIT, so your processor's own rules or stand-in decide; APPROVED at Lithic ASA, which has no pass answer), fail_open or fail_closed. The decision is still recorded, with fail and reason: deadline_missed.
7. Limit what each agent spends on a card
POST / sets one agent's limit on one card. The agent key is the agent.key a decision shows (for example token_requestor:40010030273), or * for each agent on the card without a limit of its own: each agent gets the whole cap, never a share of it.
One cap for the whole card. Agent key card:* sets a cap across every agent on the card. It is checked beside each agent's own limit, in the same reservation, and the stricter one decides; the decision's limit.scope says which (agent or card). Its spent counts every agent's spend on the card.
{
"program_id": "iprg_01M82YKHK2HDGTC7V1YPWKW153",
"card_token": "card_tok_fernhill_1",
"agent_key": "token_requestor:40010030273",
"window": "month",
"cap": 50000,
"currency": "USD",
"per_transaction": 25000,
"locks": { "mccs": ["5732", "5734"], "merchants": ["Brightbox*"] },
"on_exceed": "reject"
}
| Field | Means |
|---|---|
window | day, week (from Monday) or month in UTC, or lifetime |
cap | The most the agent may spend in the window, in minor units of currency |
per_ | The most one purchase may be |
locks | Only these merchant category codes, or merchants whose id or descriptor matches a pattern (* matches any run). Empty means any |
on_ | reject (the default), or challenge: declined with approval_ until the cardholder approves (decline and ask are still accepted) |
Each decision reads what is left as the fact agent.limit_remaining, so a rule can ask before the limit runs out. A purchase over what is left, over the per-purchase cap, outside the locks, or in another currency is over the limit, and the stricter of the limit's answer and your rules' wins. The decision's limit says why. Its reason is agent_limit_exceeded, or agent_limit_locked for the locks. A suspected match that only logs never counts against a limit.
The reservation ledger. An authorization Provenance doesn't decline is held against the agent's limit (GET /). Two authorizations racing for the last of a limit can't both pass: the second is declined. A hold counts until a transaction event moves it, or for seven days if none arrives (a self-hosted API can change that).
Point your processor's transaction webhook at the program's lithic_transactions or marqeta_transactions hook. The credentials call returns both URLs, and a Lithic program can send a separate events_webhook_secret. Or send events yourself with POST /:
| Event | Lithic | Marqeta | What it does |
|---|---|---|---|
authorization | AUTHORIZATION approved | authorization | Confirms the hold |
decline | AUTHORIZATION declined | authorization declined | Releases it |
incremental | AUTHORIZATION_ (an increase) | authorization. | Adds to the hold |
reversal | AUTHORIZATION_ | authorization. | Releases part of it, or all |
expiry | AUTHORIZATION_ | authorization. | Releases it |
clearing | CLEARING | authorization. | Counts the cleared amount instead of the hold |
refund | RETURN | refund naming the authorization | Gives settled money back to the window |
Each event applies once by its id, so a redelivery changes nothing. An authorization Provenance decided but didn't hold, because your processor stood in for it, is placed from the decision when its event arrives; spend approved that way can go past a limit, and the ledger shows it.
8. Ask the cardholder without holding the authorization
A rule, a card limit or a suspected agent can step up an agent's purchase to the cardholder's passkey: the rule's outcome is challenge.
The cardholder approves that purchase on their phone with their passkey, unlocked with Face ID, a fingerprint or the device PIN; Provenance requires the device to verify the person and binds the approval to the amount, the currency and the store.
The answer comes back to you by webhook and on the approval, and inside 3-D Secure it goes to your processor's challenge decision.
What stays with your processor and its ACS: Provenance answers the processor's decision hooks and is not an ACS, a 3-D Secure server or a directory server. It doesn't produce an ECI, a CAVV or any authentication value, and it isn't certified by EMVCo or a card network. Your ACS reports the authentication in the 3-D Secure result after it gets the answer.
There are three ways to ask, and none of them holds an authorization while a phone buzzes.
Before checkout. Your agent-facing API asks for an approval of the agent's cart with POST /: the program, the card token, the agent key and the cart (its origin is the store). The cardholder approves on the same approval page and passkey as any cart approval. The authorization that follows is approved by a rule that asks when its merchant and amount fit the approval, and it uses the approval once.
Decline and retry. An ask with no approval that fits declines, and the reason tells the agent what to do:
| Reason | Means |
|---|---|
approval_ | No approval for this card and agent: ask for one |
approval_ | Asked for, not answered yet: retry after the cardholder answers |
approval_ | Approved, but at another store |
approval_ | Approved at this store, but for less |
Send the declined decision's id as decision_id when you ask: the approval copies that authorization's merchant, so the retry matches.
During 3-D Secure. Set the program's approvals.decoupled_three_ds. An ask at a 3-D Secure hook then answers with a challenge and opens the cardholder's approval for it (reason: approval_requested, approval.approval_id on the decision). Show it in your app with the link from POST /. When the cardholder answers, a Lithic program that sent its api_key with its processor credentials has the answer sent to Lithic's challenge response; otherwise the approval records it for you to relay.
Matching the merchant. An approval knows the store's domain; an authorization knows the acquirer's merchant id and descriptor. POST / maps one to the other for a program. An approval can also list merchant ids and descriptors itself. The amount may be up to 10% over the approval by default. The program's approvals settings change the tolerance and how long an approval may be used.
The frictionless floor. Mastercard asks an ACS for at least 70% frictionless authentications. A program's read carries three_ds_floor: the last 30 days' frictionless answers, challenges, declines and the rate, with below_floor when it drops under 70%.
9. Approvals in your app
The cardholder can approve inside your own app, in your program's branding, with Provenance's passkey.
Your branding. PUT / sets the program's display name, logo, three colours and help link. Every approval for the program shows them on the page, in the email and in the text, instead of your account's.
The colours meet the same contrast floors as your account branding.
White-label. On the Enterprise plan, powered_by: false leaves out "Powered by Provenance". The security line always shows, and takes its place. On a lower plan the switch is refused (402 plan_required), and a page shown after a downgrade carries "Powered by Provenance" again.
Your push. Set the program's approvals.delivery to issuer_push and subscribe an endpoint to authorize.issuer_approval.requested. Provenance then sends nothing to the cardholder itself. Each approval sends you that webhook, with what your notification should say (the store, the amount, the card token and agent) and the approval's approve_url and token in the body. They work until the approval expires, an hour at most. Push the cardholder and open the approval in your app.
delivery | Endpoint for the event | What happens (delivery.via on the approval) |
|---|---|---|
provenance (default) | Any | Provenance sends to the contact you gave (provenance), or nobody does and you show the link (link_) |
issuer_ | Yes | The webhook goes to your server; Provenance sends nothing (issuer_) |
issuer_ | No | Provenance sends to the contact you gave (provenance_), or you show the link (link_) |
The approval SDK. In a React Native app, @provenanceauth/react-native/issuer-approval reads the webhook data (parseIssuerApprovalRequest), loads the approval with your branding and the powered_by switch (IssuerApprovalClient.load), and approves with the platform's passkey sheet (approve). It makes a passkey on the first approval and uses it after that.
openIssuerApproval opens the page in the in-app browser instead. @provenanceauth/react-native/issuer-approval-testing has a fake API and fake passkeys for your tests.
Android and iOS. On Android without React Native, the Kotlin library kotlin/provenance-issuer-approval does the same with Credential Manager and a Custom Tab. The iOS library waits for App Attest; until then, use the page or React Native.
Your app and the passkey. For the platform sheet to offer Provenance's passkey inside your app, set app on the program with PATCH /: your Android package with its signing-certificate SHA-256 fingerprints, and your iOS app ids. Provenance lists them in its assetlinks.json (passkeys only, never its links) and apple-app-site-association (webcredentials), and accepts your Android app's origin on that program's approvals. Without app, open the page; the passkey works there with no setup.
The page theme. page_theme (dark by default, or light) sets the theme the program's approval pages open in, and theme_switch: false stops the cardholder from switching it. Both are on the same branding call and are kept when you change other fields.
10. Use the console
Once your account has a card program, the console shows a Cards group: Authorizations, Card limits, Programs and Merchants. If your account has no store or agent orders of its own, Cards takes the place of Orders and Approvals, because your cardholders answer the asks, not your team.
Home. Agent authorizations by outcome for today, 7 or 30 days: approved without asking, asked the cardholder, declined. Below the chart are the latest authorizations. "Needs you" lists declines to review, deadlines missed in the last day and rule suggestions. Folded sections hold your programs, card limits, the share of asks cardholders answered against the 70% floor, and decision speed.
Authorizations. The tabs are All, Asked, Declined and To review. Each row shows the outcome, the merchant with its category tile, the agent (or "Suspected"), the amount and the time. Open a row to see why it was decided, the agent's limit and what was left, the trail with the code the agent received, the card's last four and how the agent was recognized.
A decline goes to To review when the cardholder approved the same purchase afterwards, or when the agent was only suspected. Mark it Right call or Should have approved. A verdict is kept once and never changes the decision; it only feeds the rule suggestions. When one rule, or your card limits, collects three "Should have approved" verdicts in 30 days (more than its "Right call" verdicts), Home suggests looking at it.
Card limits. One row per card and agent: "Other agents" is the * limit, "All agents" the card-wide card:* cap. Open a row for this window's spend and holds, the purchase cap, the locks and the amounts held now. Set a limit, Change limit and Remove limit use the limit routes in step 7.
Programs. One tab per program, with its mode. The settings are in four groups: Processor (the hook, live or shadow, and what happens on a missed deadline), Asking the cardholder (your app or our link, 3-D Secure, the amount tolerance and use-within), Limits and merchants, and Branding. Live mode and hiding "Powered by Provenance" say in the row when they need Enterprise.
Merchants. The merchant table from step 8, and the three lists of where agents shop: the bank's, the program's and each card's.
Rules. Rules has an Authorizations tab with a switch between your bank's rules and one program's. It shows the version in force, any shadow version, and the shadow report for the last 30 days.
From the API.
GET / takes these filters as well as the ones above:
| Parameter | Values |
|---|---|
outcome | allow, reject, challenge or no_ (approve, decline and ask are still accepted as filters) |
agent_ | One agent's key |
q | A decision or authorization id, the merchant's id or name, the card token or last four, or the agent key |
review | to_, reviewed, not_, right or should_ |
POST / with { "verdict": "right" } or "should_have_approved" and an optional note. It needs Manage policies. Only a declined or asked decision can be reviewed, and only once; otherwise it returns 409 issuer_review_not_open.
GET / returns what Home shows. If its decisions can't be read, it answers 503 issuer_overview_unavailable rather than showing zeros.
| Parameter or field | What it holds |
|---|---|
window (query) | 24h, 7d or 30d; by default 30d |
program_ (query) | One program, else all of them |
series | One entry per hour (24h) or day: approved, asked, declined and the amount |
totals | Agent authorizations in the window by outcome, and the window before it |
ask_ | The share of agent authorizations that asked the cardholder |
asks | Asks in the window, how many the cardholder answered, and the share against floor (0.7) |
decision_ | Median and p99 decision time |
deadline_, limit_ | Answers past the processor's deadline, and declines over a card limit |
needs_, suggestions | Declines to review, recent deadline misses, and the rule suggestions |
Webhooks. authorize.issuer_approval.decided arrives when the cardholder approves or declines an issuer approval (status). It carries no link. authorize.issuer_limit.reached arrives when an agent's purchase goes over a card limit, in shadow mode too, with the decision id, the card's last four and the limit check (limit.cause).
11. Let cardholders set agent limits
With cardholder controls on, your cardholders can set their cards' agent limits from their Provenance home. Their writes are your card limits from step 7, so your decisions read them with nothing else to change.
PUT / turns them on for a program. They are off by default.
| Field | Means |
|---|---|
enabled | True lets cardholders link a card and set its agent limits |
max_ | The most a cardholder may set for one agent, in minor units per window (null: no maximum of its own) |
allow_ | True lets the cardholder set the card:* cap |
allow_ | True lets the cardholder limit an agent you haven't seen on the card yet |
The link. POST / takes the card token and its brand and last four, and returns a link that works once for 15 minutes. Open it in your app or a browser. The cardholder signs in to Provenance (or creates a home) and confirms "Add Visa ···· 4242" with their passkey. We keep only a hash of the link, and the card token stays on your own rows.
The cardholder's name. Add cardholder: { name: "Maya Chen" } to the link, as you hold it. Your card limit reads for that card return cardholder.name, and the console heads the card's limits "Maya Chen · Business Visa ···· 4242". Without a name the head shows the program and the last four. The name is shown only to you.
The stricter wins. A cardholder can't set a limit above max_cap, or above a limit you set yourself. Raising a limit or resuming agents needs their passkey; lowering one or pausing doesn't. Pausing sets a card:* cap of 0 that declines. Each limit shows who set it (set_by: issuer or cardholder) and a version, and the console's Card limits page has a Set by column.
Or in your own app. The rules embed shows the same controls inside your app and writes the same rows (rules embed).
Events. Removing a card in Provenance leaves your limits as they are.
| Event | When |
|---|---|
authorize. | A cardholder added one of your cards |
authorize. | A cardholder removed one |
authorize. | A cardholder changed a limit (with set_, direction and version) |
12. Approval details and device rules
Approval details. An issuer approval's read (GET /v1/authorize/issuer_approvals/{id}) and the authorize.issuer_approval.decided webhook carry approval_context: how the cardholder decided (method, passkey, device, time zone, network), the same object as on cart approvals. Send the cardholder's home address as billing_address when you create the approval, and approval_context.location_match says whether the answer matched it. The match is information for your records: your own rules decide, and a store's location rules never hold a cardholder's approval for review. It is null until the cardholder decides.
3-D Secure device data. When your processor sends the 3-D Secure browser's details (Lithic does; Marqeta doesn't yet), the decision keeps them as three_ds.device, with the address as its /24 or /48 prefix only, and network (the kind of network, the provider, the AS number). Nothing goes in a token.
Three conditions. In the rules builder:
| Condition | Fact | True when |
|---|---|---|
| New device for this cardholder | device. | The 3-D Secure browser, or the passkey that approved, hasn't been seen for this card in 180 days |
| Data-centre address | network. (with network., network.) | The 3-D Secure browser's address is a hosting or cloud address |
| Agent paused on this card | agent. | The cardholder or your staff paused this agent on this card |
"New agent on this card" is agent.first_seen. A purchase with no 3-D Secure device data has no device or network facts, so each rule's "If a fact is missing" setting applies. The first purchase on a card is a new device; the default rules don't challenge on that alone.
Pause one agent. POST /v1/authorize/issuer_agent_pauses pauses one agent on one card, with the reason you give: its authorizations decline with reason agent_paused_on_card, and other agents are unaffected. DELETE /v1/authorize/issuer_agent_pauses/{id} lifts it and restores its limit. Cardholders pause and resume their own agents from Provenance; lifting a cardholder's pause needs a reason. The card-wide pause still wins over everything. Your staff can do the same from each agent's row on Cards › Card limits in the console.
Live mode
A program with processor credentials answers for real (mode: live) only on the Enterprise plan, which carries the payment-path uptime commitment and the security review. Shadow mode works on Pro and Growth, with the same decisions, backtests and shadow report. Switching such a program to live, or setting credentials on a live program, below Enterprise returns 402 issuer_live_plan_required and changes nothing.
Pricing
A decision on an agent purchase counts as a decision on your plan (pricing). A purchase out of scope, or a suspected match that only logs, is free. Card limits, the ledger and transaction events add no charge. An approval the cardholder answers counts as a confirmation, as every cart approval does, whether it was asked through your push or ours. Branding, the push webhook and the SDKs add no charge; white-label and live mode come with Enterprise.
Errors you might see
| Code | What to do |
|---|---|
card_ | Send the processor's card token and the last four digits instead. |
policy_ | A rule reads a fact issuers don't have, or sets more than one action. error. names it. |
resource_ | The program isn't one of yours. |
issuer_ | A hook request didn't verify against the program's credentials. Check they match the ones at your processor. |
issuer_ | A hook was called before the program's processor credentials were set; your processor decided. |
resource_ on a card limit | The limit isn't one of yours, or it was removed. |
parameter_ on an approval link | The cardholder already answered; read the approval instead. |
plan_ on powered_ | Hiding "Powered by Provenance" needs the Enterprise plan. |
issuer_ | Live mode with processor credentials needs the Enterprise plan; keep the program in shadow mode. |
issuer_ | The decision wasn't a decline or an ask, or it was already reviewed (error.). |
issuer_ | The overview couldn't be read just now; try again shortly. |
cardholder_ | Turn cardholder controls on for the program before you send a cardholder link. |