View as Markdown

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 /v1/authorize/issuer_decisions yourself.

1. Create a card program

POST /v1/authorize/issuer_programs with a name and your processor. A program starts the safe way:

SettingStarts asMeans
modeshadowEvery decision is recorded with what it would have answered; your processor hears no_opinion
fail_modeprocessor_defaultWhen Provenance is slow or down, your processor's own rules and stand-in decide. fail_open approves, fail_closed declines
suspected.actionlogPurchases that only look like an agent's are recorded and sent on the webhook, never acted on

Change any of them with PATCH /v1/authorize/issuer_programs/{id}.

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:

BasisWhenConfidence
network_markedThe token requestor's type is AI_AGENT, or the network names its agent program or agent1
provenance_grantThe purchase names an active Provenance grant1
suspectedHeuristics: a merchant you list in suspected.agent_merchants, a headless or hosted browser in 3-D Secure data, several merchants on one card in minutes, a network agent flagBelow 1
noneAnything else: your program's own rules decide0

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:

ScopeWhereOpt out of the broader lists
Issuer account (every program)PUT /v1/authorize/issuer_agent_merchants with scope: issuer—
Programsuspected.agent_merchants on the programsuspected.inherit_agent_merchants: false leaves the issuer's list out
CardPUT /v1/authorize/issuer_agent_merchants with scope: card, program_id and card_tokeninherit: 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 /v1/authorize/issuer_facts lists each with its meaning) and take one action: frictionless (approve), approval (ask), deny (decline) or notify. Save them for every program with PUT /v1/authorize/issuer_policies/{scope} 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

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 /v1/authorize/issuer_programs/{id}/processor_credentials. It returns the URL for each hook to set at your processor.

ProcessorHooksCredentials
LithicAuth Stream Access (lithic_asa) and 3DS Customer Decisioning (lithic_three_ds)Send the HMAC secret Lithic gives you (whsec_…); requests are checked against it, with 5 minutes' tolerance
MarqetaGateway JIT Funding (marqeta_jit) and the 3DS decision (marqeta_three_ds)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.

DecisionLithic ASALithic 3DSMarqeta JITMarqeta 3DS
ApproveAPPROVEDAPPROVE200, fundedEXEMPT
AskAGENT_APPROVAL_REQUIRED (a custom decline)CHALLENGE_REQUESTED402, SOFT_DECLINE_AUTHENTICATION_REQUIREDCHALLENGE
DeclineAGENT_RULE_DECLINED (a custom decline)DECLINE402, TRANSACTION_NOT_PERMITTEDDECLINE
Decline over a card limit (step 7)AGENT_LIMIT_EXCEEDED (a custom decline)DECLINE402, TRANSACTION_NOT_PERMITTEDDECLINE
No opinionAPPROVED (Lithic's Auth Rules already ran)503, Lithic decides200, funded503, 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 /v1/authorize/issuer_card_limits 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"
}
FieldMeans
windowday, week (from Monday) or month in UTC, or lifetime
capThe most the agent may spend in the window, in minor units of currency
per_transactionThe most one purchase may be
locksOnly these merchant category codes, or merchants whose id or descriptor matches a pattern (* matches any run). Empty means any
on_exceedreject (the default), or challenge: declined with approval_required 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 /v1/authorize/issuer_reservations). 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 /v1/authorize/issuer_programs/{id}/card_events:

EventLithicMarqetaWhat it does
authorizationAUTHORIZATION approvedauthorizationConfirms the hold
declineAUTHORIZATION declinedauthorization declinedReleases it
incrementalAUTHORIZATION_ADVICE (an increase)authorization.incrementalAdds to the hold
reversalAUTHORIZATION_REVERSALauthorization.reversalReleases part of it, or all
expiryAUTHORIZATION_EXPIRYauthorization.reversal.issuerexpirationReleases it
clearingCLEARINGauthorization.clearingCounts the cleared amount instead of the hold
refundRETURNrefund naming the authorizationGives 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 /v1/authorize/issuer_approvals: 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:

ReasonMeans
approval_requiredNo approval for this card and agent: ask for one
approval_pendingAsked for, not answered yet: retry after the cardholder answers
approval_merchant_unmatchedApproved, but at another store
approval_amount_mismatchApproved 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 /v1/authorize/issuer_approvals/{id}/link. 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 /v1/authorize/issuer_merchants 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 /v1/authorize/issuer_programs/{id}/branding 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.

deliveryEndpoint for the eventWhat happens (delivery.via on the approval)
provenance (default)AnyProvenance sends to the contact you gave (provenance), or nobody does and you show the link (link_only)
issuer_pushYesThe webhook goes to your server; Provenance sends nothing (issuer_push)
issuer_pushNoProvenance sends to the contact you gave (provenance_fallback), or you show the link (link_only)

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 /v1/authorize/issuer_programs/{id}: 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 /v1/authorize/issuer_decisions takes these filters as well as the ones above:

ParameterValues
outcomeallow, reject, challenge or no_opinion (approve, decline and ask are still accepted as filters)
agent_keyOne agent's key
qA decision or authorization id, the merchant's id or name, the card token or last four, or the agent key
reviewto_review, reviewed, not_reviewed, right or should_have_approved

POST /v1/authorize/issuer_decisions/{id}/review 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 /v1/authorize/issuer_overview returns what Home shows. If its decisions can't be read, it answers 503 issuer_overview_unavailable rather than showing zeros.

Parameter or fieldWhat it holds
window (query)24h, 7d or 30d; by default 30d
program_id (query)One program, else all of them
seriesOne entry per hour (24h) or day: approved, asked, declined and the amount
totalsAgent authorizations in the window by outcome, and the window before it
ask_rateThe share of agent authorizations that asked the cardholder
asksAsks in the window, how many the cardholder answered, and the share against floor (0.7)
decision_msMedian and p99 decision time
deadline_misses, limit_declinesAnswers past the processor's deadline, and declines over a card limit
needs_you, suggestionsDeclines 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 /v1/authorize/issuer_programs/{id}/cardholder_controls turns them on for a program. They are off by default.

FieldMeans
enabledTrue lets cardholders link a card and set its agent limits
max_capThe most a cardholder may set for one agent, in minor units per window (null: no maximum of its own)
allow_card_wide_capTrue lets the cardholder set the card:* cap
allow_new_agentsTrue lets the cardholder limit an agent you haven't seen on the card yet

The link. POST /v1/authorize/issuer_programs/{id}/cardholder_links 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.

EventWhen
authorize.issuer_cardholder.linkedA cardholder added one of your cards
authorize.issuer_cardholder.unlinkedA cardholder removed one
authorize.issuer_card_limit.updatedA cardholder changed a limit (with set_by, 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:

ConditionFactTrue when
New device for this cardholderdevice.new_for_cardholderThe 3-D Secure browser, or the passkey that approved, hasn't been seen for this card in 180 days
Data-centre addressnetwork.hosting (with network.kind, network.provider)The 3-D Secure browser's address is a hosting or cloud address
Agent paused on this cardagent.paused_on_cardThe 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

CodeWhat to do
card_number_refusedSend the processor's card token and the last four digits instead.
policy_invalidA rule reads a fact issuers don't have, or sets more than one action. error.details names it.
resource_missingThe program isn't one of yours.
issuer_signature_invalidA hook request didn't verify against the program's credentials. Check they match the ones at your processor.
issuer_processor_unconfiguredA hook was called before the program's processor credentials were set; your processor decided.
resource_missing on a card limitThe limit isn't one of yours, or it was removed.
parameter_invalid on an approval linkThe cardholder already answered; read the approval instead.
plan_required on powered_byHiding "Powered by Provenance" needs the Enterprise plan.
issuer_live_plan_requiredLive mode with processor credentials needs the Enterprise plan; keep the program in shadow mode.
issuer_review_not_openThe decision wasn't a decline or an ask, or it was already reviewed (error.details.reason).
issuer_overview_unavailableThe overview couldn't be read just now; try again shortly.
cardholder_controls_offTurn cardholder controls on for the program before you send a cardholder link.

See also