Authorize · Guide
Assess an agent checkout
Send each agent order to POST / and get one outcome back: approve it, challenge the person, or reject it. One call replaces checking Identify, verifying the token and deciding whether to ask.
Three guides cover agent orders. Pick the one that matches your job:
| You want to | Guide |
|---|---|
Check one intent token or receipt you received, offline against the published keys or with POST / | Verify a token |
| Get one outcome per agent order (approved, challenged or rejected) from your own checkout rules, shaped like a 3-D Secure result | Assess an agent checkout |
Check the cart-bound token and grant a shopping agent presents at your own checkout, with the verifyAgentCheckout helper | Verify agent checkouts |
Before you begin: return a challenge from your checkout as in show the full cart. Each assessment is one Authorize check on your bill.
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x
- Your checkoutsends the cart and what the agent sent
- Provenancechecks coverage, the agent and your rules
- One outcomeapproved, challenged or rejected
The outcomes follow the shape of a 3-D Secure authentication. The comparison helps you map them onto your fraud tooling; an assessment is not an EMV 3DS authentication and carries no card-network rules.
| Outcome | Console shows | What to do | 3-D Secure analogy (transStatus) |
|---|---|---|---|
allow | Allowed | Charge the order and keep the receipt. | Y, frictionless |
challenge | Challenged | Send the person to challenge., or return the challenge to the agent. | C, challenge required |
reject | Rejected | Don't fulfil the order. | R, rejected |
The console and the docs name every outcome with the same four words; the outcome words page maps each API value to its word.
1. Send the order
Pass your own record of the cart (exactly what you'd give checkoutBinding) and whatever the agent sent: its Provenance-Intent value as intent_token, a grant as mandate_token, or the whole request as request so Identify checks the agent too.
curl -s -X POST $PROVENANCE_API/v1/authorize/checkout_assessments \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"cart": { "order_id": "ord_8812", "total": 3800, "currency": "USD", "merchant_id": "harborbean", "origin": "https://harborbean.example",
"items": [{ "sku": "mug-sage", "name": "Stoneware mug", "quantity": 2, "unit_amount": 1900 }] },
"merchant_facts": { "delivery_timeframe": "two_or_more_days", "ship_to": "stored_address" }
}'
const assessment = await prov.authorize.assessments.create({
cart: order,
intentToken: req.get("Provenance-Intent") ?? undefined,
merchantFacts: { deliveryTimeframe: "two_or_more_days", shipTo: "stored_address" },
});
assessment = prov.authorize.assessments.create(
cart=order,
intent_token=request.headers.get("Provenance-Intent"),
merchant_facts={"delivery_timeframe": "two_or_more_days", "ship_to": "stored_address"},
)
With nothing attached and no request for Identify to score, nothing shows a bot or a person and nothing marks the order as agent traffic, so the bot likelihood is unclassified and the default rule rul_default_unclassified_approve approves the order:
{
"object": "checkout_assessment",
"id": "cas_01M6KFSKCXQ8305GKVNT9MJ8RZ",
"outcome": "allow",
"reason": "policy_rule_approved",
"policy": {
"id": "pol_3F9A1C7E52B04D8E6A1F27C9B4",
"version": null,
"rule": {
"id": "rul_default_unclassified_approve",
"name": "Unclassified",
"phase": "assess",
"action": "approve",
"conditions": [
{ "fact": "agent.bot_likelihood", "op": "eq", "value": "unclassified", "actual": "unclassified" },
{ "fact": "checkout.presented", "op": "eq", "value": "none", "actual": "none" },
{ "fact": "agent.signals_present", "op": "eq", "value": false, "actual": false },
{ "fact": "agent.recent_token_presented", "op": "eq", "value": false, "actual": false }
]
}
},
"signature": { "method": "none", "valid": null, "key_id": null, "directory": null, "agent_id": null, "covers": [], "platform": null },
"authority": { "kind": "none" },
"bot": { "likelihood": null, "band": "unclassified", "reason": "not_checked", "signals": [] },
"binding_hash": "8261f1dbade61ff411f617a72f58c3fea66c95bdba5b5d5a5d8c33e53bd158fc",
"covered": "none",
"signals": {
"covered": "none",
"coverage_reason": "no_token",
"confirmed": "none",
"presented": "none",
"agent": { "verified": false, "class": "unknown", "signals_present": false, "signals": [], "recent_token_presented": false }
}
}
When Identify finds medium or high bot evidence or any agent signal on the agent's request, or the same agent sent a token recently (agent traffic), rul_default_no_mandate_or_approval challenges the order instead, and challenge says how the person is asked:
"challenge": {
"channel": "agent_relay",
"sent_to": null,
"status": "pending",
"expires_at": "2026-11-18T09:22:02.000Z",
"approve_url": "https://app.provenanceauth.com/approve/c/Hq2vN8xK4tB7mW3sYd9cFj",
"status_url": "https://api.provenanceauth.com/v1/authorize/checkout_approvals/requests/Hq2vN8xK4tB7mW3sYd9cFj/status"
}
Send the person to challenge.approve_url, or return the challenge to the agent. The two links come on the create response only; your later reads of the assessment say how the person is being asked. To challenge unclassified orders too, add a rule above "Unclassified" (the default rules).
Pass contact (a phone in E.164, an email or both) to send the link to your own signed-in customer instead of the agent. The challenge then names the channel the first message went by and the masked contact:
| Field | Agent relay | Your own customer |
|---|---|---|
channel | agent_ | text, email or app_ |
sent_ | null | The masked contact, such as •••• 4821 |
channels narrows which messages may go and "delivery": "self" keeps the agent relay. The older customer field is refused. A request already pending for the same cart is joined, never asked twice (challenge.reused: true).
When the person decides
The assessment is your one object for the order. Once the person answers, the same assessment is updated in place and your endpoint gets authorize.checkout_assessment.updated (the assessment, with previous_outcome):
| The person | outcome | reason |
|---|---|---|
| Approves | allow | person_ |
| Approves, and one of your after-approval rules holds it | challenge (challenge.) | policy_ |
| Approves, and your review approves | allow | review_ |
| Approves, and an after-approval rule or your review rejects | reject | policy_, store_ or review_ |
| Declines | reject | person_ |
Once the person answers, the assessment says what happened:
approval_contextsays how they decided, and itssubjectnames the cart approval behind it.policyis the after-approval rule when one decided, andupdated_atis when.- A challenge nobody answers keeps its outcome with
challenge.status: "expired", and the event says so too. - The webhook's
approval_context.billingis always null; your own read carries the full address.
Decide an order in review with POST / (review orders).
2. Read the outcome and its reason
reason is one of a fixed set, so you can log and alert on it. Every code is on the reason codes page.
| Outcome | Reasons |
|---|---|
allow | token_, grant_, third_, prior_, policy_ |
challenge | no_, token_, payload_, audience_, grant_, grant_, grant_, grant_, grant_, grant_, grant_, network_, third_, third_, third_, third_, policy_, signal_ |
reject | token_, token_, agent_, policy_, prior_, grant_, grant_, grant_, grant_, grant_, grant_, grant_ |
When one of your rules decides, policy names it (with each condition and the value it compared) and the reason is the rule's. A location comparison shows only there, never as its own field. Why the token didn't cover the cart stays on signals.coverage_reason.
signature says how the agent's request was signed, as Identify checked it, and authority names the token or grant that covered the cart, with cart_match: "matched", or kind: "none" when nothing did. See how the agent signed and what covered it.
When a token or grant covers the cart
A token covers the cart when it verifies as verifyAgentCheckout would: our signature, your origin as its audience, this exact cart, unexpired and not revoked.
A forged or revoked token is always rejected, never challenged. When Identify or the revocation check can't run, the outcome is challenge with signal_unavailable, never an approval without a prompt.
A grant covers the cart when it, and every grant above it, is active, allows your merchant_id or origin and the cart's total, and has budget left; a suspended agent anywhere in the chain stops it. A grant that states a currency covers carts in that currency only.
A grant that limits kinds of store or countries, or blocks some, needs your MCC and country in the cart (merchant: { "mcc": "7011", "country": "620" }); see kinds of merchant and countries. Assessing the same order again is still covered.
When a grant doesn't cover the cart, the limit it went past decides, with its own reason. By default:
- Over the per-purchase limit or a budget: challenged up to 20% over, and rejected past that.
- Outside the merchant list, or under a spent single-use grant: rejected.
- In another currency, or past the purchase count: challenged.
The grant's account can change each one (over the limit). The cart approval then carries mandate and over_limit, and the person's yes is spent from the grant.
An approved cart under a grant spends from it: the cart's total comes off the grant's budget and every budget above it, as a verify would. Each cart spends once: assessing the same order again, or a token your verify call already counted, doesn't spend it twice. A cart your rules challenge spends nothing.
Third-party mandates
An AP2 or ACP mandate from another issuer covers the cart too, on every plan, when it verifies and matches the cart. The assessment then reads covered: "third_party_mandate", and the default row "Within a mandate" approves it. Nothing is spent from a Provenance budget: the mandate's limits are its issuer's.
List the issuers you trust on your agent policy's external_confirmations: ap2_issuers for AP2 wallets and acp_issuers for ACP issuers, each a name and an HTTPS JWKS URL. An issuer you don't list never covers.
A mandate arrives two ways:
| Path | What we check |
|---|---|
The agent's request carries it | An AP2 Checkout or Payment Mandate (SD-JWT) in the body (payment_, checkout_) or the header you set for Identify, against a listed wallet's keys, or your own AP2 verifier through Identify when no listed wallet holds the key. An ACP completion whose provenance_ a listed ACP issuer signed |
| A cart approval an AP2 mandate confirmed | The token that approval minted, or the same exact cart with nothing attached (outside confirmations) |
A Payment Mandate must carry the cart's total, currency and payee (merchant_id). A Checkout Mandate carries no amount: pass the Checkout JWT your store signed as checkout_jwt, and its hash must match. A verdict your middleware reported (traffic_assessment_id) counts when its AP2 object verified with your own verifier and its amount is the cart's.
authority names the issuer and protocol, never a Provenance mandate:
"authority": {
"kind": "third_party_mandate",
"verified": true,
"protocol": "ap2",
"issuer": "Example Wallet",
"mandate_id": "ap2_pm_7f3c2a91",
"verified_by": "issuer_jwks",
"cart_match": "matched",
"evidence_hash": "b41e…07ac"
}
A mandate that doesn't cover the cart leaves it uncovered, and signals.coverage_reason says why:
| Reason | Why |
|---|---|
third_ | Its total, currency, payee or Checkout isn't this cart's |
third_ | It already covered a different cart: a payment mandate covers one cart (the same cart again, a retry, stays covered) |
third_ | You don't list its issuer, and your own AP2 verifier didn't vouch for it |
third_ | It didn't verify: a bad signature, expired, or an open mandate |
signals.presented reads third_party_mandate either way, so "Unclassified" never approves an order whose mandate failed. A Provenance token or grant that covers the cart is checked first and wins. Your rules can read the value on both coverage facts.
3. Charge an approved order
An allowed (allow) assessment carries a signed receipt ({ object, id, claims, token, verify_url }) and its row in your decision ledger (decision_id). Keep both with the order. When the person approves on the challenge, the assessment itself turns frictionless (person_approved), and the agent retrying with the new token gets a new assessment with its receipt.
When one of your Approve rules decided (policy_rule_approved), the receipt says approved_by: "rule" with the rule's matched_rule_id and policy_version. If nothing covered the cart (covered: "none"), no person approved it: no cart approval opens and no token is minted, and the evidence says your rule approved it, never a person.
4. Set your checkout rules
Your rules decide when an order is approved, challenged or rejected. They use the same rule engine, versions and shadow mode as every policy, at PUT /. Rules run top to bottom and the first that matches decides. Each rule approves (require.no_challenge), challenges (require.approval) or rejects (require.deny):
curl -s -X PUT $PROVENANCE_API/v1/authorize/policies \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "gift cards and digital orders to a new address",
"document": { "rules": [
{ "id": "gift-cards", "when": [{ "fact": "merchant.gift_card_amount", "op": "gt", "value": 100 }], "require": { "approval": true } },
{ "id": "digital-new-address", "when": [
{ "fact": "merchant.delivery_timeframe", "op": "eq", "value": "electronic" },
{ "fact": "merchant.ship_to", "op": "eq", "value": "new_address" } ], "require": { "approval": true } },
{ "id": "no-bulk", "when": [{ "fact": "order.amount", "op": "gt", "value": 5000 }], "require": { "deny": true } }
] }
}'
curl -s -X DELETE $PROVENANCE_API/v1/authorize/policies -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
await prov.authorize.policies.set({
rules: [
{ id: "gift-cards", when: [{ fact: "merchant.gift_card_amount", op: "gt", value: 100 }], require: { approval: true } },
{ id: "no-bulk", when: [{ fact: "order.amount", op: "gt", value: 5000 }], require: { deny: true } },
],
}, { note: "gift cards and bulk orders" });
prov.authorize.policies.set({"rules": [
{"id": "gift-cards", "when": [{"fact": "merchant.gift_card_amount", "op": "gt", "value": 100}], "require": {"approval": True}},
{"id": "no-bulk", "when": [{"fact": "order.amount", "op": "gt", "value": 5000}], "require": {"deny": True}},
]}, note="gift cards and bulk orders")
Rules on every fact, merchant.* included, are on every plan, as many as your policy holds. A condition that matches any of several facts, a spend limit and a named list are on Pro and above.
The default rules
Every account starts with seven rules you can see and edit: four at the assessment, and three that run after the customer approves (below):
| Order | Rule id | Runs | When | Then |
|---|---|---|---|---|
| 1 | rul_ | At checkout | checkout. in mandate, third_ | Approve |
| 2 | rul_ | At checkout | agent. eq low | Approve |
| 3 | rul_ | At checkout | agent. eq unclassified, checkout. eq none, agent. eq false and agent. eq false | Approve |
| 4 | rul_ | At checkout | checkout. eq none | Challenge |
| 5 | rul_ | After approval | approval. eq declined | Reject |
| 6 | rul_ | After approval | approval. eq matches_ | Approve |
| 7 | rul_ | After approval | approval. in differs, unavailable | Review |
The default rows have fixed ids, the same in every account, under the reserved prefix rul_default_. Your own rules get ids from Provenance when you save them (rul_ and a ULID): leave id out of a new rule and name it with label (rule ids).
Nothing is rejected before a challenge. An order the person already approved (reused) matches no row and is approved; an agent Identify rejects is rejected before any rule runs.
"Looks like a person" approves an order with no mandate or approval, and asks nobody, when the visitor's bot likelihood is low: both scores under 30 and field timing saw the visitor type or use a pointer (bot facts). A score of 0 because nothing tripped is not enough.
Uncovered orders are approved by default only when nothing marks them as agent traffic, including orders sent with no request or visit.
"Unclassified" approves an order with nothing attached whose visitor nothing shows to be a bot or a person, when nothing marks it as agent traffic and the same agent hasn't sent a token or mandate recently (agent traffic). Everything else reaches the challenge row.
A token or mandate the agent sent that doesn't cover the order (over its cap, paused, expired, another cart), or another issuer's mandate that doesn't, is never approved by it, and dropping the token on the next try doesn't help (agent traffic).
To keep challenging unclassified orders, remove the row or add your own rule above it, such as agent.bot_likelihood eq unclassified → Challenge.
An order a token covers that "Looks like a person" matches is approved, with reason: "policy_rule_approved" naming the row.
Apart from those two rows, these give the same outcomes as having no rules, and they name the rule that decided. A new rule from the console goes just above "Looks like a person" (or "Unclassified", or the challenge row), so it runs before them. DELETE goes back to these rows; to run with no rules at all, save an empty rules list.
Accounts that existed before 2026-11-16 got the rows as new versions, so no outcome changed:
- Your own rules first, in order, and the two checkout rows below them.
- The after-approval rows, below your own rules.
- "Looks like a person", just below
rul_default_covered_by_mandate, then "Unclassified", just below "Looks like a person". - "Within a mandate" widened to third-party mandates, where the row was as the default wrote it.
- "Unclassified" narrowed to orders nothing marks as agent traffic (2026-11-20), where the row was as the default wrote it. The console's notice on that version has Roll back, which writes the row's two earlier conditions back.
A row you edited was left as it is. The version before each stays in your history; restore it (or use Roll back on the console's notice) to remove the rows.
Choose the fallback outcome
When no rule decides, the fallback rows do. They always run last and can't be deleted, but you choose their outcomes with fallback on the document:
| Row | When | Built-in outcome | Takes |
|---|---|---|---|
covered | A token or mandate covers the order | approve | approve, challenge, reject |
uncovered | Nothing covers it | challenge | approve, challenge, reject |
after_ | The customer approved the cart | approve | approve, review, reject |
Send it with the rules in PUT /v1/authorize/policies, such as "fallback": { "uncovered": "reject" } beside rules. An order the fallback decided reads reason: "policy_fallback" (rul_default_fallback_uncovered names the row). A row you leave out keeps its built-in outcome, so a document without fallback decides the same way it always has. The console's Rules page and the rules embed show the rows with their outcomes.
Ordered rules and the never-runs warning
Rules are one list, read top to bottom, and the first rule that decides wins. A rule below one that always decides first never runs: "No mandate or approval, any amount → Challenge" above "No mandate or approval, over 500 → Reject" challenges an order of 600 and never rejects it. When you save rules like that, the response carries a warning and the version is saved anyway:
curl -s -X PUT $PROVENANCE_API/v1/authorize/policies \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "a Reject row under a wider Challenge row",
"document": { "rules": [
{ "id": "unsigned-any", "label": "No mandate or approval, any amount",
"when": [{ "fact": "checkout.covered", "op": "eq", "value": "none" }], "require": { "approval": true } },
{ "id": "unsigned-500", "label": "No mandate or approval, over 500", "when": [
{ "fact": "checkout.covered", "op": "eq", "value": "none" },
{ "fact": "order.amount", "op": "gt", "value": 500 } ], "require": { "deny": true } }
] }
}'
curl -s -X DELETE $PROVENANCE_API/v1/authorize/policies -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
const none = { fact: "checkout.covered", op: "eq", value: "none" };
const saved = await prov.authorize.policies.set({
rules: [
{ id: "unsigned-any", when: [none], require: { approval: true } },
{ id: "unsigned-500", when: [none, { fact: "order.amount", op: "gt", value: 500 }], require: { deny: true } },
],
});
console.log(saved.warnings); // [{ type: "shadowed_by", ruleId: "unsigned-500", shadowedBy: "unsigned-any", … }]
none = {"fact": "checkout.covered", "op": "eq", "value": "none"}
saved = prov.authorize.policies.set({"rules": [
{"id": "unsigned-any", "when": [none], "require": {"approval": True}},
{"id": "unsigned-500", "when": [none, {"fact": "order.amount", "op": "gt", "value": 500}], "require": {"deny": True}},
]})
{
"object": "policy_version",
"domain": "checkout",
"active": true,
"warnings": [
{ "type": "shadowed_by", "rule_id": "rul_01JD6AHD3YCY1F95Q577DXC6FW", "shadowed_by": "rul_01JD49XR8QRH81PSQVA06QTS5H",
"message": "This rule never runs: 'No mandate or approval, any amount' decides first" }
]
}
The check compares conditions on the same fact: equal values, in lists, ne, and numeric bounds (gt 25 is wider than gt 500; lt 25 is wider than lt 7). It never warns on what it can't compare (list facts, request fields, named lists, any-of rules), so it may miss some. The console shows "Never runs" on the rule with Move above.
"Unsigned" is two facts: checkout.covered eq none (no mandate or approval covers the cart, what the default uses) and agent.verified eq false (the agent's signature isn't verified). A signed agent without a mandate still has no person's yes for this cart.
Approve by rule
An Approve rule ("require": { "no_challenge": true }, alone; frictionless is still accepted) approves the orders it matches and stops there. It approves a covered order (a grant's budget is still spent once) and an order nothing covers, with no setting to turn on. A rule on order.amount alone approves every order under that amount, signed or not, so add checkout.covered eq none (or agent.verified) when you mean only some of them.
Three checks always come first and an Approve rule never overrides them: a forged or revoked token, an agent Identify rejects, and a cart the person already declined. When Identify can't run, an uncovered order is challenged (signal_unavailable), never approved by a rule.
Rules are a plain ordered list, so a threshold ladder is ordinary rules with the higher threshold first. Here orders with nothing attached are rejected over 500, approved under 25 and challenged in between (keep the default challenge row below them):
curl -s -X PUT $PROVENANCE_API/v1/authorize/policies \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{
"note": "small orders through, big ones rejected",
"document": { "rules": [
{ "id": "unsigned-500", "label": "No mandate or approval, over $500", "when": [
{ "fact": "checkout.covered", "op": "eq", "value": "none" },
{ "fact": "order.amount", "op": "gt", "value": 500 } ], "require": { "deny": true } },
{ "id": "unsigned-under-25", "label": "No mandate or approval, under $25", "when": [
{ "fact": "checkout.covered", "op": "eq", "value": "none" },
{ "fact": "order.amount", "op": "lt", "value": 25 } ], "require": { "no_challenge": true } }
] }
}'
curl -s -X DELETE $PROVENANCE_API/v1/authorize/policies -H "Authorization: Bearer $PROVENANCE_KEY" > /dev/null
await prov.authorize.policies.set({
rules: [
{ id: "unsigned-500", when: [{ fact: "checkout.covered", op: "eq", value: "none" }, { fact: "order.amount", op: "gt", value: 500 }], require: { deny: true } },
{ id: "unsigned-under-25", when: [{ fact: "checkout.covered", op: "eq", value: "none" }, { fact: "order.amount", op: "lt", value: 25 }], require: { no_challenge: true } },
],
}, { note: "small orders through, big ones rejected" });
prov.authorize.policies.set({"rules": [
{"id": "unsigned-500", "when": [{"fact": "checkout.covered", "op": "eq", "value": "none"}, {"fact": "order.amount", "op": "gt", "value": 500}], "require": {"deny": True}},
{"id": "unsigned-under-25", "when": [{"fact": "checkout.covered", "op": "eq", "value": "none"}, {"fact": "order.amount", "op": "lt", "value": 25}], "require": {"no_challenge": True}},
]}, note="small orders through, big ones rejected")
Put a Challenge row for all unsigned orders above the Reject row and the Reject row never runs: the first match decides, and the save warns you (shadowed_by). Approve is on every plan. The console's Checkout page shows these as "Approved · by rule" and counts how many orders your rule let through with nothing attached.
The facts a rule reads:
| Fact | What it is |
|---|---|
checkout. | token, mandate, reused or none |
checkout. | approval, grant or none (a rule alone allowed the token) |
checkout. | What the agent sent with the cart, whether or not it covers it: mandate, token or none |
checkout. | Seconds since the token was minted |
order., order., order., order. | The cart, in major units |
agent., agent., agent., agent. | What Identify says about the agent |
agent., agent. | The agent platform Identify named for the checkout (openai, anthropic, …) and how: signed through its signing directory, or declared by a known crawler's user agent (which platform sent it) |
agent., agent., agent., agent., agent., agent., agent. | How likely the visitor is automated (bot facts) |
agent., agent. | How far the agent is from the person's grant, and whether it's part of a run |
merchant. | The facts you attest (below), labelled source: "merchant" |
billing., billing. | Your customer's billing country and ISO 3166-2 region, when you send billing_ (below) |
card., card., card. | The card the customer pays with, when you send payment_ (card. is YYYY-MM, from exp_ and exp_). The expiry is never shown on the challenge or kept on the approval |
approval. and the other approval. location facts | Where the person approved from, compared with the billing address, when the agent comes back with that approval's token (below) |
network. | Network signals about a verified agent, when you contribute |
network., network., network. and the other network facts, device., device., device. | Where the visitor connected from and the device it described (network and device) |
Network and device
Rules can read the network and device Identify recorded for the visitor, with the same names and values as traffic rules. They come from the agent's request, the verdict you name with traffic_assessment_id, or else the visit you name with visit_id, in that order. Every plan.
They are read only when a rule names one, and the values a decision read are kept with the assessment, so a backtest replays them. With no request, verdict or visit, or a decision recorded before Identify kept these facts, they are unavailable: a condition with no if_unavailable setting doesn't match.
Bot facts
Rules can read how likely the visitor is automated, built from what was observed. You set the cut; there is no "known bad bot" label. Every plan.
| Fact | What it is |
|---|---|
agent. | Identify's score (0 to 100) for the agent's request, or for the visit when you send only visit_ |
agent. | Field timing's score (0 to 100) for the visit: how machine-like the checkout form was filled in |
agent. | medium (30 to 69) or high (70 and over) from the higher of the two; low only when both are under 30 and field timing saw a person (agent. or agent.); otherwise unclassified: nothing shows a bot or a person |
agent. | The higher of the two scores, the number the band is cut from, so a rule can set its own cut (agent. lt 20). Absent when nothing scored the visitor |
agent., agent. | Identify saw a headless browser, or an address in a cloud provider's published ranges |
agent., agent. | Field timing: a field was typed (not every value pasted), a pointer moved or touched |
Send visit_id, the storefront check's id for the visit the cart came from (tas_…, at most 24 hours old), to bring in its field timing. Field timing runs only when you turn it on and the visitor allows analytics; it reads no field value or key. Without it the timing facts are absent and never match.
The assessment returns the bot block, with the bot likelihood always present as its band and the named signals that are true. See how likely it's a bot.
When band is unclassified, reason says why: not_checked (no request, verdict or visit), no_field_timing (the scores are under 30 and no field timing ran) or no_person_signal (field timing saw no typing and no pointer). GET /v1/identify/decisions/{id} returns a visit's bot block the same way.
Your rules decide what each value gets; the default rows approve low and unclassified and challenge medium and high when nothing covers the order. The raw timing (gaps between keys, time to fill) is never returned or kept on the assessment; rules can read it as agent.typing_interval_ms and agent.checkout_fill_seconds, and when one decides its condition shows actual: null with unavailable: "withheld".
Agent traffic
Two facts say whether anything marks the order as agent traffic. Every plan. The default rule "Unclassified" approves only when both are false.
| Fact | What it is |
|---|---|
agent. | Identify saw an agent on the agent's request or the visit you named: a verified signature, a request that names itself or an agent Identify named, a spoofed crawler or a bot score of 50 and over, a named agent platform, a signature that didn't verify, a headless browser, a hosting address, or an AP2, ACP or x402 object. A store order is marked when its sales channel or its visit's class says agent, or its field timing scores 30 or more |
agent. | The same agent (its ID or signature key) or the same visit sent an intent token or a mandate to your account inside your downgrade window, 24 hours by default |
The assessment returns them in signals.agent, with signals naming what marked it, such as signed_agent or hosting_ip. Inconsistent headers and a busy address feed the bot score but don't mark an order by themselves.
"The same agent" uses only what Provenance already keeps: the agent ID Identify or the token named, the signature's key, and the visit ID. Nothing new is fingerprinted. An agent that dropped its token and sends neither a signature nor the visit can't be matched; send request or visit_id with every cart so it can.
On Pro and above, set the window at PUT /v1/account/policies/settings (checkout_token_downgrade_window, one hour to seven days) or in the console under Rules › Orders. When the check can't run, agent.recent_token_presented is absent and "Unclassified" doesn't approve.
Card network agents and shared payment tokens
Send how the agent is paying in payment, and Identify's verdict on its request in request. Every plan; reading your own Stripe adds no meter.
"payment": { "shared_payment_token": "spt_1RefSample0000000001", "credential_type": "agentic_token", "payment_intent": "pi_3RefSample01" }
shared_payment_tokenis the Stripe shared payment token the agent gave you. With a Stripe connection whose key can read shared payment tokens, we read it on your account and keep the agent's Stripe profile, its usage limit and Stripe's five risk scores. We never resolve a token or handle a card number; the token is kept hashed.credential_typeis what your own token resolve returned:agentic_token(a card network agent token),dpanorfpan.payment_intentis a PaymentIntent you already created: its latest charge says whether a network token paid.
Without the permission, or when Stripe doesn't answer in 5 seconds, the facts stay as reported and payment_signals.unchecked_reason says why. The assessment never waits longer or fails for it.
A token (checked or not), an agent token, or a verified card network signature on the request or the visit makes the order an agent order: signals.agent.order_signals names why, and the default rows ask. A network token alone doesn't, since wallets use them too.
| Fact | What it is |
|---|---|
agent. | The card network agent program a verified signature's tag names (visa_, mastercard_; a card issuer's rules also see visa_) |
agent. | What the verified agent signed for: browse, pay or general |
agent. | The name on the verified agent's Signature Agent card |
agent. | How the agent is run (direct, intermediary), when your edge passes it |
agent. | The card network sent the buyer's details with the verified signature's nonce |
agent. | Why it's an agent order: channel, visit, network_, shared_, agentic_ |
payment. | Paid with a shared payment token, checked on your Stripe (present only when checked) |
payment. | Paid with a shared payment token, as your server reported it |
payment. | Paid with a card network agent token, as reported |
payment. | The charge used a network token (read from Stripe) |
payment. | The agent's Stripe profile |
payment., ., ., ., . | Stripe's risk scores for the token |
The rule Orders from AI agents keeps asking these orders. Its card on Authorize › Stores has two switches, both off: let card network signed agents through, and let shared payment token orders through. Each writes an ordinary condition, so the version history and the backtest show it. The templates "Let card network agents through" and "Let shared payment token orders through" do the same for rules you edited.
Where money is at stake, a token counts only when it was checked: the Approval Guarantee leaves an unchecked token order out, and automatic chargeback responses never cite one.
A rule that rejects can't match on behaviour signals alone: the automation score, the bot likelihood, the typing and pointer facts and the raw timing. Add a condition that must hold too, like an amount or agent.headless, or challenge instead. The save refuses it with behaviour_only_reject.
{
"id": "fast-and-big",
"label": "Filled in by a machine, over $500",
"when": [{ "fact": "agent.automation_score", "op": "gte", "value": 80 }, { "fact": "order.amount", "op": "gt", "value": 500 }],
"require": { "deny": true }
}
Rules after the customer approves
A rule with "phase": "after_approval" runs once, when the customer decides a cart approval and before the token is minted, over the assessment's facts and what the decision added: approval.decision (approved or declined), the location facts below and the approval signals. The first rule that matches decides:
| Action | Requirement | The cart approval |
|---|---|---|
| Approve (or no rule matches) | require. | approved, token minted |
| Review | require. | in_: the token is held until you decide (review orders) |
| Reject | require. | declined, decline_; person_ keeps the customer's yes |
{
"id": "big-orders-review",
"label": "Over $500, check first",
"phase": "after_approval",
"when": [{ "fact": "order.amount", "op": "gt", "value": 500 }],
"require": { "review": true }
}
An after-approval rule never challenges, since the customer was just asked, and Review runs only after approval. A customer's no always ends the approval as declined: no rule can approve or review a decline, and the default row named for it rejects. Rules in different phases never shadow each other. The errors table below names the refusals. POST / takes "phase": "after_approval" and answers the status the cart approval would get.
After-approval rules run on every plan, and so do the default rows 3 to 5. Setting how long a review waits, and what happens when nobody decides it, is on Pro and above; on Free a review waits 24 hours and then rejects. If the rules can't be read when the customer approves, the order waits in review (review.reason: "rules_unavailable"), never approved.
5. Attest your own facts
merchant_facts are facts only you know about the order, the analogue of 3-D Secure's merchant risk indicator. They feed your rules and are stored with the assessment, labelled as yours. Unknown keys are refused.
| Field | Values |
|---|---|
delivery_ | electronic, same_, overnight, two_ |
gift_, gift_ | A count, and their total in minor units |
preorder, reorder | true or false |
ship_ | billing_, stored_, new_, pickup, digital |
customer_ | How old your customer's account is |
Your customer's billing address
Pass billing_address with the assessment when you hold one for your customer. country (ISO 3166-1 alpha-2) is required; every other part is optional, at most 200 characters each.
"billing_address": { "line1": "18 Harrow Lane", "line2": null, "city": "Portland",
"region": "OR", "postal_code": "97205", "country": "US" }
Your rules read two facts from it, on every plan:
| Fact | Value |
|---|---|
billing. | The country, upper case (US) |
billing. | The region as ISO 3166-2 (OR, Oregon and US-OR all read US-OR), for US states, Canadian provinces and territories and Australian states |
Any other region has no region fact, and the assessment says why in signals.billing.unavailable (region_unrecognized).
The assessment keeps the coarse fields (signals.billing: the country, the region and the postal prefix). A challenge passes the address to its cart approval, which keeps it in full, encrypted. Once the person decides, your reads of the assessment (and of the one the agent's token comes back to) return it as approval_context.billing, on every plan; webhooks carry the coarse fields. The address never enters the token or the cart's binding, so correcting it never voids an approval.
Where the person approved from
When the person decides a cart approval, we note where they approved from, on every plan: the time zone their browser reports, and the network's country and region from the IP lookup. The city is read only where the server's network city switch is on; it ships off. Your read of the approval and the decision webhooks return these raw values as location, each with its source, or the reason it's missing, such as network_vpn or ip_intel_not_configured.
"location": {
"device": { "timezone": "America/Los_Angeles", "utc_offset_minutes": -480, "source": "browser" },
"network": { "country": "US", "region": "US-WA", "accuracy_radius_km": 20, "source": "ip_intel" },
"unavailable": { "city": "city_not_enabled" }
}
One summary is on the record, the same value the approval.location fact below reads. Your read of the approval, its webhooks, GET /, the paid verification and the checkout result embed carry it on the approval context, and the console shows it as "Billing address" under Time zone:
| Field | Value |
|---|---|
location_ | matches_, differs, unavailable (the reason is in unavailable.) or no_ |
location_ | The inputs that agreed or disagreed: network_, network_, time_, time_ |
"approval_context": {
"network": { "country": "US", "region": "US-WA", ... },
"location_match": "matches_billing",
"location_match_basis": ["network_region", "time_zone"]
}
The rest of the comparison is for your rules. These facts (the distance and each per-field match) are never returned by a read, a webhook or an embed:
| Fact | Value |
|---|---|
approval. | matches_ (the network region or, with the city switch on, the city matches, no network region differs and approval. is not true; the time zone the browser reports never matches on its own), differs (a known comparison differs, or approval. is true), unavailable (a billing address was sent but no network comparison matched or differed, including a time-zone match alone), no_ |
approval. | The device's UTC offset now equals the billing address's |
approval., approval. | The network's country or ISO 3166-2 region equals the billing address's |
approval. | City switch on only: the city names agree, or the network's point is within its accuracy radius plus 25 km of the billing point |
approval., approval. | The distance from the network's point to the billing point, in km; the minimum takes off both points' uncertainty |
approval. | The device's own time zone |
Each value is as reported: the time zone is what the browser says, the network's place is a provider's estimate, and the address is what you sent. A fact that can't be known is missing, and a rule that needs it doesn't match, so your next rule decides.
A billing region that spans time zones (Oregon, Indiana, Florida) leaves the zone fact missing unless the geocoder gives the address's zone. The distance facts need a billing point: pass billing_address.location ({ "lat": 45.52, "lng": -122.68 }), or let the server's geocoder find the postal code's centre.
These facts reach your after-approval rules at the decision, and any assessment when the agent comes back with that approval's token. Rules on approval.* facts and the facts themselves are on every plan.
6. Try a rule before you enforce it
Test rules against facts with POST /, then run a saved version beside your active one with POST /. Each assessment then carries shadow (what the version would have done), and GET / counts where it would have differed. A shadow never changes an outcome.
The checkout shadow report also has a backtest's parts: rates (each outcome's share and order value, live and shadow), labels (the four labelled results as labels arrive) and the first page of changes, the orders the shadow would have decided differently, each named by your order ID. GET / pages all of them.
Drafts, plain-English review, a 30-day backtest and trial runs work here too, at the same subpaths under /v1/authorize/policies; see build a policy and the store's fields in the field catalog. A backtest's outcome rates and changed orders cover its days; its labelled results read the last 120 days of orders (labels_window), so an order past the 60-day maturity counts as clean or disputed.
7. See how each rule performs
GET / returns, for a window of days (the last 30 by default, from and to as UTC days), the orders each rule decided, their order value and the share of each outcome, then four results from your own labels:
| Result | An order counts when |
|---|---|
true_ (true positive declines) | A rule stopped it (challenge or reject) and a label says it was bad |
false_ (false positive declines) | A rule stopped it and a label says it was good |
missed | Your rules allowed it and a label says it was bad: a chargeback, a fraud report, repeat refunds, a store rejection |
allowed | Your rules allowed it and no dispute or flag came within 60 days, or a label says it was good |
unlabelled | Anything else (No label yet) |
Labels come from the outcomes you report on an order (POST /v1/authorize/checkout_assessments/{id}/outcome), chargebacks, your network fraud reports and the customer's or a reviewer's answer to a challenge. A rejected order can't be disputed, so it counts as right or wrong only when a label says so; otherwise it stays under unlabelled. Under 20 labelled orders in the window, enough_labels is false.
Rules come in the live version's order, then fallback for orders no rule decided; version reads one version's decisions. Counts cover every currency, and values are summed in currency (the one with the most orders, or the one you pass). The numbers are kept per day and catch up overnight as labels arrive; a reported outcome updates its day at once. Checkout rules have this today; other policies answer 400 policy_feature_unsupported.
Errors you might see
| Symptom | Cause | Fix |
|---|---|---|
parameter_ (400) on merchant_ | An unknown key or value | Send only the fields above. |
parameter_ (400) on billing_ | Not an ISO 3166-1 alpha-2 code | Send the two-letter code, like US. |
parameter_ (400) on traffic_ | The verdict is more than 5 minutes old, or you sent request too | Pass the agent's request instead. |
cart_ (400) | The cart's lines don't add up to its total | Send your real record of the order. |
plan_ (402) on a rules update | A rule reads merchant. facts on Free | Upgrade, or remove the rule. |
policy_ (400) on a rules update | A rule requires something other than no_ (or frictionless), approval, deny or, after approval, review, or more than one of them | Use one, alone. |
review_ (400) | A Review rule without "phase": "after_ | Add the phase, or pick Approve, Challenge or Reject. |
challenge_ (400) | An after-approval rule asks for a challenge | Pick Approve, Review or Reject. |
approve_ (400) | An Approve or Review rule reads approval. as declined | Use Reject for declines. |
behaviour_ (400) | A Reject rule can match on behaviour signals alone | Add another condition, or challenge or review instead. |
resource_ (404) on visit_ | No visit with that id on your account | Send the storefront check's id for this visitor. |
parameter_ (400) on visit_ | The visit is more than 24 hours old | Leave it out. |
See also
- Verify agent checkouts
- Ask your own customer
- Review orders
- Ask once
- Chargeback evidence
- Rule suggestions: checkout rule drafts from your own orders
- Reason codes