# Issuer controls

For card issuers and their programs: decide which agent purchases to approve, ask about or decline on your own rules, per program, with spending limits per card for each agent, shadow mode, simulate and backtest before anything is answered.

Related guide: [Issuer agent controls](https://provenanceauth.com/docs/authorize/guides/issuer-agent-controls.md)

## Endpoints

- `POST /v1/authorize/issuer_programs`: [Create a card program](#post-v1-authorize-issuer-programs)
- `POST /v1/authorize/issuer_programs/{id}/cardholder_links`: [Create a cardholder link](#post-v1-authorize-issuer-programs-id-cardholder-links)
- `GET /v1/authorize/issuer_programs/{id}`: [Get a card program](#get-v1-authorize-issuer-programs-id)
- `GET /v1/authorize/issuer_policies/{scope}`: [Get issuer rules](#get-v1-authorize-issuer-policies-scope)
- `GET /v1/authorize/issuer_policies/{scope}/versions/{version}`: [Get an issuer rules version](#get-v1-authorize-issuer-policies-scope-versions-version)
- `GET /v1/authorize/issuer_policies/{scope}/shadow_report`: [Get the issuer shadow report](#get-v1-authorize-issuer-policies-scope-shadow-report)
- `GET /v1/authorize/issuer_policies/{scope}/performance`: [Get issuer rule performance](#get-v1-authorize-issuer-policies-scope-performance)
- `GET /v1/authorize/issuer_decisions/{id}`: [Get an issuer decision](#get-v1-authorize-issuer-decisions-id)
- `GET /v1/authorize/issuer_overview`: [Get the issuer overview](#get-v1-authorize-issuer-overview)
- `GET /v1/authorize/issuer_card_limits/{id}`: [Retrieve a card limit](#get-v1-authorize-issuer-card-limits-id)
- `GET /v1/authorize/issuer_approvals/{id}`: [Retrieve an issuer approval](#get-v1-authorize-issuer-approvals-id)
- `POST /v1/authorize/issuer_approvals/{id}/link`: [Get a fresh approval link](#post-v1-authorize-issuer-approvals-id-link)
- `PATCH /v1/authorize/issuer_programs/{id}`: [Update a card program](#patch-v1-authorize-issuer-programs-id)
- `POST /v1/authorize/issuer_programs/{id}/processor_credentials`: [Set a program's processor credentials](#post-v1-authorize-issuer-programs-id-processor-credentials)
- `PUT /v1/authorize/issuer_programs/{id}/branding`: [Set a program's approval branding](#put-v1-authorize-issuer-programs-id-branding)
- `PUT /v1/authorize/issuer_programs/{id}/cardholder_controls`: [Set a program's cardholder controls](#put-v1-authorize-issuer-programs-id-cardholder-controls)
- `PUT /v1/authorize/issuer_agent_merchants`: [Set suspected-agent merchants for the issuer or a card](#put-v1-authorize-issuer-agent-merchants)
- `POST /v1/authorize/issuer_card_limits`: [Set a card limit for an agent](#post-v1-authorize-issuer-card-limits)
- `GET /v1/authorize/issuer_facts`: [List the issuer facts](#get-v1-authorize-issuer-facts)
- `GET /v1/authorize/issuer_programs`: [List card programs](#get-v1-authorize-issuer-programs)
- `GET /v1/authorize/issuer_policies/{scope}/versions`: [List issuer rule versions](#get-v1-authorize-issuer-policies-scope-versions)
- `GET /v1/authorize/issuer_decisions`: [List issuer decisions](#get-v1-authorize-issuer-decisions)
- `GET /v1/authorize/issuer_agent_merchants`: [List suspected-agent merchant lists](#get-v1-authorize-issuer-agent-merchants)
- `GET /v1/authorize/issuer_card_limits`: [List card limits](#get-v1-authorize-issuer-card-limits)
- `GET /v1/authorize/issuer_agent_pauses`: [List paused agents](#get-v1-authorize-issuer-agent-pauses)
- `GET /v1/authorize/issuer_reservations`: [List the reservation ledger](#get-v1-authorize-issuer-reservations)
- `GET /v1/authorize/issuer_approvals`: [List issuer approvals](#get-v1-authorize-issuer-approvals)
- `GET /v1/authorize/issuer_merchants`: [List the merchant table](#get-v1-authorize-issuer-merchants)
- `DELETE /v1/authorize/issuer_agent_merchants/{id}`: [Remove a suspected-agent merchant list](#delete-v1-authorize-issuer-agent-merchants-id)
- `DELETE /v1/authorize/issuer_card_limits/{id}`: [Remove a card limit](#delete-v1-authorize-issuer-card-limits-id)
- `DELETE /v1/authorize/issuer_merchants/{id}`: [Remove a merchant table row](#delete-v1-authorize-issuer-merchants-id)
- `PUT /v1/authorize/issuer_policies/{scope}`: [Save and publish issuer rules](#put-v1-authorize-issuer-policies-scope)
- `POST /v1/authorize/issuer_policies/{scope}/versions`: [Save an issuer rules draft](#post-v1-authorize-issuer-policies-scope-versions)
- `POST /v1/authorize/issuer_policies/{scope}/versions/{version}/publish`: [Publish an issuer rules version](#post-v1-authorize-issuer-policies-scope-versions-version-publish)
- `POST /v1/authorize/issuer_policies/{scope}/versions/{version}/shadow`: [Run an issuer rules version in shadow](#post-v1-authorize-issuer-policies-scope-versions-version-shadow)
- `DELETE /v1/authorize/issuer_policies/{scope}/versions/{version}/shadow`: [Stop an issuer rules shadow](#delete-v1-authorize-issuer-policies-scope-versions-version-shadow)
- `POST /v1/authorize/issuer_policies/{scope}/simulate`: [Simulate an authorization](#post-v1-authorize-issuer-policies-scope-simulate)
- `POST /v1/authorize/issuer_policies/{scope}/backtest`: [Backtest issuer rules](#post-v1-authorize-issuer-policies-scope-backtest)
- `POST /v1/authorize/issuer_decisions`: [Decide an authorization](#post-v1-authorize-issuer-decisions)
- `POST /v1/authorize/issuer_decisions/{id}/review`: [Review an issuer decline](#post-v1-authorize-issuer-decisions-id-review)
- `POST /v1/authorize/issuer_agent_pauses`: [Pause one agent on a card](#post-v1-authorize-issuer-agent-pauses)
- `DELETE /v1/authorize/issuer_agent_pauses/{id}`: [Lift a pause on one agent](#delete-v1-authorize-issuer-agent-pauses-id)
- `POST /v1/authorize/issuer_programs/{id}/card_events`: [Send transaction events](#post-v1-authorize-issuer-programs-id-card-events)
- `POST /v1/authorize/issuer_approvals`: [Ask the cardholder to approve a cart](#post-v1-authorize-issuer-approvals)
- `POST /v1/authorize/issuer_merchants`: [Map a store to its merchant ids](#post-v1-authorize-issuer-merchants)

## The issuer decision object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Unique identifier for the object (`idec_`). |
| `object` | enum | yes | The type of object. One of `issuer_decision`. |
| `program_id` | string | yes | The program (`iprg_`). |
| `kind` | enum | yes | What was asked about. One of `authorization`, `three_ds`. |
| `source` | enum | yes | Who asked. One of `api`, `lithic`, `marqeta`. |
| `authorization_id` | string \| null | no | The processor's id for the authorization. |
| `card` | object | yes | The card (never its number). |
| `card.token` | string | no | The processor's card token. |
| `card.last4` | string \| null | no | The last four digits. |
| `amount` | integer \| null | no | Amount in minor units. |
| `currency` | string \| null | no | ISO 4217 currency. |
| `merchant` | object | no | The merchant fields the authorization carried, and its drawn tile. |
| `merchant.mcc` | string \| null | no | The merchant category code. |
| `merchant.id` | string \| null | no | The acquirer's merchant id. |
| `merchant.name` | string \| null | no | The statement name. |
| `merchant.country` | string \| null | no | The merchant's country. |
| `merchant.category` | enum | no | The tile the console draws for this merchant, worked out from `mcc` (null when nothing fits). Never stored. One of `money`, `flight`, `stay`, `goods`, `software`, `food`, `ticket`, `ride`, `bill`, `other`. |
| `agent` | object | yes | How the purchase was placed in scope. |
| `agent.basis` | enum | no | Why it is in scope; `none` passes to your program's own rules. One of `network_marked`, `provenance_grant`, `suspected`, `none`. |
| `agent.confidence` | number | no | 0 to 1: how sure Provenance is an agent made it (1 for marked or grant-carrying). |
| `agent.key` | string \| null | no | The identity limits are keyed to. |
| `agent.heuristics` | array of objects | no | The suspected-agent heuristics that matched, each with its weight. |
| `agent.network_program` | string \| null | no | `visa_vic` or `mastercard_agent_pay`. |
| `agent.token_requestor` | string \| null | no | The token requestor id. |
| `agent.first_seen` | boolean \| null | no | The first time this agent was seen on this card. |
| `outcome` | enum | yes | What the rules decided. One of `allow`, `reject`, `challenge`, `no_opinion`. |
| `action` | enum | yes | What Provenance answered. `challenge` never holds an authorization: it declines with `approval_required` unless a matching approval exists. One of `approve`, `decline`, `no_opinion`. |
| `reason` | string \| null | no | Why: `issuer_rule_approved`, `issuer_rule_declined`, `approval_required`, `approval_matched`, `approval_pending`, `approval_merchant_unmatched`, `approval_amount_mismatch`, `approval_requested`, `agent_limit_exceeded`, `agent_limit_locked`, `suspected_log_only`, `shadow_mode` or `deadline_missed`. |
| `rule` | object \| null | no | The rule that decided (`id`) and its scope (`program` or `issuer`). |
| `policy_versions` | object | no | The rule versions that ran in each scope (`program`, `issuer`). |
| `shadow` | object \| null | no | What the shadow versions would have decided, when one is set. |
| `mode` | enum | yes | The program's mode when it decided. One of `shadow`, `live`. |
| `latency_ms` | integer | yes | Time to the answer. |
| `fail` | object \| null | no | A missed deadline or error, and the fail mode applied. |
| `facts` | object | no | The facts the rules read. |
| `limit` | object \| any \| null | no | What the card's limit for this agent allowed (null: no limit applied). |
| `limit.limit_id` | string | no | The limit that decided (`ilim_`): the agent's own, the card's `*` limit, or the card-wide cap. |
| `limit.agent_key` | string | no | The agent key it was checked for, or `card:*` for the card-wide cap. |
| `limit.scope` | enum | no | `agent`: the agent's own limit (or `*`). `card`: the cap across every agent on the card, which was stricter. One of `agent`, `card`. |
| `limit.window` | enum | no | The window. One of `day`, `week`, `month`, `lifetime`. |
| `limit.cap` | integer | no | The cap. |
| `limit.currency` | string | no | The cap's currency. |
| `limit.spent` | integer | no | Spent in the window before this purchase: held (unexpired), plus settled, minus refunded. |
| `limit.remaining` | integer | no | `cap - spent`, never below 0 (the `agent.limit_remaining` fact). |
| `limit.exceeded` | boolean | no | Whether the purchase is over the limit. |
| `limit.cause` | enum | no | Why it is over. One of `cap`, `per_transaction`, `mcc_locked`, `merchant_locked`, `currency`. |
| `limit.on_exceed` | enum | no | What an over-limit purchase gets: `reject`, or `challenge` (the cardholder is asked). One of `reject`, `challenge`. |
| `reservation_id` | string \| null | no | The ledger row this decision placed (`ires_`), when it held the amount. |
| `approval` | object \| any \| null | no | What the approval check found (null: no check ran). |
| `approval.status` | enum | no | `matched`: an approval let it through and was used. Otherwise the closest reason none did. One of `matched`, `pending`, `merchant_unmatched`, `amount_mismatch`, `none`, `challenge_sent`, `used_elsewhere`. |
| `approval.approval_id` | string \| null | no | The approval (`iapr_`). |
| `approval.how` | enum | no | How the merchant matched. One of `merchant_id`, `descriptor`, `table`. |
| `review` | object \| any \| null | no | A member's verdict on a decline or an ask (null: not reviewed). |
| `review.verdict` | enum | no | `right` ("Right call") or `should_have_approved`. One of `right`, `should_have_approved`. |
| `review.note` | string \| null | no | The reviewer's note (at most 500 characters). |
| `review.reviewed_by` | string \| null | no | The member's user id, or the API key's id. |
| `review.reviewed_at` | timestamp | no | When it was reviewed. |
| `network` | object \| null | no | The agent's network from the 3-D Secure browser's address, classified on the whole address: `kind` (residential, mobile, business, hosting or unknown), `provider` and `asn`. Null without an address. |
| `three_ds` | object \| null | no | A 3-D Secure decision's flow (null on an authorization): `frictionless` when it was approved without asking the cardholder, `challenge` when the cardholder was asked, null when it was neither. |
| `three_ds.flow` | enum | no | The 3-D Secure flow. One of `frictionless`, `challenge`. |
| `three_ds.device` | object \| null | no | The browser the processor's 3-D Secure flow saw, when it sent one: `ip_prefix` (the /24 or /48 prefix only), `os`, `browser`, `time_zone_offset` (minutes) and `locale`. Never in a token. |
| `occurred_at` | timestamp | yes | When the processor received it. |
| `created_at` | timestamp | yes | When the object was created. |

### Example

```json
{
  "object": "issuer_decision",
  "id": "idec_01M8J1WE5G3KH98Y4M0Z9FZD3Y",
  "program_id": "iprg_01M8J1WE59S39M65EV1JJ1DV1C",
  "kind": "authorization",
  "source": "api",
  "authorization_id": "auth_7Hq2",
  "card": {
    "token": "card_tok_fernhill_1",
    "last4": "4242"
  },
  "amount": 24900,
  "currency": "USD",
  "merchant": {
    "mcc": "5732",
    "id": "mid_brightbox",
    "name": "Brightbox Electronics",
    "country": "US",
    "category": "goods"
  },
  "agent": {
    "token_requestor": "40010030273",
    "network_program": null,
    "basis": "network_marked",
    "confidence": 1,
    "key": "token_requestor:40010030273",
    "heuristics": [],
    "first_seen": true
  },
  "outcome": "challenge",
  "action": "decline",
  "reason": "approval_required",
  "rule": {
    "id": "rul_01M8J1WE5ATCHYDXE6P4JZQ6XP",
    "scope": "issuer"
  },
  "policy_versions": {
    "program": null,
    "issuer": 1
  },
  "shadow": null,
  "mode": "live",
  "latency_ms": 1,
  "fail": null,
  "facts": {
    "auth.amount": 24900,
    "auth.currency": "USD",
    "auth.mcc": "5732",
    "auth.merchant_id": "mid_brightbox",
    "auth.merchant_name": "Brightbox Electronics",
    "auth.merchant_country": "US",
    "auth.channel": "ecommerce",
    "auth.three_ds": null,
    "card.token": "card_tok_fernhill_1",
    "card.program": "iprg_01M8J1WE59S39M65EV1JJ1DV1C",
    "card.country": null,
    "agent.token_requestor": "40010030273",
    "agent.network_program": null,
    "agent.key": "token_requestor:40010030273",
    "agent.basis": "network_marked",
    "agent.confidence": 1,
    "agent.first_seen": true,
    "agent.limit_remaining": null,
    "approval.matched": false,
    "intent.verifiable": null,
    "agent.paused_on_card": false,
    "device.new_for_cardholder": null,
    "network.hosting": null,
    "network.kind": null,
    "network.provider": null
  },
  "limit": null,
  "reservation_id": null,
  "approval": {
    "status": "none",
    "approval_id": null,
    "how": null
  },
  "review": null,
  "three_ds": null,
  "network": null,
  "occurred_at": "2026-11-22T15:04:05.000Z",
  "created_at": "2026-11-28T21:44:50.097Z"
}
```

## Events

Sent to your [webhook endpoints](https://provenanceauth.com/docs/integrate/webhooks.md) when they subscribe:

- `authorize.issuer_decision.made`
- `authorize.issuer_approval.requested`
- `authorize.issuer_approval.decided`
- `authorize.issuer_limit.reached`
- `authorize.issuer_card_limit.updated`
- `authorize.issuer_cardholder.linked`
- `authorize.issuer_cardholder.unlinked`

## Create a card program

`POST /v1/authorize/issuer_programs`

Creates a card program under your issuer account. It starts in shadow mode (decisions recorded, answered `no_opinion`), with `processor_default` as its fail mode and suspected agents logged and notified only. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | body | string | yes | The program's name. |
| `processor` | body | enum | no | The card processor. One of `lithic`, `marqeta`. |
| `mode` | body | enum | no | Default `shadow`. One of `shadow`, `live`. |
| `fail_mode` | body | enum | no | Default `processor_default`. One of `processor_default`, `fail_open`, `fail_closed`. |
| `suspected` | body | object | no | 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. |
| `suspected.threshold` | body | number | no | A match below this confidence is ignored. Default 0.5. |
| `suspected.heuristics` | body | object | no | Which heuristics run (all on by default). |
| `suspected.heuristics.merchant` | body | boolean | no | The merchant is one of `agent_merchants`. |
| `suspected.heuristics.device` | body | boolean | no | 3-D Secure data shows a headless or hosted browser, or a device the cardholder never used. |
| `suspected.heuristics.velocity` | body | boolean | no | Several distinct merchants on one card in a short window. |
| `suspected.heuristics.network` | body | boolean | no | The network flags the purchase as an agent's. |
| `suspected.action` | body | enum | no | `log` (default): record and notify only. `ask`: needs an approval. `apply_rules`: your rules apply as to a marked agent. One of `log`, `ask`, `apply_rules`. |
| `suspected.agent_merchants` | body | array of strings | no | 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`). |
| `suspected.inherit_agent_merchants` | body | boolean | no | False leaves your issuer account's merchant list out of this program. Default true. |
| `suspected.velocity` | body | object | no | The velocity heuristic's window. |
| `suspected.velocity.window_seconds` | body | integer | no | The window. Default 600. |
| `suspected.velocity.distinct_merchants` | body | integer | no | Distinct merchants in the window that count. Default 4. |
| `approvals` | body | object | no | A program's approval settings. |
| `approvals.tolerance_percent` | body | number | no | An authorization may be this much over the approved amount (0 to 0.5 of it; default 0.1). |
| `approvals.tolerance_amount` | body | integer | no | Plus this many minor units (default 0). |
| `approvals.use_within_seconds` | body | integer | no | How long after it is asked for an approval may be used (default 86400). |
| `approvals.decoupled_three_ds` | body | boolean | no | Answer an ask at the 3-D Secure hooks with a challenge that a Provenance approval answers (default false). |
| `approvals.delivery` | body | enum | no | Who tells the cardholder: Provenance (`provenance`, the default) or your own app's push (`issuer_push`: the `authorize.issuer_approval.requested` webhook carries the link and token; with no endpoint taking it, Provenance sends to the contact given). One of `provenance`, `issuer_push`. |
| `app` | body | object \| null | no | 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) and `apple-app-site-association` (`webcredentials`), and the Android app's origin is accepted on this program's approvals. Null removes it. |
| `app.android_package` | body | string \| null | no | The Android application id (`com.bank.app`); needs `android_cert_sha256`. |
| `app.android_cert_sha256` | body | array of strings | no | SHA-256 fingerprints of the app's signing certificates, `AA:BB:…` (32 bytes). |
| `app.ios_app_ids` | body | array of strings | no | iOS app ids, `TEAMID.bundle.id`. |

### Returns

The program.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "suspected": {
      "agent_merchants": [
        "AGENTSHOP*"
      ]
    }
  }'
```

**Node**

```ts
const data = 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",
    "suspected": {
      "agent_merchants": [
        "AGENTSHOP*"
      ]
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/issuer_programs", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "suspected": {
        "agent_merchants": [
            "AGENTSHOP*"
        ]
    }
}).json()
```

### Response 201

```json
{
  "object": "issuer_program",
  "id": "iprg_01M8370B3JQBAPFGRWEYQST5G3",
  "name": "Fernhill agent cards",
  "processor": "lithic",
  "mode": "shadow",
  "fail_mode": "processor_default",
  "suspected": {
    "threshold": 0.5,
    "heuristics": {
      "merchant": true,
      "device": true,
      "velocity": true,
      "network": true
    },
    "action": "log",
    "agent_merchants": [
      "AGENTSHOP*"
    ],
    "velocity": {
      "window_seconds": 600,
      "distinct_merchants": 4
    }
  },
  "approvals": {
    "tolerance_percent": 0.1,
    "tolerance_amount": 0,
    "use_within_seconds": 86400,
    "decoupled_three_ds": false,
    "delivery": "provenance"
  },
  "branding": null,
  "app": null,
  "processor_credentials": {
    "configured": false,
    "api_key": false,
    "set_at": null
  },
  "created_at": "2026-11-23T03:25:44.434Z",
  "updated_at": "2026-11-23T03:25:44.434Z"
}
```

## Create a cardholder link

`POST /v1/authorize/issuer_programs/{id}/cardholder_links`

Returns a one-time link (15 minutes) for your cardholder to add one card from this program to their Provenance home with their passkey, then set its agent limits within your maximum. We keep only a hash of the link. Needs cardholder controls on (else 409 `cardholder_controls_off`).

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The program's ID (`iprg_`). |
| `card_token` | body | string | yes | The processor's card token (never the card number). |
| `display` | body | object | yes | What the person sees: the brand and last four. |
| `display.brand` | body | enum | yes | The card's brand. One of `visa`, `mastercard`, `amex`, `discover`, `jcb`, `unionpay`, `diners`, `other`. |
| `display.last4` | body | string | yes | The card's last four digits. |
| `cardholder` | body | object | no | Display only: the cardholder's name as you hold it ("Maya Chen"). Your card limit reads for this card return it as `cardholder.name`; it is shown only to you. |
| `cardholder.name` | body | string | no | One line of 1 to 100 characters. |

### Returns

The link.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`cardholder_controls_off`](https://provenanceauth.com/docs/platform/errors.md#cardholder_controls_off)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`personal_cards_unavailable`](https://provenanceauth.com/docs/platform/errors.md#personal_cards_unavailable)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X PUT "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM/cardholder_controls" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": true, "max_cap": 20000 }' > /dev/null
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM/cardholder_links" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "card_token": "card_tok_9f2c",
    "display": {
      "brand": "visa",
      "last4": "4242"
    },
    "cardholder": {
      "name": "Maya Chen"
    }
  }'
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs/${program}/cardholder_controls`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({ "enabled": true, "max_cap": 20000 }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs/${program}/cardholder_links`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "card_token": "card_tok_9f2c",
    "display": {
      "brand": "visa",
      "last4": "4242"
    },
    "cardholder": {
      "name": "Maya Chen"
    }
  }),
})).json();
```

**Python**

```python
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"]
step2 = httpx.put(f"{api}/v1/authorize/issuer_programs/{program}/cardholder_controls", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "enabled": True,
    "max_cap": 20000
}).json()
data = httpx.post(f"{api}/v1/authorize/issuer_programs/{program}/cardholder_links", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "card_token": "card_tok_9f2c",
    "display": {
        "brand": "visa",
        "last4": "4242"
    },
    "cardholder": {
        "name": "Maya Chen"
    }
}).json()
```

### Response 201

```json
{
  "object": "issuer_cardholder_link",
  "id": "ichl_01M8D2FTCW5VHGQF7FKCTB6JY6",
  "program_id": "iprg_01M8D2FTCFCXJXJTPBZC4ST086",
  "url": "http://localhost:5173/me/cards/claim?token=_W7MEru9iA64qh1ltck6JxnBAgHMjGzNBtCpeCwAfHg",
  "expires_at": "2026-11-26T23:34:13.052Z"
}
```

## Get a card program

`GET /v1/authorize/issuer_programs/{id}`

Returns one of your card programs. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The program's ID (`iprg_`). |

### Returns

The program.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.get(f"{api}/v1/authorize/issuer_programs/{program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_program",
  "id": "iprg_01M8D8YP32YQEQTZP4QA9QWXV2",
  "name": "Fernhill agent cards",
  "processor": "lithic",
  "mode": "shadow",
  "fail_mode": "processor_default",
  "suspected": {
    "threshold": 0.5,
    "heuristics": {
      "merchant": true,
      "device": true,
      "velocity": true,
      "network": true
    },
    "action": "log",
    "agent_merchants": [],
    "velocity": {
      "window_seconds": 600,
      "distinct_merchants": 4
    }
  },
  "approvals": {
    "tolerance_percent": 0.1,
    "tolerance_amount": 0,
    "use_within_seconds": 86400,
    "decoupled_three_ds": false,
    "delivery": "provenance"
  },
  "branding": null,
  "app": null,
  "processor_credentials": {
    "configured": false,
    "api_key": false,
    "set_at": null
  },
  "created_at": "2026-11-27T01:12:11.618Z",
  "updated_at": "2026-11-27T01:12:11.618Z",
  "three_ds_floor": {
    "window_days": 30,
    "frictionless": 0,
    "challenged": 0,
    "declined": 0,
    "processor": 0,
    "frictionless_rate": null,
    "floor": 0.7,
    "below_floor": false
  }
}
```

## Get issuer rules

`GET /v1/authorize/issuer_policies/{scope}`

Returns the live rules in a scope: `issuer` (your rules over every program) or a program's ID (that program's rules), with the version in shadow if one is set. A scope with no rules has an empty document: every purchase in scope is `no_opinion`. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |

### Returns

The scope's rules.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/issuer_policies/issuer" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/issuer`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/authorize/issuer_policies/issuer", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "policy",
  "domain": "issuer_auth",
  "scope": "issuer",
  "document": {
    "rules": []
  },
  "version": null,
  "is_default": true,
  "shadow_version": null
}
```

## Get an issuer rules version

`GET /v1/authorize/issuer_policies/{scope}/versions/{version}`

Returns one version of a scope's rules with its document: a draft, the live version or an earlier one. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `version` | path | integer | yes | The version to read. |

### Returns

The version and its document.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }' > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions/1" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions/1`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/versions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.amount",
                        "op": "gt",
                        "value": 50000
                    }
                ],
                "require": {
                    "deny": True
                }
            }
        ]
    }
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_policies/{program}/versions/1", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "policy_version",
  "domain": "issuer_auth",
  "scope": "iprg_01M8BNDMN9Z5JE2PTQN7NSC7V9",
  "version": 1,
  "active": false,
  "draft": true,
  "note": null,
  "created_by": "key_01M8BNDJXJFZ8R0QRBJS644DYB",
  "created_at": "2026-11-26T10:11:35.722Z",
  "document": {
    "rules": [
      {
        "id": "rul_01M8BNDMNAJHXWJS1M309YHQPR",
        "ref": "R-01",
        "when": [
          {
            "fact": "auth.amount",
            "op": "gt",
            "value": 50000
          }
        ],
        "require": {
          "deny": true
        }
      }
    ]
  }
}
```

## Get the issuer shadow report

`GET /v1/authorize/issuer_policies/{scope}/shadow_report`

How often the shadow version would have decided differently from the live rules, over recorded decisions (a program's, or every program's for `issuer`), with each change counted. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `created_gte` | query | timestamp | no | Decisions created at or after this time. |
| `created_lte` | query | timestamp | no | Decisions created at or before this time. |

### Returns

The report.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/issuer_policies/issuer/shadow_report" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/issuer/shadow_report`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/authorize/issuer_policies/issuer/shadow_report", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "scope": "issuer",
  "object": "shadow_report",
  "domain": "issuer_auth",
  "shadow_active": false,
  "shadow_versions": {
    "program": null,
    "issuer": null
  },
  "from": null,
  "to": null,
  "evaluated": 0,
  "diverged": 0,
  "divergence_rate": 0,
  "transitions": {}
}
```

## Get issuer rule performance

`GET /v1/authorize/issuer_policies/{scope}/performance`

How a scope's issuer rules performed over a window of UTC days (default: the last 30): the authorizations each rule decided, their value, the outcome shares and the four labelled results. A decline or an ask is labelled once a member reviews it; an approve has no label. Rules in the version's order, then the fallback. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `from` | query | string | no | The first UTC day, YYYY-MM-DD (default: 29 days before `to`). |
| `to` | query | string | no | The last UTC day, YYYY-MM-DD (default: today). A window covers at most 366 days. |
| `version` | query | integer | no | Only the decisions this scope's version made (default: every version in the window, in the live version's rule order). |
| `currency` | query | string | no | The ISO 4217 currency values are summed in (default: the one with the most authorizations). |

### Returns

The scope's totals and each rule's numbers.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/issuer_policies/issuer/performance" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/issuer/performance`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/authorize/issuer_policies/issuer/performance", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "policy_performance",
  "domain": "issuer_auth",
  "from": "2026-11-06",
  "to": "2026-12-05",
  "version": null,
  "currency": null,
  "other_currencies": [],
  "totals": {
    "matched": 0,
    "value_minor": null,
    "outcomes": [
      {
        "outcome": "approve",
        "count": 0,
        "value_minor": null,
        "currency": null,
        "share": 0
      },
      {
        "outcome": "challenge",
        "count": 0,
        "value_minor": null,
        "currency": null,
        "share": 0
      },
      {
        "outcome": "reject",
        "count": 0,
        "value_minor": null,
        "currency": null,
        "share": 0
      }
    ],
    "results": {
      "true_positive": {
        "count": 0,
        "value_minor": null,
        "currency": null
      },
      "false_positive": {
        "count": 0,
        "value_minor": null,
        "currency": null
      },
      "missed": {
        "count": 0,
        "value_minor": null,
        "currency": null
      },
      "allowed": {
        "count": 0,
        "value_minor": null,
        "currency": null
      },
      "unlabelled": {
        "count": 0,
        "value_minor": null,
        "currency": null
      }
    },
    "labelled": 0,
    "enough_labels": false
  },
  "rules": [
    {
      "rule_id": "fallback",
      "name": null,
      "outcomes": [],
      "matched": 0,
      "value_minor": null,
      "results": {
        "true_positive": {
          "count": 0,
          "value_minor": null,
          "currency": null
        },
        "false_positive": {
          "count": 0,
          "value_minor": null,
          "currency": null
        },
        "missed": {
          "count": 0,
          "value_minor": null,
          "currency": null
        },
        "allowed": {
          "count": 0,
          "value_minor": null,
          "currency": null
        },
        "unlabelled": {
          "count": 0,
          "value_minor": null,
          "currency": null
        }
      }
    }
  ],
  "labels_note": "A decline counts as right or wrong only when a member reviews it; the rest show as No label yet."
}
```

## Get an issuer decision

`GET /v1/authorize/issuer_decisions/{id}`

Returns one issuer decision with the facts its rules read. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The decision's ID (`idec_`). |

### Returns

The decision. See [the issuer decision object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"amount\": 4200,
    \"currency\": \"USD\",
    \"card\": {
      \"token\": \"card_tok_fernhill_2\"
    },
    \"network\": {
      \"program\": \"mastercard_agent_pay\",
      \"agent_id\": \"mc-agent-7\"
    }
  }" > step.json
export DECISION=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/authorize/issuer_decisions/$DECISION" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = 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,
    "amount": 4200,
    "currency": "USD",
    "card": {
      "token": "card_tok_fernhill_2"
    },
    "network": {
      "program": "mastercard_agent_pay",
      "agent_id": "mc-agent-7"
    }
  }),
})).json();
const decision = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_decisions/${decision}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.post(f"{api}/v1/authorize/issuer_decisions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "amount": 4200,
    "currency": "USD",
    "card": {
        "token": "card_tok_fernhill_2"
    },
    "network": {
        "program": "mastercard_agent_pay",
        "agent_id": "mc-agent-7"
    }
}).json()
decision = step2["id"]
data = httpx.get(f"{api}/v1/authorize/issuer_decisions/{decision}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_decision",
  "id": "idec_01M8J1WE5P0D2VG2DASN63G98M",
  "program_id": "iprg_01M8J1WE5NZ82HB8AX0D47J1KS",
  "kind": "authorization",
  "source": "api",
  "authorization_id": null,
  "card": {
    "token": "card_tok_fernhill_2",
    "last4": null
  },
  "amount": 4200,
  "currency": "USD",
  "merchant": {
    "mcc": null,
    "id": null,
    "name": null,
    "country": null,
    "category": null
  },
  "agent": {
    "token_requestor": null,
    "network_program": "mastercard_agent_pay",
    "basis": "network_marked",
    "confidence": 1,
    "key": "network_agent:mc-agent-7",
    "heuristics": [],
    "first_seen": true
  },
  "outcome": "no_opinion",
  "action": "no_opinion",
  "reason": "shadow_mode",
  "rule": null,
  "policy_versions": {
    "program": null,
    "issuer": 1
  },
  "shadow": null,
  "mode": "shadow",
  "latency_ms": 0,
  "fail": null,
  "facts": {
    "auth.amount": 4200,
    "auth.currency": "USD",
    "auth.mcc": null,
    "auth.merchant_id": null,
    "auth.merchant_name": null,
    "auth.merchant_country": null,
    "auth.channel": null,
    "auth.three_ds": null,
    "card.token": "card_tok_fernhill_2",
    "card.program": "iprg_01M8J1WE5NZ82HB8AX0D47J1KS",
    "card.country": null,
    "agent.token_requestor": null,
    "agent.network_program": "mastercard_agent_pay",
    "agent.key": "network_agent:mc-agent-7",
    "agent.basis": "network_marked",
    "agent.confidence": 1,
    "agent.first_seen": true,
    "agent.limit_remaining": null,
    "approval.matched": false,
    "intent.verifiable": null,
    "agent.paused_on_card": false,
    "device.new_for_cardholder": null,
    "network.hosting": null,
    "network.kind": null,
    "network.provider": null
  },
  "limit": null,
  "reservation_id": "ires_01M8J1WE5PHPD8GP3CQSK533JY",
  "approval": {
    "status": "none",
    "approval_id": null,
    "how": null
  },
  "review": null,
  "three_ds": null,
  "network": null,
  "occurred_at": "2026-11-28T21:44:50.102Z",
  "created_at": "2026-11-28T21:44:50.102Z"
}
```

## Get the issuer overview

`GET /v1/authorize/issuer_overview`

Returns a window's numbers for your card programs (or one): agent authorizations per hour or day by outcome, the ask rate, asks the cardholder answered against the 70% floor, decision time, deadline misses, limit declines, declines to review and the rule suggestions. When the decisions can't be read it answers 503 `issuer_overview_unavailable`, never zeros. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `window` | query | enum | no | The window: the last 24 hours (by the hour), 7 or 30 days (by the UTC day). One of `24h`, `7d`, `30d`. |
| `program_id` | query | string | no | Only this program's (`iprg_`). |

### Returns

The overview.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`issuer_overview_unavailable`](https://provenanceauth.com/docs/platform/errors.md#issuer_overview_unavailable)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"authorization_id\": \"auth_4Tm8\",
    \"amount\": 2400,
    \"currency\": \"USD\",
    \"card\": {
      \"token\": \"card_tok_fernhill_4\",
      \"last4\": \"9021\"
    },
    \"merchant\": {
      \"mcc\": \"5411\",
      \"id\": \"mid_greenleaf\",
      \"name\": \"Greenleaf Grocers\",
      \"country\": \"US\"
    },
    \"token\": {
      \"requestor_id\": \"40010030273\",
      \"requestor_type\": \"AI_AGENT\"
    }
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_overview?window=7d&program_id=$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_decisions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "authorization_id": "auth_4Tm8",
    "amount": 2400,
    "currency": "USD",
    "card": {
      "token": "card_tok_fernhill_4",
      "last4": "9021"
    },
    "merchant": {
      "mcc": "5411",
      "id": "mid_greenleaf",
      "name": "Greenleaf Grocers",
      "country": "US"
    },
    "token": {
      "requestor_id": "40010030273",
      "requestor_type": "AI_AGENT"
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_overview?window=7d&program_id=${program}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_decisions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "authorization_id": "auth_4Tm8",
    "amount": 2400,
    "currency": "USD",
    "card": {
        "token": "card_tok_fernhill_4",
        "last4": "9021"
    },
    "merchant": {
        "mcc": "5411",
        "id": "mid_greenleaf",
        "name": "Greenleaf Grocers",
        "country": "US"
    },
    "token": {
        "requestor_id": "40010030273",
        "requestor_type": "AI_AGENT"
    }
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_overview?window=7d&program_id={program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_overview",
  "window": "7d",
  "program_id": "iprg_01M9219RZQBRNJTPKW34VXRBCN",
  "from": "2026-11-28T02:42:29.498Z",
  "to": "2026-12-05T02:42:29.498Z",
  "bucket": "day",
  "series": [
    {
      "start": "2026-11-29T00:00:00.000Z",
      "allowed": 0,
      "challenged": 0,
      "rejected": 0,
      "amount": 0
    },
    {
      "start": "2026-11-30T00:00:00.000Z",
      "allowed": 0,
      "challenged": 0,
      "rejected": 0,
      "amount": 0
    },
    {
      "start": "2026-12-01T00:00:00.000Z",
      "allowed": 0,
      "challenged": 0,
      "rejected": 0,
      "amount": 0
    },
    "… 4 more"
  ],
  "totals": {
    "authorizations": 1,
    "previous_authorizations": 0,
    "allowed": 1,
    "challenged": 0,
    "rejected": 0,
    "no_rule": 1,
    "amount": 2400,
    "currency": "USD"
  },
  "ask_rate": 0,
  "asks": {
    "asked": 0,
    "settled": 0,
    "answered": 0,
    "share": null,
    "floor": 0.7
  },
  "decision_ms": {
    "median": 0,
    "p99": 0
  },
  "deadline_misses": {
    "window": 0,
    "last_24h": 0
  },
  "limit_declines": 0,
  "needs_you": {
    "to_review": 0,
    "deadline_misses": 0,
    "suggestions": 0
  },
  "suggestions": [],
  "programs": {
    "live": 1,
    "shadow": 0
  },
  "card_limits": {
    "limits": 0,
    "cards": 0
  },
  "truncated": false
}
```

## Retrieve a card limit

`GET /v1/authorize/issuer_card_limits/{id}`

Returns one card limit with this window's spend and what is left. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The limit's ID (`ilim_`). |

### Returns

The limit.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_card_limits" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_3\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"window\": \"month\",
    \"cap\": 50000,
    \"currency\": \"USD\"
  }" > step.json
export LIMIT=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"authorization_id\": \"auth_fernhill_31\",
    \"amount\": 12000,
    \"currency\": \"USD\",
    \"card\": {
      \"token\": \"card_tok_fernhill_3\"
    },
    \"token\": {
      \"requestor_id\": \"40010030273\",
      \"requestor_type\": \"AI_AGENT\"
    }
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_card_limits/$LIMIT" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_card_limits`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD"
  }),
})).json();
const limit = step2.id;
const step3 = 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_fernhill_31",
    "amount": 12000,
    "currency": "USD",
    "card": {
      "token": "card_tok_fernhill_3"
    },
    "token": {
      "requestor_id": "40010030273",
      "requestor_type": "AI_AGENT"
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_card_limits/${limit}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_card_limits", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD"
}).json()
limit = step2["id"]
step3 = httpx.post(f"{api}/v1/authorize/issuer_decisions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "authorization_id": "auth_fernhill_31",
    "amount": 12000,
    "currency": "USD",
    "card": {
        "token": "card_tok_fernhill_3"
    },
    "token": {
        "requestor_id": "40010030273",
        "requestor_type": "AI_AGENT"
    }
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_card_limits/{limit}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_card_limit",
  "id": "ilim_01M8B27A9J109WK4MTWM4BE3DS",
  "program_id": "iprg_01M8B27A9J6WR2B0M7KKN5RJ4B",
  "card_token": "card_tok_fernhill_3",
  "agent_key": "token_requestor:40010030273",
  "window": "month",
  "cap": 50000,
  "currency": "USD",
  "per_transaction": null,
  "locks": {
    "mccs": [],
    "merchants": []
  },
  "on_exceed": "reject",
  "set_by": "issuer",
  "version": 1,
  "spent": 12000,
  "remaining": 38000,
  "window_start": "2026-11-01T00:00:00.000Z",
  "created_at": "2026-11-26T04:36:05.554Z",
  "updated_at": "2026-11-26T04:36:05.554Z"
}
```

## Retrieve an issuer approval

`GET /v1/authorize/issuer_approvals/{id}`

Returns one issuer approval; its status follows the cart approval behind it. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The approval's ID (`iapr_`). |

### Returns

The approval.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_approvals" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_4\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"cart\": {
      \"order_id\": \"ord_fernhill_43\",
      \"total\": 24900,
      \"currency\": \"USD\",
      \"merchant_id\": \"brightbox\",
      \"origin\": \"https://brightbox.example\",
      \"items\": [
        {
          \"sku\": \"tv-55\",
          \"name\": \"55-inch television\",
          \"quantity\": 1,
          \"unit_amount\": 24900
        }
      ]
    }
  }" > step.json
export APPROVAL=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/authorize/issuer_approvals/$APPROVAL" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_approvals`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
      "order_id": "ord_fernhill_43",
      "total": 24900,
      "currency": "USD",
      "merchant_id": "brightbox",
      "origin": "https://brightbox.example",
      "items": [
        {
          "sku": "tv-55",
          "name": "55-inch television",
          "quantity": 1,
          "unit_amount": 24900
        }
      ]
    }
  }),
})).json();
const approval = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_approvals/${approval}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_approvals", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
        "order_id": "ord_fernhill_43",
        "total": 24900,
        "currency": "USD",
        "merchant_id": "brightbox",
        "origin": "https://brightbox.example",
        "items": [
            {
                "sku": "tv-55",
                "name": "55-inch television",
                "quantity": 1,
                "unit_amount": 24900
            }
        ]
    }
}).json()
approval = step2["id"]
data = httpx.get(f"{api}/v1/authorize/issuer_approvals/{approval}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_approval",
  "id": "iapr_01M8J1WE8H9YHNJ4AERS1J4QK1",
  "program_id": "iprg_01M8J1WE8G8H4D9R3MRRRQA6G2",
  "card_token": "card_tok_fernhill_4",
  "agent_key": "token_requestor:40010030273",
  "status": "pending",
  "amount": 24900,
  "currency": "USD",
  "merchant": {
    "domain": "brightbox.example",
    "ids": [],
    "descriptors": []
  },
  "tolerance": {
    "percent": 0.1,
    "amount": 0
  },
  "checkout_approval_id": "coap_01M8J1WE8GA03GQVRBM21Z1B7K",
  "decision_id": null,
  "used_by_decision_id": null,
  "decided_at": null,
  "used_at": null,
  "use_by": "2026-11-29T21:44:50.193Z",
  "three_ds": null,
  "delivery": {
    "mode": "provenance",
    "via": "link_only"
  },
  "approval_context": null,
  "created_at": "2026-11-28T21:44:50.193Z",
  "updated_at": "2026-11-28T21:44:50.193Z",
  "decided_via": null,
  "decided_method": null,
  "person_decision": null,
  "decline_reason": null,
  "decline_note": null
}
```

## Get a fresh approval link

`POST /v1/authorize/issuer_approvals/{id}/link`

Returns a fresh link to the approval for your app or push to show the cardholder (a decoupled 3-D Secure challenge's approval included). Earlier links keep working. 400 once the cardholder has answered. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The approval's ID (`iapr_`). |

### Returns

The link.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_approvals" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_4\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"cart\": {
      \"order_id\": \"ord_fernhill_44\",
      \"total\": 24900,
      \"currency\": \"USD\",
      \"merchant_id\": \"brightbox\",
      \"origin\": \"https://brightbox.example\",
      \"items\": [
        {
          \"sku\": \"tv-55\",
          \"name\": \"55-inch television\",
          \"quantity\": 1,
          \"unit_amount\": 24900
        }
      ]
    }
  }" > step.json
export APPROVAL=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_approvals/$APPROVAL/link" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_approvals`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
      "order_id": "ord_fernhill_44",
      "total": 24900,
      "currency": "USD",
      "merchant_id": "brightbox",
      "origin": "https://brightbox.example",
      "items": [
        {
          "sku": "tv-55",
          "name": "55-inch television",
          "quantity": 1,
          "unit_amount": 24900
        }
      ]
    }
  }),
})).json();
const approval = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_approvals/${approval}/link`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_approvals", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
        "order_id": "ord_fernhill_44",
        "total": 24900,
        "currency": "USD",
        "merchant_id": "brightbox",
        "origin": "https://brightbox.example",
        "items": [
            {
                "sku": "tv-55",
                "name": "55-inch television",
                "quantity": 1,
                "unit_amount": 24900
            }
        ]
    }
}).json()
approval = step2["id"]
data = httpx.post(f"{api}/v1/authorize/issuer_approvals/{approval}/link", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_approval_link",
  "issuer_approval_id": "iapr_01M834BSZHG0CNTY1A5N8KD117",
  "approve_url": "http://localhost:5173/approve/c/aXmeH8B8bIkiEY4t7JkjdQ",
  "expires_at": "2026-11-23T02:54:34.385Z"
}
```

## Update a card program

`PATCH /v1/authorize/issuer_programs/{id}`

Changes the fields you send: name, processor, mode, fail mode, suspected-agent settings (merged), approval settings, or the issuer's app for the approval SDK. With processor credentials set, `live` needs the Enterprise plan (402 `issuer_live_plan_required`); shadow works on Pro and Growth. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The program's ID (`iprg_`). |
| `name` | body | string | no | The program's name. |
| `processor` | body | enum | no | The card processor. One of `lithic`, `marqeta`. |
| `mode` | body | enum | no | Shadow or live. One of `shadow`, `live`. |
| `fail_mode` | body | enum | no | The fail mode. One of `processor_default`, `fail_open`, `fail_closed`. |
| `suspected` | body | object | no | 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. |
| `suspected.threshold` | body | number | no | A match below this confidence is ignored. Default 0.5. |
| `suspected.heuristics` | body | object | no | Which heuristics run (all on by default). |
| `suspected.heuristics.merchant` | body | boolean | no | The merchant is one of `agent_merchants`. |
| `suspected.heuristics.device` | body | boolean | no | 3-D Secure data shows a headless or hosted browser, or a device the cardholder never used. |
| `suspected.heuristics.velocity` | body | boolean | no | Several distinct merchants on one card in a short window. |
| `suspected.heuristics.network` | body | boolean | no | The network flags the purchase as an agent's. |
| `suspected.action` | body | enum | no | `log` (default): record and notify only. `ask`: needs an approval. `apply_rules`: your rules apply as to a marked agent. One of `log`, `ask`, `apply_rules`. |
| `suspected.agent_merchants` | body | array of strings | no | 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`). |
| `suspected.inherit_agent_merchants` | body | boolean | no | False leaves your issuer account's merchant list out of this program. Default true. |
| `suspected.velocity` | body | object | no | The velocity heuristic's window. |
| `suspected.velocity.window_seconds` | body | integer | no | The window. Default 600. |
| `suspected.velocity.distinct_merchants` | body | integer | no | Distinct merchants in the window that count. Default 4. |
| `approvals` | body | object | no | A program's approval settings. |
| `approvals.tolerance_percent` | body | number | no | An authorization may be this much over the approved amount (0 to 0.5 of it; default 0.1). |
| `approvals.tolerance_amount` | body | integer | no | Plus this many minor units (default 0). |
| `approvals.use_within_seconds` | body | integer | no | How long after it is asked for an approval may be used (default 86400). |
| `approvals.decoupled_three_ds` | body | boolean | no | Answer an ask at the 3-D Secure hooks with a challenge that a Provenance approval answers (default false). |
| `approvals.delivery` | body | enum | no | Who tells the cardholder: Provenance (`provenance`, the default) or your own app's push (`issuer_push`: the `authorize.issuer_approval.requested` webhook carries the link and token; with no endpoint taking it, Provenance sends to the contact given). One of `provenance`, `issuer_push`. |
| `app` | body | object \| null | no | 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) and `apple-app-site-association` (`webcredentials`), and the Android app's origin is accepted on this program's approvals. Null removes it. |
| `app.android_package` | body | string \| null | no | The Android application id (`com.bank.app`); needs `android_cert_sha256`. |
| `app.android_cert_sha256` | body | array of strings | no | SHA-256 fingerprints of the app's signing certificates, `AA:BB:…` (32 bytes). |
| `app.ios_app_ids` | body | array of strings | no | iOS app ids, `TEAMID.bundle.id`. |

### Returns

The program.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`issuer_live_plan_required`](https://provenanceauth.com/docs/platform/errors.md#issuer_live_plan_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X PATCH "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "live",
    "suspected": {
      "action": "apply_rules",
      "threshold": 0.6
    }
  }'
```

**Node**

```ts
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();
```

**Python**

```python
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()
```

### Response 200

```json
{
  "object": "issuer_program",
  "id": "iprg_01M8370B3YDSSW7TJVWRGBEMKB",
  "name": "Fernhill agent cards",
  "processor": "lithic",
  "mode": "live",
  "fail_mode": "processor_default",
  "suspected": {
    "threshold": 0.6,
    "heuristics": {
      "merchant": true,
      "device": true,
      "velocity": true,
      "network": true
    },
    "action": "apply_rules",
    "agent_merchants": [],
    "velocity": {
      "window_seconds": 600,
      "distinct_merchants": 4
    }
  },
  "approvals": {
    "tolerance_percent": 0.1,
    "tolerance_amount": 0,
    "use_within_seconds": 86400,
    "decoupled_three_ds": false,
    "delivery": "provenance"
  },
  "branding": null,
  "app": null,
  "processor_credentials": {
    "configured": false,
    "api_key": false,
    "set_at": null
  },
  "created_at": "2026-11-23T03:25:44.446Z",
  "updated_at": "2026-11-23T03:25:44.447Z"
}
```

## Set a program's processor credentials

`POST /v1/authorize/issuer_programs/{id}/processor_credentials`

Sets or rotates how the program's processor proves its decision hook requests. Lithic: send the ASA (and 3DS) HMAC secret Lithic gave you (`whsec_…`); it is kept sealed and never read back. Marqeta: send an empty body and configure the Basic credentials returned (the password is shown once). Returns the hook URLs. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The program's ID (`iprg_`). |
| `webhook_secret` | body | string | no | Lithic only: the HMAC secret (`whsec_…`). |
| `events_webhook_secret` | body | string | no | Lithic only: the transaction-event webhook's secret, when it differs. |
| `api_key` | body | string | no | Lithic only: an API key, to answer decoupled 3-D Secure challenges (sealed, never read back). |

### Returns

The credentials are set.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`issuer_live_plan_required`](https://provenanceauth.com/docs/platform/errors.md#issuer_live_plan_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM/processor_credentials" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "webhook_secret": "whsec_c2FuZGJveC1vbmx5LWZha2Utc2VjcmV0LTE3MQ==" }'
```

**Node**

```ts
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}/processor_credentials`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({ "webhook_secret": "whsec_c2FuZGJveC1vbmx5LWZha2Utc2VjcmV0LTE3MQ==" }),
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_programs/{program}/processor_credentials", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "webhook_secret": "whsec_c2FuZGJveC1vbmx5LWZha2Utc2VjcmV0LTE3MQ=="
}).json()
```

### Response 200

```json
{
  "object": "issuer_processor_credentials",
  "program_id": "iprg_01M8D8YP3SVQ56XGJHVPBXK0BD",
  "processor": "lithic",
  "configured": true,
  "set_at": "2026-11-27T01:12:11.642Z",
  "hook_urls": {
    "lithic_asa": "/v1/authorize/issuer_events/iprg_01M8D8YP3SVQ56XGJHVPBXK0BD/lithic_asa",
    "lithic_three_ds": "/v1/authorize/issuer_events/iprg_01M8D8YP3SVQ56XGJHVPBXK0BD/lithic_three_ds",
    "lithic_transactions": "/v1/authorize/issuer_events/iprg_01M8D8YP3SVQ56XGJHVPBXK0BD/lithic_transactions"
  }
}
```

## Set a program's approval branding

`PUT /v1/authorize/issuer_programs/{id}/branding`

Sets the program's approval branding (name, logo, colours, help link; your account branding's contrast floors) for its page, emails and texts. Partial; `null` clears a field. `powered_by: false` leaves out "Powered by Provenance" on the Enterprise plan (else 402); the security line shows in its place. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The program's ID (`iprg_`). |
| `name` | body | string \| null | no | The display name (at most 40 characters, no link or phone number, never "Provenance"). |
| `primary` | body | string \| null | no | The button colour, `#RRGGBB` (white text on it at 4.5:1 or more). |
| `secondary` | body | string \| null | no | The page background, `#RRGGBB` (the page text on it at 7:1 or more). |
| `accent` | body | string \| null | no | The link colour, `#RRGGBB` (4.5:1 or more on white and on the secondary colour). |
| `help_url` | body | string \| null | no | An https link to your help page. |
| `powered_by` | body | boolean | no | False leaves out "Powered by Provenance" (Enterprise). Default true. |
| `page_theme` | body | enum | no | The theme the program's approval pages open in. Default `dark`. One of `dark`, `light`. |
| `theme_switch` | body | boolean | no | Whether the cardholder may switch the page's theme. Default true. |
| `logo` | body | object \| null | no | A new logo, or null to remove it. |
| `logo.data_base64` | body | string | no | A PNG, JPEG or WebP image, base64 (at most 200 KB and 1024 px on a side; SVG isn't accepted). |

### Returns

The program, with its branding.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "approvals": {
      "delivery": "issuer_push"
    }
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X PUT "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM/branding" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill Bank",
    "primary": "#1D4ED8",
    "help_url": "https://help.fernhill.example/cards",
    "powered_by": false,
    "page_theme": "dark",
    "theme_switch": true
  }'
```

**Node**

```ts
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",
    "approvals": {
      "delivery": "issuer_push"
    }
  }),
})).json();
const program = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs/${program}/branding`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Fernhill Bank",
    "primary": "#1D4ED8",
    "help_url": "https://help.fernhill.example/cards",
    "powered_by": false,
    "page_theme": "dark",
    "theme_switch": true
  }),
})).json();
```

**Python**

```python
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",
    "approvals": {
        "delivery": "issuer_push"
    }
}).json()
program = step1["id"]
data = httpx.put(f"{api}/v1/authorize/issuer_programs/{program}/branding", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "name": "Fernhill Bank",
    "primary": "#1D4ED8",
    "help_url": "https://help.fernhill.example/cards",
    "powered_by": False,
    "page_theme": "dark",
    "theme_switch": True
}).json()
```

### Response 200

```json
{
  "object": "issuer_program",
  "id": "iprg_01M84P41329JCJGXVK8YGN37HH",
  "name": "Fernhill agent cards",
  "processor": "lithic",
  "mode": "shadow",
  "fail_mode": "processor_default",
  "suspected": {
    "threshold": 0.5,
    "heuristics": {
      "merchant": true,
      "device": true,
      "velocity": true,
      "network": true
    },
    "action": "log",
    "agent_merchants": [],
    "velocity": {
      "window_seconds": 600,
      "distinct_merchants": 4
    }
  },
  "approvals": {
    "tolerance_percent": 0.1,
    "tolerance_amount": 0,
    "use_within_seconds": 86400,
    "decoupled_three_ds": false,
    "delivery": "issuer_push"
  },
  "branding": {
    "name": "Fernhill Bank",
    "logo_url": null,
    "primary": "#1D4ED8",
    "secondary": null,
    "accent": null,
    "help_url": "https://help.fernhill.example/cards",
    "powered_by": false,
    "page_theme": "dark",
    "theme_switch": true
  },
  "app": null,
  "processor_credentials": {
    "configured": false,
    "api_key": false,
    "set_at": null
  },
  "created_at": "2026-11-23T17:09:08.322Z",
  "updated_at": "2026-11-23T17:09:08.324Z"
}
```

## Set a program's cardholder controls

`PUT /v1/authorize/issuer_programs/{id}/cardholder_controls`

Turns cardholder controls on or off for a program, with your maximum per agent. With them on, your cardholders set their cards' agent limits from Provenance, within `max_cap` and never above a limit you set (the stricter wins); their writes are your card limits, `set_by: cardholder`. Needs Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The program's ID (`iprg_`). |
| `enabled` | body | boolean | yes | True turns cardholder controls on. |
| `max_cap` | body | integer \| null | no | The most a cardholder may set for one agent, in minor units per window (null: no maximum of its own). |
| `allow_card_wide_cap` | body | boolean | no | True lets cardholders set a cap across every agent on the card. |
| `allow_new_agents` | body | boolean | no | True lets cardholders limit an agent you haven't seen on the card. |

### Returns

The program's cardholder controls.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X PUT "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM/cardholder_controls" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": true, "max_cap": 20000, "allow_new_agents": true }'
```

**Node**

```ts
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}/cardholder_controls`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({ "enabled": true, "max_cap": 20000, "allow_new_agents": true }),
})).json();
```

**Python**

```python
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.put(f"{api}/v1/authorize/issuer_programs/{program}/cardholder_controls", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "enabled": True,
    "max_cap": 20000,
    "allow_new_agents": True
}).json()
```

### Response 200

```json
{
  "object": "cardholder_controls",
  "program_id": "iprg_01M882BXSH7F8ZXJDK6XW9X33Q",
  "enabled": true,
  "max_cap": 20000,
  "allow_card_wide_cap": false,
  "allow_new_agents": true
}
```

## Set suspected-agent merchants for the issuer or a card

`PUT /v1/authorize/issuer_agent_merchants`

Sets the merchant patterns that mark a purchase as a suspected agent's, for your issuer account (`scope: issuer`, every program) or one card (`scope: card`). They add to the program's own list; `inherit: false` on a card leaves the broader lists out for it. One list per scope: a second write replaces it (200). Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | body | enum | yes | `issuer` (every program) or `card`. One of `issuer`, `card`. |
| `program_id` | body | string | no | The card's program (`card` scope only). |
| `card_token` | body | string | no | The processor's card token (`card` scope only). A card number is refused. |
| `patterns` | body | array of strings | yes | Patterns over the merchant id or name. |
| `inherit` | body | boolean | no | `card` scope only: false leaves out the issuer's and the program's lists. Default true. |

### Returns

The list, replaced (same id).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X PUT "$PROVENANCE_API/v1/authorize/issuer_agent_merchants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"scope\": \"card\",
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_7\",
    \"patterns\": [
      \"ROBOSHOP*\",
      \"174030075991\"
    ]
  }"
```

**Node**

```ts
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_agent_merchants`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "scope": "card",
    "program_id": program,
    "card_token": "card_tok_fernhill_7",
    "patterns": [
      "ROBOSHOP*",
      "174030075991"
    ]
  }),
})).json();
```

**Python**

```python
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.put(f"{api}/v1/authorize/issuer_agent_merchants", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "scope": "card",
    "program_id": program,
    "card_token": "card_tok_fernhill_7",
    "patterns": [
        "ROBOSHOP*",
        "174030075991"
    ]
}).json()
```

### Response 200

```json
{
  "object": "issuer_agent_merchant_list",
  "id": "iaml_01M838TY08YX57W8KM7BVQKXV3",
  "scope": "card",
  "program_id": "iprg_01M838TY01NF7N914M5JK2Y22D",
  "card_token": "card_tok_fernhill_7",
  "patterns": [
    "ROBOSHOP*"
  ],
  "inherit": false,
  "created_at": "2026-11-23T03:57:44.328Z",
  "updated_at": "2026-11-23T04:02:10.511Z"
}
```

## Set a card limit for an agent

`POST /v1/authorize/issuer_card_limits`

Sets one agent's spending limit on one card: a cap per day, week, month or lifetime, an optional per-purchase cap, merchant locks, and `decline` or `ask` when a purchase is over it. Agent key `*` covers each agent without its own limit. Setting it again replaces it (200, same id). Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | body | string | yes | The program (`iprg_`). |
| `card_token` | body | string | yes | The processor's card token (a card number is refused). |
| `agent_key` | body | string | yes | The agent key as decisions show it (`agent.key`), or `*`. |
| `window` | body | enum | yes | The window. One of `day`, `week`, `month`, `lifetime`. |
| `cap` | body | integer | yes | The cap, in minor units. |
| `currency` | body | string | yes | The cap's currency. |
| `per_transaction` | body | integer \| null | no | The most one purchase may be. |
| `locks` | body | object | no | Allow-lists (empty: any). |
| `locks.mccs` | body | array of strings | no | Merchant category codes. |
| `locks.merchants` | body | array of strings | no | Globs over the merchant id or descriptor. |
| `on_exceed` | body | enum | no | Default `decline`. One of `decline`, `ask`. |

### Returns

An existing limit was replaced.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_card_limits" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_3\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"window\": \"month\",
    \"cap\": 50000,
    \"currency\": \"USD\",
    \"per_transaction\": 25000,
    \"locks\": {
      \"mccs\": [
        \"5732\",
        \"5734\"
      ]
    }
  }"
```

**Node**

```ts
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 data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_card_limits`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD",
    "per_transaction": 25000,
    "locks": {
      "mccs": [
        "5732",
        "5734"
      ]
    }
  }),
})).json();
```

**Python**

```python
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"]
data = httpx.post(f"{api}/v1/authorize/issuer_card_limits", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD",
    "per_transaction": 25000,
    "locks": {
        "mccs": [
            "5732",
            "5734"
        ]
    }
}).json()
```

### Response 200

```json
{
  "object": "issuer_card_limit",
  "id": "ilim_01M832WPDCWJSWX7MX5TNGMH35",
  "program_id": "iprg_01M832WPD4ZS4C1Z20PN5A3W9D",
  "card_token": "card_tok_fernhill_3",
  "agent_key": "token_requestor:40010030273",
  "window": "month",
  "cap": 50000,
  "currency": "USD",
  "per_transaction": 25000,
  "locks": {
    "mccs": [
      "5732",
      "5734"
    ],
    "merchants": []
  },
  "on_exceed": "reject",
  "spent": 0,
  "remaining": 50000,
  "window_start": "2026-11-01T00:00:00.000Z",
  "created_at": "2026-11-23T02:13:50.636Z",
  "updated_at": "2026-11-23T02:13:50.636Z"
}
```

## List the issuer facts

`GET /v1/authorize/issuer_facts`

The facts an issuer rule can read, each with its type, where it comes from and what it means, and the weight of each suspected-agent heuristic. A fact your processor doesn't send is null, and a rule on a null fact doesn't match. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

No parameters.

### Returns

The fact catalog.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/issuer_facts" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_facts`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/authorize/issuer_facts", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_fact",
      "fact": "auth.amount",
      "type": "number",
      "source": "authorization",
      "meaning": "Amount in minor units (cents)"
    },
    {
      "object": "issuer_fact",
      "fact": "auth.currency",
      "type": "string",
      "source": "authorization",
      "meaning": "ISO 4217 currency"
    },
    {
      "object": "issuer_fact",
      "fact": "auth.mcc",
      "type": "string",
      "source": "authorization",
      "meaning": "Merchant category code"
    },
    "… 22 more"
  ],
  "has_more": false,
  "heuristic_weights": {
    "merchant": 0.5,
    "device_automated": 0.6,
    "device_unknown": 0.2,
    "velocity": 0.4,
    "network": 0.7
  }
}
```

## List card programs

`GET /v1/authorize/issuer_programs`

Returns your card programs, oldest first. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of programs.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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()
data = httpx.get(f"{api}/v1/authorize/issuer_programs", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_program",
      "id": "iprg_01M8370B3JQBAPFGRWEYQST5G3",
      "name": "Fernhill agent cards",
      "processor": "lithic",
      "mode": "shadow",
      "fail_mode": "processor_default",
      "suspected": {
        "threshold": 0.5,
        "heuristics": {
          "merchant": true,
          "device": true,
          "velocity": true,
          "network": true
        },
        "action": "log",
        "agent_merchants": [
          "AGENTSHOP*"
        ],
        "velocity": {
          "window_seconds": 600,
          "distinct_merchants": 4
        }
      },
      "approvals": {
        "tolerance_percent": 0.1,
        "tolerance_amount": 0,
        "use_within_seconds": 86400,
        "decoupled_three_ds": false,
        "delivery": "provenance"
      },
      "branding": null,
      "app": null,
      "processor_credentials": {
        "configured": false,
        "api_key": false,
        "set_at": null
      },
      "created_at": "2026-11-23T03:25:44.434Z",
      "updated_at": "2026-11-23T03:25:44.434Z"
    },
    {
      "object": "issuer_program",
      "id": "iprg_01M8370B3RM2B683QANBY0PJPY",
      "name": "Fernhill agent cards",
      "processor": "lithic",
      "mode": "shadow",
      "fail_mode": "processor_default",
      "suspected": {
        "threshold": 0.5,
        "heuristics": {
          "merchant": true,
          "device": true,
          "velocity": true,
          "network": true
        },
        "action": "log",
        "agent_merchants": [],
        "velocity": {
          "window_seconds": 600,
          "distinct_merchants": 4
        }
      },
      "approvals": {
        "tolerance_percent": 0.1,
        "tolerance_amount": 0,
        "use_within_seconds": 86400,
        "decoupled_three_ds": false,
        "delivery": "provenance"
      },
      "branding": null,
      "app": null,
      "processor_credentials": {
        "configured": false,
        "api_key": false,
        "set_at": null
      },
      "created_at": "2026-11-23T03:25:44.440Z",
      "updated_at": "2026-11-23T03:25:44.440Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List issuer rule versions

`GET /v1/authorize/issuer_policies/{scope}/versions`

Every version of a scope's rules, newest first: which is live, which are drafts and which is in shadow. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of versions.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X PUT "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.mcc",
              "op": "eq",
              "value": "7995"
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }' > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.mcc",
              "op": "eq",
              "value": "7995"
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.put(f"{api}/v1/authorize/issuer_policies/{program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.mcc",
                        "op": "eq",
                        "value": "7995"
                    }
                ],
                "require": {
                    "deny": True
                }
            }
        ]
    }
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_policies/{program}/versions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "policy_version",
      "domain": "issuer_auth",
      "scope": "iprg_01M82YKHJFPSJP1K70KSYM7FX0",
      "version": 1,
      "active": true,
      "note": null,
      "created_by": "key_01M82YKH39SH61QR93X9E26SXN",
      "created_at": "2026-11-23T00:58:56.464Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List issuer decisions

`GET /v1/authorize/issuer_decisions`

Returns your issuer decisions, newest first, filtered by program, basis, card token or time. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | query | string | no | Only this program's (`iprg_`). |
| `basis` | query | enum | no | Only this basis. One of `network_marked`, `provenance_grant`, `suspected`, `none`. |
| `card_token` | query | string | no | Only this card (the processor's token). |
| `created_gte` | query | timestamp | no | Created at or after. |
| `created_lte` | query | timestamp | no | Created at or before. |
| `outcome` | query | enum | no | Only decisions the rules decided this way (`approve`, `decline` and `ask` are still accepted). One of `allow`, `reject`, `challenge`, `no_opinion`, `approve`, `decline`, `ask`. |
| `agent_key` | query | string | no | Only this agent's (`agent.key`). |
| `q` | query | string | no | Text in the decision or authorization id, the merchant's id or name, the card's token or last four, or the agent key. |
| `review` | query | enum | no | `to_review`: a decline nobody reviewed that the cardholder approved afterwards or whose agent was only suspected; `reviewed` or `not_reviewed`; or one verdict. One of `to_review`, `reviewed`, `not_reviewed`, `right`, `should_have_approved`. |
| `sort` | query | enum | no | The order of the list: `created`, `amount`, with `-` in front for descending. Newest first when omitted. A `next_cursor` carries its order; pass it back with the same `sort`. One of `created`, `-created`, `amount`, `-amount`. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of decisions.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl "$PROVENANCE_API/v1/authorize/issuer_decisions?basis=network_marked" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_decisions?basis=network_marked`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.get(f"{api}/v1/authorize/issuer_decisions?basis=network_marked", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_decision",
      "id": "idec_01M8J1WE5G3KH98Y4M0Z9FZD3Y",
      "program_id": "iprg_01M8J1WE59S39M65EV1JJ1DV1C",
      "kind": "authorization",
      "source": "api",
      "authorization_id": "auth_7Hq2",
      "card": {
        "token": "card_tok_fernhill_1",
        "last4": "4242"
      },
      "amount": 24900,
      "currency": "USD",
      "merchant": {
        "mcc": "5732",
        "id": "mid_brightbox",
        "name": "Brightbox Electronics",
        "country": "US",
        "category": "goods"
      },
      "agent": {
        "token_requestor": "40010030273",
        "network_program": null,
        "basis": "network_marked",
        "confidence": 1,
        "key": "token_requestor:40010030273",
        "heuristics": [],
        "first_seen": true
      },
      "outcome": "challenge",
      "action": "decline",
      "reason": "approval_required",
      "rule": {
        "id": "rul_01M8J1WE5ATCHYDXE6P4JZQ6XP",
        "scope": "issuer"
      },
      "policy_versions": {
        "program": null,
        "issuer": 1
      },
      "shadow": null,
      "mode": "live",
      "latency_ms": 1,
      "fail": null,
      "facts": {
        "auth.amount": 24900,
        "auth.currency": "USD",
        "auth.mcc": "5732",
        "auth.merchant_id": "mid_brightbox",
        "auth.merchant_name": "Brightbox Electronics",
        "auth.merchant_country": "US",
        "auth.channel": "ecommerce",
        "auth.three_ds": null,
        "card.token": "card_tok_fernhill_1",
        "card.program": "iprg_01M8J1WE59S39M65EV1JJ1DV1C",
        "card.country": null,
        "agent.token_requestor": "40010030273",
        "agent.network_program": null,
        "agent.key": "token_requestor:40010030273",
        "agent.basis": "network_marked",
        "agent.confidence": 1,
        "agent.first_seen": true,
        "agent.limit_remaining": null,
        "approval.matched": false,
        "intent.verifiable": null,
        "agent.paused_on_card": false,
        "device.new_for_cardholder": null,
        "network.hosting": null,
        "network.kind": null,
        "network.provider": null
      },
      "limit": null,
      "reservation_id": null,
      "approval": {
        "status": "none",
        "approval_id": null,
        "how": null
      },
      "review": null,
      "three_ds": null,
      "network": null,
      "occurred_at": "2026-11-22T15:04:05.000Z",
      "created_at": "2026-11-28T21:44:50.097Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List suspected-agent merchant lists

`GET /v1/authorize/issuer_agent_merchants`

Your issuer's list and each card's, oldest first. Filter by `scope`, `program_id` or `card_token`. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | query | enum | no | Only this scope. One of `issuer`, `card`. |
| `program_id` | query | string | no | Only this program's cards. |
| `card_token` | query | string | no | Only this card. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

The lists.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X PUT "$PROVENANCE_API/v1/authorize/issuer_agent_merchants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"scope\": \"card\",
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_8\",
    \"patterns\": [
      \"ROBOSHOP*\"
    ],
    \"inherit\": false
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_agent_merchants?program_id=$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_merchants`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "scope": "card",
    "program_id": program,
    "card_token": "card_tok_fernhill_8",
    "patterns": [
      "ROBOSHOP*"
    ],
    "inherit": false
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_merchants?program_id=${program}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.put(f"{api}/v1/authorize/issuer_agent_merchants", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "scope": "card",
    "program_id": program,
    "card_token": "card_tok_fernhill_8",
    "patterns": [
        "ROBOSHOP*"
    ],
    "inherit": False
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_agent_merchants?program_id={program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_agent_merchant_list",
      "id": "iaml_01M838TY0B4S0JCJPT8YKZH634",
      "scope": "card",
      "program_id": "iprg_01M838TY0AYQ50W2G8DPPZMX9E",
      "card_token": "card_tok_fernhill_8",
      "patterns": [
        "ROBOSHOP*"
      ],
      "inherit": false,
      "created_at": "2026-11-23T03:57:44.331Z",
      "updated_at": "2026-11-23T03:57:44.331Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List card limits

`GET /v1/authorize/issuer_card_limits`

Returns your card limits per agent, oldest first, each with this window's spend. Filter by program, card token or agent key. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | query | string | no | Only this program's (`iprg_`). |
| `card_token` | query | string | no | Only this card (the processor's token). |
| `agent_key` | query | string | no | Only this agent key (or `*`). |
| `sort` | query | enum | no | The order of the list: `remaining`, `created`, with `-` in front for descending. Newest first when omitted. A limit for every other agent (`*`) has no single remaining amount and sorts last. A `next_cursor` carries its order; pass it back with the same `sort`. One of `remaining`, `-remaining`, `created`, `-created`. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of limits.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_card_limits" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_3\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"window\": \"month\",
    \"cap\": 50000,
    \"currency\": \"USD\"
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_card_limits?program_id=$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_card_limits`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD"
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_card_limits?program_id=${program}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_card_limits", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD"
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_card_limits?program_id={program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_card_limit",
      "id": "ilim_01M8B27A9GM6PZ11QM67BM1PGZ",
      "program_id": "iprg_01M8B27A9GYKSNMX8QG16CYP6Q",
      "card_token": "card_tok_fernhill_3",
      "agent_key": "token_requestor:40010030273",
      "window": "month",
      "cap": 50000,
      "currency": "USD",
      "per_transaction": null,
      "locks": {
        "mccs": [],
        "merchants": []
      },
      "on_exceed": "reject",
      "set_by": "issuer",
      "version": 1,
      "spent": 0,
      "remaining": 50000,
      "window_start": "2026-11-01T00:00:00.000Z",
      "created_at": "2026-11-26T04:36:05.552Z",
      "updated_at": "2026-11-26T04:36:05.552Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List paused agents

`GET /v1/authorize/issuer_agent_pauses`

Lists the agents paused on your cards, by the cardholder or by your staff.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | query | string | no | Only this program. |
| `card_token` | query | string | no | Only this card. |

### Returns

The pauses.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_agent_pauses" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_9\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"reason\": \"Reported by the cardholder\"
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_agent_pauses?program_id=$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_agent_pauses`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_9",
    "agent_key": "token_requestor:40010030273",
    "reason": "Reported by the cardholder"
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_pauses?program_id=${program}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_agent_pauses", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_9",
    "agent_key": "token_requestor:40010030273",
    "reason": "Reported by the cardholder"
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_agent_pauses?program_id={program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_agent_pause",
      "id": "ilim_01M8J1WE74Z879HBXB4X2GK5GR",
      "program_id": "iprg_01M8J1WE73R8AGMXD8FZ1X1Y4W",
      "card_token": "card_tok_fernhill_9",
      "agent_key": "token_requestor:40010030273",
      "paused_by": "issuer",
      "reason": "Reported by the cardholder",
      "created_at": "2026-11-28T21:44:50.148Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List the reservation ledger

`GET /v1/authorize/issuer_reservations`

Returns the reservation ledger behind your card limits, newest first: one row per authorization held for an agent on a card, with what is held, settled and refunded. Filter by program, card token or agent key. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | query | string | no | Only this program's (`iprg_`). |
| `card_token` | query | string | no | Only this card (the processor's token). |
| `agent_key` | query | string | no | Only this agent key. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of ledger rows.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"authorization_id\": \"auth_fernhill_32\",
    \"amount\": 12000,
    \"currency\": \"USD\",
    \"card\": {
      \"token\": \"card_tok_fernhill_3\"
    },
    \"token\": {
      \"requestor_id\": \"40010030273\",
      \"requestor_type\": \"AI_AGENT\"
    }
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_reservations?program_id=$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_decisions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "authorization_id": "auth_fernhill_32",
    "amount": 12000,
    "currency": "USD",
    "card": {
      "token": "card_tok_fernhill_3"
    },
    "token": {
      "requestor_id": "40010030273",
      "requestor_type": "AI_AGENT"
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_reservations?program_id=${program}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_decisions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "authorization_id": "auth_fernhill_32",
    "amount": 12000,
    "currency": "USD",
    "card": {
        "token": "card_tok_fernhill_3"
    },
    "token": {
        "requestor_id": "40010030273",
        "requestor_type": "AI_AGENT"
    }
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_reservations?program_id={program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_reservation",
      "id": "ires_01M832WPDWBNC6PQTH4EXNVP7F",
      "program_id": "iprg_01M832WPDVN02RWEHQK673FHW6",
      "card_token": "card_tok_fernhill_3",
      "agent_key": "token_requestor:40010030273",
      "authorization_id": "auth_fernhill_32",
      "decision_id": "idec_01M832WPDWG62RMYX53QDVEE67",
      "limit_id": null,
      "currency": "USD",
      "authorized": 12000,
      "held": 12000,
      "settled": 0,
      "refunded": 0,
      "status": "held",
      "occurred_at": "2026-11-23T02:13:50.652Z",
      "expires_at": "2026-11-30T02:13:50.652Z",
      "updated_at": "2026-11-23T02:13:50.652Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List issuer approvals

`GET /v1/authorize/issuer_approvals`

Returns your issuer approvals, newest first, filtered by program, card token or status. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | query | string | no | Only this program's (`iprg_`). |
| `card_token` | query | string | no | Only this card (the processor's token). |
| `status` | query | enum | no | Only this status. One of `pending`, `approved`, `declined`, `expired`, `used`. |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of approvals.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_approvals" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_4\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"cart\": {
      \"order_id\": \"ord_fernhill_42\",
      \"total\": 24900,
      \"currency\": \"USD\",
      \"merchant_id\": \"brightbox\",
      \"origin\": \"https://brightbox.example\",
      \"items\": [
        {
          \"sku\": \"tv-55\",
          \"name\": \"55-inch television\",
          \"quantity\": 1,
          \"unit_amount\": 24900
        }
      ]
    }
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_approvals?program_id=$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_approvals`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
      "order_id": "ord_fernhill_42",
      "total": 24900,
      "currency": "USD",
      "merchant_id": "brightbox",
      "origin": "https://brightbox.example",
      "items": [
        {
          "sku": "tv-55",
          "name": "55-inch television",
          "quantity": 1,
          "unit_amount": 24900
        }
      ]
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_approvals?program_id=${program}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_approvals", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
        "order_id": "ord_fernhill_42",
        "total": 24900,
        "currency": "USD",
        "merchant_id": "brightbox",
        "origin": "https://brightbox.example",
        "items": [
            {
                "sku": "tv-55",
                "name": "55-inch television",
                "quantity": 1,
                "unit_amount": 24900
            }
        ]
    }
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_approvals?program_id={program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_approval",
      "id": "iapr_01M8J1WE8BYQD6PN95VMMCSMT8",
      "program_id": "iprg_01M8J1WE8AJTXT3RBZKBYE4JRT",
      "card_token": "card_tok_fernhill_4",
      "agent_key": "token_requestor:40010030273",
      "status": "pending",
      "amount": 24900,
      "currency": "USD",
      "merchant": {
        "domain": "brightbox.example",
        "ids": [],
        "descriptors": []
      },
      "tolerance": {
        "percent": 0.1,
        "amount": 0
      },
      "checkout_approval_id": "coap_01M8J1WE8BX5K3N97KX5QW9DK9",
      "decision_id": null,
      "used_by_decision_id": null,
      "decided_at": null,
      "used_at": null,
      "use_by": "2026-11-29T21:44:50.187Z",
      "three_ds": null,
      "delivery": {
        "mode": "provenance",
        "via": "link_only"
      },
      "approval_context": null,
      "created_at": "2026-11-28T21:44:50.187Z",
      "updated_at": "2026-11-28T21:44:50.187Z",
      "decided_via": null,
      "decided_method": null,
      "person_decision": null,
      "decline_reason": null,
      "decline_note": null
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## List the merchant table

`GET /v1/authorize/issuer_merchants`

Returns the merchant-matching table, oldest first, for a program or all of yours. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | query | string | no | Only this program's (`iprg_`). |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of rows.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_merchants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"domain\": \"brightbox.example\",
    \"merchant_ids\": [
      \"174030075991\"
    ]
  }" > /dev/null
curl "$PROVENANCE_API/v1/authorize/issuer_merchants?program_id=$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_merchants`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "domain": "brightbox.example",
    "merchant_ids": [
      "174030075991"
    ]
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_merchants?program_id=${program}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_merchants", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "domain": "brightbox.example",
    "merchant_ids": [
        "174030075991"
    ]
}).json()
data = httpx.get(f"{api}/v1/authorize/issuer_merchants?program_id={program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "object": "issuer_merchant",
      "id": "imer_01M834BSZRY45X5297ST5QJQNC",
      "program_id": "iprg_01M834BSZQ1FKRQBYJRP4HQXTV",
      "domain": "brightbox.example",
      "merchant_ids": [
        "174030075991"
      ],
      "descriptors": [],
      "created_at": "2026-11-23T02:39:34.392Z",
      "updated_at": "2026-11-23T02:39:34.392Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## Remove a suspected-agent merchant list

`DELETE /v1/authorize/issuer_agent_merchants/{id}`

Removes the issuer's list or a card's. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The list's ID (`iaml_`). |

### Returns

The list was removed.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X PUT "$PROVENANCE_API/v1/authorize/issuer_agent_merchants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"scope\": \"card\",
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_9\",
    \"patterns\": [
      \"ROBOSHOP*\"
    ]
  }" > step.json
export LIST=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/authorize/issuer_agent_merchants/$LIST" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_merchants`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "scope": "card",
    "program_id": program,
    "card_token": "card_tok_fernhill_9",
    "patterns": [
      "ROBOSHOP*"
    ]
  }),
})).json();
const list = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_merchants/${list}`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.put(f"{api}/v1/authorize/issuer_agent_merchants", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "scope": "card",
    "program_id": program,
    "card_token": "card_tok_fernhill_9",
    "patterns": [
        "ROBOSHOP*"
    ]
}).json()
list = step2["id"]
data = httpx.delete(f"{api}/v1/authorize/issuer_agent_merchants/{list}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_agent_merchant_list",
  "id": "iaml_01M838TY0EE5815KS49GFYGE0A",
  "deleted": true
}
```

## Remove a card limit

`DELETE /v1/authorize/issuer_card_limits/{id}`

Removes a card limit. The reservation ledger keeps its rows, so a limit set again counts the window's spend so far. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The limit's ID (`ilim_`). |

### Returns

The limit was removed.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_card_limits" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_3\",
    \"agent_key\": \"*\",
    \"window\": \"day\",
    \"cap\": 10000,
    \"currency\": \"USD\"
  }" > step.json
export LIMIT=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/authorize/issuer_card_limits/$LIMIT" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_card_limits`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "*",
    "window": "day",
    "cap": 10000,
    "currency": "USD"
  }),
})).json();
const limit = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_card_limits/${limit}`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_card_limits", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "*",
    "window": "day",
    "cap": 10000,
    "currency": "USD"
}).json()
limit = step2["id"]
data = httpx.delete(f"{api}/v1/authorize/issuer_card_limits/{limit}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_card_limit",
  "id": "ilim_01M8B27A9PKM878XMK0BSYP0J0",
  "deleted": true
}
```

## Remove a merchant table row

`DELETE /v1/authorize/issuer_merchants/{id}`

Removes a row of the merchant-matching table. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The row's ID (`imer_`). |

### Returns

The row was removed.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_merchants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"domain\": \"brightbox.example\",
    \"merchant_ids\": [
      \"174030075991\"
    ]
  }" > step.json
export ROW=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/authorize/issuer_merchants/$ROW" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_merchants`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "domain": "brightbox.example",
    "merchant_ids": [
      "174030075991"
    ]
  }),
})).json();
const row = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_merchants/${row}`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_merchants", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "domain": "brightbox.example",
    "merchant_ids": [
        "174030075991"
    ]
}).json()
row = step2["id"]
data = httpx.delete(f"{api}/v1/authorize/issuer_merchants/{row}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "issuer_merchant",
  "id": "imer_01M834BSZS72ENDR48VMA9VSMA",
  "deleted": true
}
```

## Save and publish issuer rules

`PUT /v1/authorize/issuer_policies/{scope}`

Saves a new version of a scope's rules and makes it live. Rules read the issuer facts only and run in order; the first that decides wins. A program's rules and the issuer's both run and the stricter outcome wins. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `document` | body | object | yes | `{ rules: [...] }`, each rule a `when` over issuer facts and one of `no_challenge` (or the older `frictionless`), `approval`, `deny` or `notify` in `require`. |
| `note` | body | string | no | A note on the version. |

### Returns

The new version, live.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`policy_invalid`](https://provenanceauth.com/docs/platform/errors.md#policy_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X PUT "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "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
          }
        }
      ]
    },
    "note": "Ask over $200 and for a new agent"
  }'
```

**Node**

```ts
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_policies/${program}`, {
  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
            },
            {
              "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
          }
        }
      ]
    },
    "note": "Ask over $200 and for a new agent"
  }),
})).json();
```

**Python**

```python
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.put(f"{api}/v1/authorize/issuer_policies/{program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "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
                }
            }
        ]
    },
    "note": "Ask over $200 and for a new agent"
}).json()
```

### Response 201

```json
{
  "object": "policy_version",
  "domain": "issuer_auth",
  "scope": "iprg_01M82YKHJCQTPPX8TETZ2JSRX2",
  "version": 1,
  "active": true,
  "note": "Ask over $200 and for a new agent",
  "created_by": "key_01M82YKH39SH61QR93X9E26SXN",
  "created_at": "2026-11-23T00:58:56.462Z",
  "document": {
    "rules": [
      {
        "id": "rul_01M82YKHJES9ANP7G40P32DV3A",
        "when": [
          {
            "fact": "auth.amount",
            "op": "gt",
            "value": 20000
          },
          {
            "fact": "agent.key",
            "op": "is_not_empty",
            "value": true
          }
        ],
        "require": {
          "approval": true
        },
        "label": "Agent purchases over $200"
      },
      {
        "id": "rul_01M82YKHJEG16JV7F90P79CXPR",
        "when": [
          {
            "fact": "agent.first_seen",
            "op": "eq",
            "value": true
          }
        ],
        "require": {
          "approval": true
        },
        "label": "A new agent on the card"
      }
    ]
  }
}
```

## Save an issuer rules draft

`POST /v1/authorize/issuer_policies/{scope}/versions`

Saves a version of a scope's rules without making it live, to run in shadow or publish later. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `document` | body | object | yes | `{ rules: [...] }`. |
| `note` | body | string | no | A note on the version. |

### Returns

The draft.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`policy_invalid`](https://provenanceauth.com/docs/platform/errors.md#policy_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    },
    "note": "Decline over $500"
  }'
```

**Node**

```ts
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_policies/${program}/versions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    },
    "note": "Decline over $500"
  }),
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_policies/{program}/versions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.amount",
                        "op": "gt",
                        "value": 50000
                    }
                ],
                "require": {
                    "deny": True
                }
            }
        ]
    },
    "note": "Decline over $500"
}).json()
```

### Response 201

```json
{
  "object": "policy_version",
  "domain": "issuer_auth",
  "scope": "iprg_01M82YKHJK7WCJ8EK8FE2E5FFJ",
  "version": 1,
  "active": false,
  "draft": true,
  "note": "Decline over $500",
  "created_by": "key_01M82YKH39SH61QR93X9E26SXN",
  "created_at": "2026-11-23T00:58:56.468Z",
  "document": {
    "rules": [
      {
        "id": "rul_01M82YKHJM3YAGE4A1AP4PHFNF",
        "when": [
          {
            "fact": "auth.amount",
            "op": "gt",
            "value": 50000
          }
        ],
        "require": {
          "deny": true
        }
      }
    ]
  }
}
```

## Publish an issuer rules version

`POST /v1/authorize/issuer_policies/{scope}/versions/{version}/publish`

Makes a version of a scope's rules live: a draft, or an earlier version. Sends `authorize.policy.published` with the scope. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `version` | path | integer | yes | The version to publish. |

### Returns

The version, live.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }' > /dev/null
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions/1/publish" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions/1/publish`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/versions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.amount",
                        "op": "gt",
                        "value": 50000
                    }
                ],
                "require": {
                    "deny": True
                }
            }
        ]
    }
}).json()
data = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/versions/1/publish", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "policy_version",
  "domain": "issuer_auth",
  "scope": "iprg_01M82YKHJMSJJNQ1ZF66WCMJ28",
  "version": 1,
  "active": true,
  "note": null,
  "created_by": "key_01M82YKH39SH61QR93X9E26SXN",
  "created_at": "2026-11-23T00:58:56.469Z"
}
```

## Run an issuer rules version in shadow

`POST /v1/authorize/issuer_policies/{scope}/versions/{version}/shadow`

Runs a version of a scope's rules beside the live one on every decision, recorded on the decision's `shadow` and never answered. One shadow per scope. Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `version` | path | integer | yes | The version to shadow. |

### Returns

The version, in shadow.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }' > /dev/null
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions/1/shadow" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions/1/shadow`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/versions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.amount",
                        "op": "gt",
                        "value": 50000
                    }
                ],
                "require": {
                    "deny": True
                }
            }
        ]
    }
}).json()
data = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/versions/1/shadow", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "policy_version",
  "domain": "issuer_auth",
  "scope": "iprg_01M82YKHJQB4VJV2XP9SMC1Z6H",
  "version": 1,
  "active": false,
  "draft": true,
  "shadow": true,
  "note": null,
  "created_by": "key_01M82YKH39SH61QR93X9E26SXN",
  "created_at": "2026-11-23T00:58:56.471Z"
}
```

## Stop an issuer rules shadow

`DELETE /v1/authorize/issuer_policies/{scope}/versions/{version}/shadow`

Stops running the scope's shadow version (the version stays in the history). Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `version` | path | integer | yes | The version in shadow. |

### Returns

The shadow stopped.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Fernhill agent cards", "processor": "lithic" }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }' > /dev/null
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions/1/shadow" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
curl -X DELETE "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/versions/1/shadow" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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 step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 50000
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }),
})).json();
const step3 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions/1/shadow`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/versions/1/shadow`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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"]
step2 = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/versions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.amount",
                        "op": "gt",
                        "value": 50000
                    }
                ],
                "require": {
                    "deny": True
                }
            }
        ]
    }
}).json()
step3 = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/versions/1/shadow", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
data = httpx.delete(f"{api}/v1/authorize/issuer_policies/{program}/versions/1/shadow", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "object": "policy_shadow",
  "domain": "issuer_auth",
  "scope": "iprg_01M82YKHJS814ZM1PGPX4JMRXT",
  "shadow": false
}
```

## Simulate an authorization

`POST /v1/authorize/issuer_policies/{scope}/simulate`

Runs one authorization through the scope classifier and both scopes' rules, with `document` in place of this scope's live rules if you send one. Writes nothing. The issuer scope needs `program_id` (whose settings it runs under). Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `authorization` | body | object | yes | One authorization as your processor sent it, in a processor-neutral shape. Never a card number: the processor's card token and at most the last four digits. |
| `authorization.program_id` | body | string | no | The program (`iprg_`). Required on a decision; on a simulate or backtest it is the scope's program. |
| `authorization.authorization_id` | body | string | no | The processor's id for the authorization. |
| `authorization.kind` | body | enum | no | An authorization (the default) or a 3-D Secure request. One of `authorization`, `three_ds`. |
| `authorization.occurred_at` | body | timestamp | no | When the processor received it. |
| `authorization.amount` | body | integer | yes | Amount in minor units (cents). |
| `authorization.currency` | body | string | yes | ISO 4217 currency. |
| `authorization.card` | body | object | yes | The card, by the processor's token. |
| `authorization.card.token` | body | string | yes | The processor's card token (never the card number). |
| `authorization.card.last4` | body | string | no | The last four digits. |
| `authorization.card.country` | body | string | no | Card country (ISO 3166 alpha-2). |
| `authorization.merchant` | body | object | no | The merchant fields on the authorization. |
| `authorization.merchant.mcc` | body | string | no | Merchant category code. |
| `authorization.merchant.id` | body | string | no | Acquirer merchant id. |
| `authorization.merchant.name` | body | string | no | Merchant descriptor. |
| `authorization.merchant.country` | body | string | no | Merchant country. |
| `authorization.channel` | body | enum | no | The channel. One of `card_not_present`, `ecommerce`, `recurring`, `card_present`. |
| `authorization.three_ds` | body | object | no | 3-D Secure data on this authorization, if any. |
| `authorization.three_ds.result` | body | enum | no | The 3-D Secure result. One of `authenticated`, `attempted`, `failed`, `not_authenticated`. |
| `authorization.three_ds.headless_browser` | body | boolean | no | The browser was headless. |
| `authorization.three_ds.hosted_browser` | body | boolean | no | The browser ran in a hosted environment. |
| `authorization.three_ds.cardholder_device_known` | body | boolean | no | The cardholder used this device before. |
| `authorization.token` | body | object | no | Network token data. |
| `authorization.token.requestor_id` | body | string | no | The token requestor id. |
| `authorization.token.requestor_type` | body | string | no | The token requestor type (`AI_AGENT` marks an agent). |
| `authorization.network` | body | object | no | What the network says about the purchase. |
| `authorization.network.program` | body | enum | no | The network's agent program. One of `visa_vic`, `mastercard_agent_pay`. |
| `authorization.network.agent_id` | body | string | no | The network's agent identifier. |
| `authorization.network.agent_flag` | body | boolean | no | The network flags the purchase as an agent's. |
| `authorization.provenance` | body | object | no | A Provenance grant the purchase carries. |
| `authorization.provenance.grant_id` | body | string | no | The grant (`grt_`); counts only when it resolves and is active. |
| `authorization.intent` | body | object | no | Whether an AP2 mandate or Verifiable Intent chain verified for the purchase. |
| `authorization.intent.verifiable` | body | boolean | no | It verified. |
| `authorization.label` | body | enum | no | Backtest only: what you know the purchase was. One of `agent`, `human`. |
| `document` | body | object | no | A draft of this scope's rules (`{ rules: [...] }`). |
| `program_id` | body | string | no | The issuer scope only: the program (`iprg_`). |

### Returns

What the decision would be.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`policy_invalid`](https://provenanceauth.com/docs/platform/errors.md#policy_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/simulate" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 20000
            }
          ],
          "require": {
            "approval": true
          }
        }
      ]
    },
    "authorization": {
      "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"
      }
    }
  }'
```

**Node**

```ts
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 data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/simulate`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 20000
            }
          ],
          "require": {
            "approval": true
          }
        }
      ]
    },
    "authorization": {
      "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"
      }
    }
  }),
})).json();
```

**Python**

```python
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"]
data = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/simulate", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.amount",
                        "op": "gt",
                        "value": 20000
                    }
                ],
                "require": {
                    "approval": True
                }
            }
        ]
    },
    "authorization": {
        "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"
        }
    }
}).json()
```

### Response 200

```json
{
  "object": "policy_simulation",
  "domain": "issuer_auth",
  "program_id": "iprg_01M8B27A8K2HP6B2YBYYE4XAQV",
  "agent": {
    "token_requestor": "40010030273",
    "network_program": null,
    "basis": "network_marked",
    "confidence": 1,
    "key": "token_requestor:40010030273",
    "heuristics": [],
    "first_seen": true
  },
  "facts": {
    "auth.amount": 24900,
    "auth.currency": "USD",
    "auth.mcc": "5732",
    "auth.merchant_id": "mid_brightbox",
    "auth.merchant_name": "Brightbox Electronics",
    "auth.merchant_country": "US",
    "auth.channel": null,
    "auth.three_ds": null,
    "card.token": "card_tok_fernhill_1",
    "card.program": "iprg_01M8B27A8K2HP6B2YBYYE4XAQV",
    "card.country": null,
    "agent.token_requestor": "40010030273",
    "agent.network_program": null,
    "agent.key": "token_requestor:40010030273",
    "agent.basis": "network_marked",
    "agent.confidence": 1,
    "agent.first_seen": true,
    "agent.limit_remaining": null,
    "approval.matched": false,
    "intent.verifiable": null
  },
  "outcome": "challenge",
  "action": "decline",
  "reason": "approval_required",
  "rule": {
    "id": "rul_01M8B27A8Q7PA19F94NPMK5KVB",
    "scope": "program"
  },
  "limit": null,
  "approval": {
    "status": "none",
    "approval_id": null,
    "how": null
  },
  "notified": [],
  "policy_versions": {
    "program": 0,
    "issuer": null
  }
}
```

## Backtest issuer rules

`POST /v1/authorize/issuer_policies/{scope}/backtest`

Replays up to 10,000 authorizations from your history, in time order, through the scope classifier and the rules: counts by basis, outcomes, answers and money, a draft compared with the live rules, and, for rows you label, how many human purchases each suspected-agent threshold would catch. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `scope` | path | string | yes | `issuer` or a program ID (`iprg_`). |
| `authorizations` | body | array of objects | yes | The history. |
| `authorizations.program_id` | body | string | no | The program (`iprg_`). Required on a decision; on a simulate or backtest it is the scope's program. |
| `authorizations.authorization_id` | body | string | no | The processor's id for the authorization. |
| `authorizations.kind` | body | enum | no | An authorization (the default) or a 3-D Secure request. One of `authorization`, `three_ds`. |
| `authorizations.occurred_at` | body | timestamp | no | When the processor received it. |
| `authorizations.amount` | body | integer | yes | Amount in minor units (cents). |
| `authorizations.currency` | body | string | yes | ISO 4217 currency. |
| `authorizations.card` | body | object | yes | The card, by the processor's token. |
| `authorizations.card.token` | body | string | yes | The processor's card token (never the card number). |
| `authorizations.card.last4` | body | string | no | The last four digits. |
| `authorizations.card.country` | body | string | no | Card country (ISO 3166 alpha-2). |
| `authorizations.merchant` | body | object | no | The merchant fields on the authorization. |
| `authorizations.merchant.mcc` | body | string | no | Merchant category code. |
| `authorizations.merchant.id` | body | string | no | Acquirer merchant id. |
| `authorizations.merchant.name` | body | string | no | Merchant descriptor. |
| `authorizations.merchant.country` | body | string | no | Merchant country. |
| `authorizations.channel` | body | enum | no | The channel. One of `card_not_present`, `ecommerce`, `recurring`, `card_present`. |
| `authorizations.three_ds` | body | object | no | 3-D Secure data on this authorization, if any. |
| `authorizations.three_ds.result` | body | enum | no | The 3-D Secure result. One of `authenticated`, `attempted`, `failed`, `not_authenticated`. |
| `authorizations.three_ds.headless_browser` | body | boolean | no | The browser was headless. |
| `authorizations.three_ds.hosted_browser` | body | boolean | no | The browser ran in a hosted environment. |
| `authorizations.three_ds.cardholder_device_known` | body | boolean | no | The cardholder used this device before. |
| `authorizations.token` | body | object | no | Network token data. |
| `authorizations.token.requestor_id` | body | string | no | The token requestor id. |
| `authorizations.token.requestor_type` | body | string | no | The token requestor type (`AI_AGENT` marks an agent). |
| `authorizations.network` | body | object | no | What the network says about the purchase. |
| `authorizations.network.program` | body | enum | no | The network's agent program. One of `visa_vic`, `mastercard_agent_pay`. |
| `authorizations.network.agent_id` | body | string | no | The network's agent identifier. |
| `authorizations.network.agent_flag` | body | boolean | no | The network flags the purchase as an agent's. |
| `authorizations.provenance` | body | object | no | A Provenance grant the purchase carries. |
| `authorizations.provenance.grant_id` | body | string | no | The grant (`grt_`); counts only when it resolves and is active. |
| `authorizations.intent` | body | object | no | Whether an AP2 mandate or Verifiable Intent chain verified for the purchase. |
| `authorizations.intent.verifiable` | body | boolean | no | It verified. |
| `authorizations.label` | body | enum | no | Backtest only: what you know the purchase was. One of `agent`, `human`. |
| `document` | body | object | no | A draft of this scope's rules to compare with the live ones. |
| `program_id` | body | string | no | The issuer scope only: the program whose settings and rules to use. |

### Returns

The backtest.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`policy_invalid`](https://provenanceauth.com/docs/platform/errors.md#policy_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "suspected": {
      "agent_merchants": [
        "AGENTSHOP*"
      ]
    }
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM/backtest" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 20000
            }
          ],
          "require": {
            "approval": true
          }
        }
      ]
    },
    "authorizations": [
      {
        "occurred_at": "2026-11-01T10:00:00Z",
        "amount": 24900,
        "currency": "USD",
        "card": {
          "token": "card_tok_1"
        },
        "token": {
          "requestor_type": "AI_AGENT",
          "requestor_id": "40010030273"
        },
        "label": "agent"
      },
      {
        "occurred_at": "2026-11-01T11:00:00Z",
        "amount": 1800,
        "currency": "USD",
        "card": {
          "token": "card_tok_2"
        },
        "label": "human"
      },
      {
        "occurred_at": "2026-11-01T12:00:00Z",
        "amount": 6400,
        "currency": "USD",
        "card": {
          "token": "card_tok_3"
        },
        "merchant": {
          "id": "AGENTSHOP-1"
        },
        "three_ds": {
          "headless_browser": true
        },
        "label": "agent"
      }
    ]
  }'
```

**Node**

```ts
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",
    "suspected": {
      "agent_merchants": [
        "AGENTSHOP*"
      ]
    }
  }),
})).json();
const program = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_policies/${program}/backtest`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 20000
            }
          ],
          "require": {
            "approval": true
          }
        }
      ]
    },
    "authorizations": [
      {
        "occurred_at": "2026-11-01T10:00:00Z",
        "amount": 24900,
        "currency": "USD",
        "card": {
          "token": "card_tok_1"
        },
        "token": {
          "requestor_type": "AI_AGENT",
          "requestor_id": "40010030273"
        },
        "label": "agent"
      },
      {
        "occurred_at": "2026-11-01T11:00:00Z",
        "amount": 1800,
        "currency": "USD",
        "card": {
          "token": "card_tok_2"
        },
        "label": "human"
      },
      {
        "occurred_at": "2026-11-01T12:00:00Z",
        "amount": 6400,
        "currency": "USD",
        "card": {
          "token": "card_tok_3"
        },
        "merchant": {
          "id": "AGENTSHOP-1"
        },
        "three_ds": {
          "headless_browser": true
        },
        "label": "agent"
      }
    ]
  }),
})).json();
```

**Python**

```python
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",
    "suspected": {
        "agent_merchants": [
            "AGENTSHOP*"
        ]
    }
}).json()
program = step1["id"]
data = httpx.post(f"{api}/v1/authorize/issuer_policies/{program}/backtest", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "when": [
                    {
                        "fact": "auth.amount",
                        "op": "gt",
                        "value": 20000
                    }
                ],
                "require": {
                    "approval": True
                }
            }
        ]
    },
    "authorizations": [
        {
            "occurred_at": "2026-11-01T10:00:00Z",
            "amount": 24900,
            "currency": "USD",
            "card": {
                "token": "card_tok_1"
            },
            "token": {
                "requestor_type": "AI_AGENT",
                "requestor_id": "40010030273"
            },
            "label": "agent"
        },
        {
            "occurred_at": "2026-11-01T11:00:00Z",
            "amount": 1800,
            "currency": "USD",
            "card": {
                "token": "card_tok_2"
            },
            "label": "human"
        },
        {
            "occurred_at": "2026-11-01T12:00:00Z",
            "amount": 6400,
            "currency": "USD",
            "card": {
                "token": "card_tok_3"
            },
            "merchant": {
                "id": "AGENTSHOP-1"
            },
            "three_ds": {
                "headless_browser": True
            },
            "label": "agent"
        }
    ]
}).json()
```

### Response 200

```json
{
  "scope": "iprg_01M8D8YP374BP7GXWDD7T8FEQ0",
  "program_id": "iprg_01M8D8YP374BP7GXWDD7T8FEQ0",
  "object": "issuer_backtest",
  "replayed": 3,
  "from": "2026-11-01T10:00:00Z",
  "to": "2026-11-01T12:00:00Z",
  "basis": {
    "network_marked": 1,
    "provenance_grant": 0,
    "suspected": 1,
    "none": 1
  },
  "current": {
    "outcomes": {
      "allow": 0,
      "reject": 0,
      "challenge": 0,
      "no_opinion": 3
    },
    "actions": {
      "approve": 0,
      "decline": 0,
      "no_opinion": 3
    },
    "amounts": {
      "allow": 0,
      "reject": 0,
      "challenge": 0,
      "no_opinion": 33100
    }
  },
  "draft": {
    "outcomes": {
      "allow": 0,
      "reject": 0,
      "challenge": 1,
      "no_opinion": 2
    },
    "actions": {
      "approve": 0,
      "decline": 1,
      "no_opinion": 2
    },
    "amounts": {
      "allow": 0,
      "reject": 0,
      "challenge": 24900,
      "no_opinion": 8200
    }
  },
  "changed": 1,
  "transitions": {
    "no_opinion->challenge": 1
  },
  "suspected": {
    "threshold": 0.5,
    "action": "log",
    "labelled": {
      "agent": 2,
      "human": 1
    },
    "thresholds": [
      {
        "threshold": 0.3,
        "suspected": 1,
        "labelled_agent": 1,
        "labelled_human": 0
      },
      {
        "threshold": 0.5,
        "suspected": 1,
        "labelled_agent": 1,
        "labelled_human": 0
      },
      {
        "threshold": 0.7,
        "suspected": 1,
        "labelled_agent": 1,
        "labelled_human": 0
      },
      {
        "threshold": 0.9,
        "suspected": 0,
        "labelled_agent": 0,
        "labelled_human": 0
      }
    ]
  }
}
```

## Decide an authorization

`POST /v1/authorize/issuer_decisions`

Decides one authorization on the program's rules and the issuer's: approve, decline or `no_opinion` (your processor's own rules decide). Never holds the authorization for a person. A shadow-mode program answers `no_opinion` and records what it would have answered. A card number anywhere is refused. Metered per agent decision; Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | body | string | no | The program (`iprg_`). Required on a decision; on a simulate or backtest it is the scope's program. |
| `authorization_id` | body | string | no | The processor's id for the authorization. |
| `kind` | body | enum | no | An authorization (the default) or a 3-D Secure request. One of `authorization`, `three_ds`. |
| `occurred_at` | body | timestamp | no | When the processor received it. |
| `amount` | body | integer | yes | Amount in minor units (cents). |
| `currency` | body | string | yes | ISO 4217 currency. |
| `card` | body | object | yes | The card, by the processor's token. |
| `card.token` | body | string | yes | The processor's card token (never the card number). |
| `card.last4` | body | string | no | The last four digits. |
| `card.country` | body | string | no | Card country (ISO 3166 alpha-2). |
| `merchant` | body | object | no | The merchant fields on the authorization. |
| `merchant.mcc` | body | string | no | Merchant category code. |
| `merchant.id` | body | string | no | Acquirer merchant id. |
| `merchant.name` | body | string | no | Merchant descriptor. |
| `merchant.country` | body | string | no | Merchant country. |
| `channel` | body | enum | no | The channel. One of `card_not_present`, `ecommerce`, `recurring`, `card_present`. |
| `three_ds` | body | object | no | 3-D Secure data on this authorization, if any. |
| `three_ds.result` | body | enum | no | The 3-D Secure result. One of `authenticated`, `attempted`, `failed`, `not_authenticated`. |
| `three_ds.headless_browser` | body | boolean | no | The browser was headless. |
| `three_ds.hosted_browser` | body | boolean | no | The browser ran in a hosted environment. |
| `three_ds.cardholder_device_known` | body | boolean | no | The cardholder used this device before. |
| `token` | body | object | no | Network token data. |
| `token.requestor_id` | body | string | no | The token requestor id. |
| `token.requestor_type` | body | string | no | The token requestor type (`AI_AGENT` marks an agent). |
| `network` | body | object | no | What the network says about the purchase. |
| `network.program` | body | enum | no | The network's agent program. One of `visa_vic`, `mastercard_agent_pay`. |
| `network.agent_id` | body | string | no | The network's agent identifier. |
| `network.agent_flag` | body | boolean | no | The network flags the purchase as an agent's. |
| `provenance` | body | object | no | A Provenance grant the purchase carries. |
| `provenance.grant_id` | body | string | no | The grant (`grt_`); counts only when it resolves and is active. |
| `intent` | body | object | no | Whether an AP2 mandate or Verifiable Intent chain verified for the purchase. |
| `intent.verifiable` | body | boolean | no | It verified. |
| `label` | body | enum | no | Backtest only: what you know the purchase was. One of `agent`, `human`. |

### Returns

The decision. See [the issuer decision object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X PUT "$PROVENANCE_API/v1/authorize/issuer_policies/issuer" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "label": "Agent purchases over $200",
          "when": [
            {
              "fact": "auth.amount",
              "op": "gt",
              "value": 20000
            }
          ],
          "require": {
            "approval": true
          }
        }
      ]
    }
  }' > /dev/null
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"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\"
    }
  }"
```

**Node**

```ts
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();
```

**Python**

```python
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()
```

### Response 201

```json
{
  "object": "issuer_decision",
  "id": "idec_01M8J1WE5G3KH98Y4M0Z9FZD3Y",
  "program_id": "iprg_01M8J1WE59S39M65EV1JJ1DV1C",
  "kind": "authorization",
  "source": "api",
  "authorization_id": "auth_7Hq2",
  "card": {
    "token": "card_tok_fernhill_1",
    "last4": "4242"
  },
  "amount": 24900,
  "currency": "USD",
  "merchant": {
    "mcc": "5732",
    "id": "mid_brightbox",
    "name": "Brightbox Electronics",
    "country": "US",
    "category": "goods"
  },
  "agent": {
    "token_requestor": "40010030273",
    "network_program": null,
    "basis": "network_marked",
    "confidence": 1,
    "key": "token_requestor:40010030273",
    "heuristics": [],
    "first_seen": true
  },
  "outcome": "challenge",
  "action": "decline",
  "reason": "approval_required",
  "rule": {
    "id": "rul_01M8J1WE5ATCHYDXE6P4JZQ6XP",
    "scope": "issuer"
  },
  "policy_versions": {
    "program": null,
    "issuer": 1
  },
  "shadow": null,
  "mode": "live",
  "latency_ms": 1,
  "fail": null,
  "facts": {
    "auth.amount": 24900,
    "auth.currency": "USD",
    "auth.mcc": "5732",
    "auth.merchant_id": "mid_brightbox",
    "auth.merchant_name": "Brightbox Electronics",
    "auth.merchant_country": "US",
    "auth.channel": "ecommerce",
    "auth.three_ds": null,
    "card.token": "card_tok_fernhill_1",
    "card.program": "iprg_01M8J1WE59S39M65EV1JJ1DV1C",
    "card.country": null,
    "agent.token_requestor": "40010030273",
    "agent.network_program": null,
    "agent.key": "token_requestor:40010030273",
    "agent.basis": "network_marked",
    "agent.confidence": 1,
    "agent.first_seen": true,
    "agent.limit_remaining": null,
    "approval.matched": false,
    "intent.verifiable": null,
    "agent.paused_on_card": false,
    "device.new_for_cardholder": null,
    "network.hosting": null,
    "network.kind": null,
    "network.provider": null
  },
  "limit": null,
  "reservation_id": null,
  "approval": {
    "status": "none",
    "approval_id": null,
    "how": null
  },
  "review": null,
  "three_ds": null,
  "network": null,
  "occurred_at": "2026-11-22T15:04:05.000Z",
  "created_at": "2026-11-28T21:44:50.097Z"
}
```

## Review an issuer decline

`POST /v1/authorize/issuer_decisions/{id}/review`

Marks a declined or asked decision `right` or `should_have_approved`, once (else 409 `issuer_review_not_open`). The verdict feeds the rule suggestions; the decision never changes. Needs Manage policies. Pro and above. See the [issuer guide](https://provenanceauth.com/docs/authorize/guides/issuer-agent-controls.md).

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The decision's ID (`idec_`). |
| `verdict` | body | enum | yes | `right` or `should_have_approved`. One of `right`, `should_have_approved`. |
| `note` | body | string \| null | no | Plain text kept with the verdict. |

### Returns

The decision with its `review`. See [the issuer decision object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`issuer_review_not_open`](https://provenanceauth.com/docs/platform/errors.md#issuer_review_not_open)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X PUT "$PROVENANCE_API/v1/authorize/issuer_policies/$PROGRAM" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "document": {
      "rules": [
        {
          "label": "No gambling",
          "when": [
            {
              "fact": "auth.mcc",
              "op": "eq",
              "value": "7995"
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }' > /dev/null
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"authorization_id\": \"auth_9Kd3\",
    \"amount\": 4000,
    \"currency\": \"USD\",
    \"card\": {
      \"token\": \"card_tok_fernhill_3\",
      \"last4\": \"4417\"
    },
    \"merchant\": {
      \"mcc\": \"7995\",
      \"id\": \"mid_lucky_lanes\",
      \"name\": \"Lucky Lanes\",
      \"country\": \"US\"
    },
    \"token\": {
      \"requestor_id\": \"40010030273\",
      \"requestor_type\": \"AI_AGENT\"
    }
  }" > step.json
export DECISION=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions/$DECISION/review" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "verdict": "should_have_approved",
    "note": "The cardholder buys from this shop every month."
  }'
```

**Node**

```ts
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/${program}`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "document": {
      "rules": [
        {
          "label": "No gambling",
          "when": [
            {
              "fact": "auth.mcc",
              "op": "eq",
              "value": "7995"
            }
          ],
          "require": {
            "deny": true
          }
        }
      ]
    }
  }),
})).json();
const step3 = 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_9Kd3",
    "amount": 4000,
    "currency": "USD",
    "card": {
      "token": "card_tok_fernhill_3",
      "last4": "4417"
    },
    "merchant": {
      "mcc": "7995",
      "id": "mid_lucky_lanes",
      "name": "Lucky Lanes",
      "country": "US"
    },
    "token": {
      "requestor_id": "40010030273",
      "requestor_type": "AI_AGENT"
    }
  }),
})).json();
const decision = step3.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_decisions/${decision}/review`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "verdict": "should_have_approved",
    "note": "The cardholder buys from this shop every month."
  }),
})).json();
```

**Python**

```python
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/{program}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "document": {
        "rules": [
            {
                "label": "No gambling",
                "when": [
                    {
                        "fact": "auth.mcc",
                        "op": "eq",
                        "value": "7995"
                    }
                ],
                "require": {
                    "deny": True
                }
            }
        ]
    }
}).json()
step3 = httpx.post(f"{api}/v1/authorize/issuer_decisions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "authorization_id": "auth_9Kd3",
    "amount": 4000,
    "currency": "USD",
    "card": {
        "token": "card_tok_fernhill_3",
        "last4": "4417"
    },
    "merchant": {
        "mcc": "7995",
        "id": "mid_lucky_lanes",
        "name": "Lucky Lanes",
        "country": "US"
    },
    "token": {
        "requestor_id": "40010030273",
        "requestor_type": "AI_AGENT"
    }
}).json()
decision = step3["id"]
data = httpx.post(f"{api}/v1/authorize/issuer_decisions/{decision}/review", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "verdict": "should_have_approved",
    "note": "The cardholder buys from this shop every month."
}).json()
```

### Response 200

```json
{
  "object": "issuer_decision",
  "id": "idec_01M9219RZMGC7XMDM4NT1JEBR9",
  "program_id": "iprg_01M9219RZKCHDRXB2KDQ1QJHV9",
  "kind": "authorization",
  "source": "api",
  "authorization_id": "auth_9Kd3",
  "card": {
    "token": "card_tok_fernhill_3",
    "last4": "4417"
  },
  "amount": 4000,
  "currency": "USD",
  "merchant": {
    "mcc": "7995",
    "id": "mid_lucky_lanes",
    "name": "Lucky Lanes",
    "country": "US",
    "category": "other"
  },
  "agent": {
    "token_requestor": "40010030273",
    "network_program": null,
    "basis": "network_marked",
    "confidence": 1,
    "key": "token_requestor:40010030273",
    "heuristics": [],
    "first_seen": true
  },
  "outcome": "reject",
  "action": "decline",
  "reason": "issuer_rule_declined",
  "rule": {
    "id": "rul_01M9219RZKTFP0P44FMW8JT70G",
    "scope": "program"
  },
  "policy_versions": {
    "program": 1,
    "issuer": 1
  },
  "shadow": null,
  "mode": "live",
  "latency_ms": 0,
  "fail": null,
  "facts": {
    "auth.amount": 4000,
    "auth.currency": "USD",
    "auth.mcc": "7995",
    "auth.merchant_id": "mid_lucky_lanes",
    "auth.merchant_name": "Lucky Lanes",
    "auth.merchant_country": "US",
    "auth.channel": null,
    "auth.three_ds": null,
    "card.token": "card_tok_fernhill_3",
    "card.program": "iprg_01M9219RZKCHDRXB2KDQ1QJHV9",
    "card.country": null,
    "card.last4": "4417",
    "agent.token_requestor": "40010030273",
    "agent.network_program": null,
    "agent.key": "token_requestor:40010030273",
    "agent.basis": "network_marked",
    "agent.confidence": 1,
    "agent.first_seen": true,
    "agent.limit_remaining": null,
    "approval.matched": false,
    "intent.verifiable": null,
    "agent.paused_on_card": false,
    "device.new_for_cardholder": null,
    "network.hosting": null,
    "network.kind": null,
    "network.provider": null
  },
  "limit": null,
  "reservation_id": null,
  "approval": {
    "status": "none",
    "approval_id": null,
    "how": null
  },
  "review": {
    "verdict": "should_have_approved",
    "note": "The cardholder buys from this shop every month.",
    "reviewed_by": "key_01M9219NTNT9ZWWQHAVY7G9W9B",
    "reviewed_at": "2026-12-05T02:42:29.494Z"
  },
  "three_ds": null,
  "network": null,
  "occurred_at": "2026-12-05T02:42:29.492Z",
  "created_at": "2026-12-05T02:42:29.492Z"
}
```

## Pause one agent on a card

`POST /v1/authorize/issuer_agent_pauses`

Pauses one agent on one card: its authorizations decline with reason `agent_paused_on_card` until the pause is lifted. Pausing an agent that is already paused returns the pause (200). The card-wide pause still wins.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | body | string | yes | The card program. |
| `card_token` | body | string | yes | The processor's card token (never the card number). |
| `agent_key` | body | string | yes | The agent's key (`agent.key` on a decision). |
| `reason` | body | string | yes | Why, kept on the pause. |

### Returns

The pause.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_agent_pauses" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_9\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"reason\": \"Reported by the cardholder\"
  }"
```

**Node**

```ts
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 data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_pauses`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_9",
    "agent_key": "token_requestor:40010030273",
    "reason": "Reported by the cardholder"
  }),
})).json();
```

**Python**

```python
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"]
data = httpx.post(f"{api}/v1/authorize/issuer_agent_pauses", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_9",
    "agent_key": "token_requestor:40010030273",
    "reason": "Reported by the cardholder"
}).json()
```

### Response 201

```json
{
  "object": "issuer_agent_pause",
  "id": "ilim_01M8J1WE72B165PK7AKPWV1ZE7",
  "program_id": "iprg_01M8J1WE6XYWYEMATEYABXZEMH",
  "card_token": "card_tok_fernhill_9",
  "agent_key": "token_requestor:40010030273",
  "paused_by": "issuer",
  "reason": "Reported by the cardholder",
  "created_at": "2026-11-28T21:44:50.146Z"
}
```

## Lift a pause on one agent

`DELETE /v1/authorize/issuer_agent_pauses/{id}`

Lifts a pause on one agent: its previous limit on the card is restored, or the pause is removed when it had none. A pause the cardholder set needs a `reason`.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The pause's ID (`ilim_…`). |
| `reason` | query | string | no | Why it is lifted; required when the cardholder paused it. |

### Returns

The pause was lifted.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_agent_pauses" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_10\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"reason\": \"Reported by the cardholder\"
  }" > step.json
export PAUSE=$(jq -r '.id' step.json)
curl -X DELETE "$PROVENANCE_API/v1/authorize/issuer_agent_pauses/$PAUSE" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
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_agent_pauses`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_10",
    "agent_key": "token_requestor:40010030273",
    "reason": "Reported by the cardholder"
  }),
})).json();
const pause = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_pauses/${pause}`, {
  method: "DELETE",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_agent_pauses", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_10",
    "agent_key": "token_requestor:40010030273",
    "reason": "Reported by the cardholder"
}).json()
pause = step2["id"]
data = httpx.delete(f"{api}/v1/authorize/issuer_agent_pauses/{pause}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```

### Response 200

```json
{
  "id": "ilim_01M8J1WE77JF8MNJ4J2Y79PAF0",
  "object": "issuer_agent_pause",
  "deleted": true
}
```

## Send transaction events

`POST /v1/authorize/issuer_programs/{id}/card_events`

Applies transaction events to the reservation ledger, for a processor without an adapter or to replay a history. Each `event_id` applies once (a redelivery is `duplicate`). An authorization decided but never held is placed from the decision (`reconciled`); an unknown one is `unmatched`. Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The program's ID (`iprg_`). |
| `events` | body | array of objects | yes | The events, applied in order. |
| `events.event_id` | body | string | yes | The processor's id for the event. |
| `events.kind` | body | enum | yes | What happened. One of `authorization`, `decline`, `incremental`, `reversal`, `expiry`, `clearing`, `refund`. |
| `events.authorization_id` | body | string | yes | The authorization it belongs to. |
| `events.amount` | body | integer | no | Minor units (the incremental, reversed, cleared or refunded amount). |
| `events.currency` | body | string | no | ISO 4217 currency. |
| `events.occurred_at` | body | timestamp | no | When it happened. |
| `events.final` | body | boolean | no | Clearing only: false when more clearings follow. |

### Returns

What each event did.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_decisions" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"authorization_id\": \"auth_fernhill_33\",
    \"amount\": 12000,
    \"currency\": \"USD\",
    \"card\": {
      \"token\": \"card_tok_fernhill_3\"
    },
    \"token\": {
      \"requestor_id\": \"40010030273\",
      \"requestor_type\": \"AI_AGENT\"
    }
  }" > /dev/null
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_programs/$PROGRAM/card_events" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      {
        "event_id": "evt_fernhill_331",
        "kind": "clearing",
        "authorization_id": "auth_fernhill_33",
        "amount": 11800
      },
      {
        "event_id": "evt_fernhill_332",
        "kind": "refund",
        "authorization_id": "auth_fernhill_33",
        "amount": 1800
      }
    ]
  }'
```

**Node**

```ts
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_decisions`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "authorization_id": "auth_fernhill_33",
    "amount": 12000,
    "currency": "USD",
    "card": {
      "token": "card_tok_fernhill_3"
    },
    "token": {
      "requestor_id": "40010030273",
      "requestor_type": "AI_AGENT"
    }
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs/${program}/card_events`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "events": [
      {
        "event_id": "evt_fernhill_331",
        "kind": "clearing",
        "authorization_id": "auth_fernhill_33",
        "amount": 11800
      },
      {
        "event_id": "evt_fernhill_332",
        "kind": "refund",
        "authorization_id": "auth_fernhill_33",
        "amount": 1800
      }
    ]
  }),
})).json();
```

**Python**

```python
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.post(f"{api}/v1/authorize/issuer_decisions", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "authorization_id": "auth_fernhill_33",
    "amount": 12000,
    "currency": "USD",
    "card": {
        "token": "card_tok_fernhill_3"
    },
    "token": {
        "requestor_id": "40010030273",
        "requestor_type": "AI_AGENT"
    }
}).json()
data = httpx.post(f"{api}/v1/authorize/issuer_programs/{program}/card_events", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "events": [
        {
            "event_id": "evt_fernhill_331",
            "kind": "clearing",
            "authorization_id": "auth_fernhill_33",
            "amount": 11800
        },
        {
            "event_id": "evt_fernhill_332",
            "kind": "refund",
            "authorization_id": "auth_fernhill_33",
            "amount": 1800
        }
    ]
}).json()
```

### Response 200

```json
{
  "object": "issuer_card_event_receipt",
  "received": 2,
  "ignored": 0,
  "events": [
    {
      "event_id": "evt_fernhill_331",
      "kind": "clearing",
      "authorization_id": "auth_fernhill_33",
      "result": "applied",
      "duplicate": false,
      "reservation_id": "ires_01M832WPE00Z5HJ54CM6YQGHW5"
    },
    {
      "event_id": "evt_fernhill_332",
      "kind": "refund",
      "authorization_id": "auth_fernhill_33",
      "result": "applied",
      "duplicate": false,
      "reservation_id": "ires_01M832WPE00Z5HJ54CM6YQGHW5"
    }
  ]
}
```

## Ask the cardholder to approve a cart

`POST /v1/authorize/issuer_approvals`

Asks the cardholder to approve an agent's cart for one card, with the cart approval's page and passkey. The authorization that follows uses it once if its merchant and amount fit. With `decision_id` (a declined decision) the retry matches that merchant, and the page shows the card line from the program's name and that card's last four ("Larkmoor debit ···· 4242"). Pro and above.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | body | string | yes | The program (`iprg_`). |
| `card_token` | body | string | yes | The processor's card token (a card number is refused). |
| `agent_key` | body | string | yes | The agent key (`agent.key`). |
| `cart` | body | object | yes | The cart, as cart approvals take it; its `origin` is the store. |
| `display` | body | object | no | `merchant_name` to show (default: the store's domain). |
| `merchant` | body | object | no | Acquirer merchant `ids` and descriptor patterns (`descriptors`) the store is known by. |
| `decision_id` | body | string | no | The declined decision this answers: its merchant is copied. |
| `expires_in` | body | integer | no | Seconds the cardholder has to answer (60 to 3600). |
| `delivery` | body | object | no | As on cart approvals (default: the link is returned, nothing is sent). |
| `contact` | body | object | no | As on cart approvals. |
| `customer_source` | body | enum | no | As on cart approvals. One of `merchant_account`. |
| `channels` | body | object | no | As on cart approvals. |
| `billing_address` | body | object | no | The cardholder's billing (home) address on file, when you send it: the approval's `approval_context.location_match` says whether the answer matched it. Kept sealed with the approval. |
| `billing_address.line1` | body | string \| null | no | The street line. |
| `billing_address.line2` | body | string \| null | no | The second line (apartment, suite, unit). |
| `billing_address.city` | body | string \| null | no | The city. |
| `billing_address.region` | body | string \| null | no | The state, province or region: a code (`OR`, `US-OR`) or a name (`Oregon`). US states, Canadian provinces and territories and Australian states map to ISO 3166-2; any other region is kept for comparison only and its region fact is absent (`region_unrecognized`). |
| `billing_address.postal_code` | body | string \| null | no | The postal or ZIP code. |
| `billing_address.country` | body | string | yes | ISO 3166-1 alpha-2 (`US`). Required. |
| `billing_address.location` | body | object \| null | no | The address's point, when your store has one. Sealed with the address. With it, the distance facts (`approval.distance_km_billing`, `approval.min_distance_km_billing`) work without a geocoder; without it, the server's geocoder finds the postal code's centre, or the distance facts are absent (`geocoder_not_configured`). |
| `billing_address.location.lat` | body | number | yes | Latitude, in degrees. |
| `billing_address.location.lng` | body | number | yes | Longitude, in degrees. |

### Returns

The approval was asked for.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_approvals" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"card_token\": \"card_tok_fernhill_4\",
    \"agent_key\": \"token_requestor:40010030273\",
    \"cart\": {
      \"order_id\": \"ord_fernhill_41\",
      \"total\": 24900,
      \"currency\": \"USD\",
      \"merchant_id\": \"brightbox\",
      \"origin\": \"https://brightbox.example\",
      \"items\": [
        {
          \"sku\": \"tv-55\",
          \"name\": \"55-inch television\",
          \"quantity\": 1,
          \"unit_amount\": 24900
        }
      ]
    },
    \"display\": {
      \"merchant_name\": \"Brightbox Electronics\"
    }
  }"
```

**Node**

```ts
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 data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_approvals`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
      "order_id": "ord_fernhill_41",
      "total": 24900,
      "currency": "USD",
      "merchant_id": "brightbox",
      "origin": "https://brightbox.example",
      "items": [
        {
          "sku": "tv-55",
          "name": "55-inch television",
          "quantity": 1,
          "unit_amount": 24900
        }
      ]
    },
    "display": {
      "merchant_name": "Brightbox Electronics"
    }
  }),
})).json();
```

**Python**

```python
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"]
data = httpx.post(f"{api}/v1/authorize/issuer_approvals", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_4",
    "agent_key": "token_requestor:40010030273",
    "cart": {
        "order_id": "ord_fernhill_41",
        "total": 24900,
        "currency": "USD",
        "merchant_id": "brightbox",
        "origin": "https://brightbox.example",
        "items": [
            {
                "sku": "tv-55",
                "name": "55-inch television",
                "quantity": 1,
                "unit_amount": 24900
            }
        ]
    },
    "display": {
        "merchant_name": "Brightbox Electronics"
    }
}).json()
```

### Response 201

```json
{
  "object": "issuer_approval",
  "id": "iapr_01M8J1WE85VMWF65XESRGDY2KT",
  "program_id": "iprg_01M8J1WE81HPMKKEJDBCAYD4TQ",
  "card_token": "card_tok_fernhill_4",
  "agent_key": "token_requestor:40010030273",
  "status": "pending",
  "amount": 24900,
  "currency": "USD",
  "merchant": {
    "domain": "brightbox.example",
    "ids": [],
    "descriptors": []
  },
  "tolerance": {
    "percent": 0.1,
    "amount": 0
  },
  "checkout_approval_id": "coap_01M8J1WE848DJ6Q8C70WXCJPFG",
  "decision_id": null,
  "used_by_decision_id": null,
  "decided_at": null,
  "used_at": null,
  "use_by": "2026-11-29T21:44:50.181Z",
  "three_ds": null,
  "delivery": {
    "mode": "provenance",
    "via": "link_only"
  },
  "approval_context": null,
  "created_at": "2026-11-28T21:44:50.181Z",
  "updated_at": "2026-11-28T21:44:50.181Z",
  "approve_url": "http://localhost:5173/approve/c/eW_xJNz2RDtDpiZE0Za91w",
  "status_url": "http://localhost:8080/v1/authorize/checkout_approvals/requests/status?token=eW_xJNz2RDtDpiZE0Za91w",
  "decided_via": null,
  "decided_method": null,
  "person_decision": null,
  "decline_reason": null,
  "decline_note": null
}
```

## Map a store to its merchant ids

`POST /v1/authorize/issuer_merchants`

Maps a store domain to the acquirer merchant ids and descriptor patterns its authorizations carry, so an approval for a cart at that store matches its authorization. Setting the same domain again replaces it (200, same id). Pro and above; Manage policies.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `program_id` | body | string | yes | The program (`iprg_`). |
| `domain` | body | string | yes | The store's domain. |
| `merchant_ids` | body | array of strings | no | Acquirer merchant ids. |
| `descriptors` | body | array of strings | no | Descriptor patterns (`*` any run). |

### Returns

The row was replaced.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
curl -s -X POST "$PROVENANCE_API/v1/authorize/issuer_programs" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }' > step.json
export PROGRAM=$(jq -r '.id' step.json)
curl -X POST "$PROVENANCE_API/v1/authorize/issuer_merchants" \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"program_id\": \"$PROGRAM\",
    \"domain\": \"brightbox.example\",
    \"merchant_ids\": [
      \"174030075991\"
    ],
    \"descriptors\": [
      \"BRIGHTBOX*\"
    ]
  }"
```

**Node**

```ts
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 data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_merchants`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "domain": "brightbox.example",
    "merchant_ids": [
      "174030075991"
    ],
    "descriptors": [
      "BRIGHTBOX*"
    ]
  }),
})).json();
```

**Python**

```python
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"]
data = httpx.post(f"{api}/v1/authorize/issuer_merchants", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "domain": "brightbox.example",
    "merchant_ids": [
        "174030075991"
    ],
    "descriptors": [
        "BRIGHTBOX*"
    ]
}).json()
```

### Response 200

```json
{
  "object": "issuer_merchant",
  "id": "imer_01M834BSZP62SK3MNWR51PJ1M1",
  "program_id": "iprg_01M834BSZNR1EZA2QP7P2902HG",
  "domain": "brightbox.example",
  "merchant_ids": [
    "174030075991"
  ],
  "descriptors": [
    "BRIGHTBOX*"
  ],
  "created_at": "2026-11-23T02:39:34.390Z",
  "updated_at": "2026-11-23T02:39:34.390Z"
}
```
