# Approval signals

The signals a store receives about how a person approved its cart, each with its source, when it is present and its 3-D Secure analogue.

Approval signals are the facts a store receives about how a person approved its cart: the device, the passkey, the person's account and the agent, each shaped like the data a 3-D Secure authentication gives a merchant's fraud tools. Every field is present only when it is known; nothing is guessed.

## When to use it

- Feed the approving device's details to the fraud model you already run for card checkouts.
- Set checkout rules on how the person approved (`approval.*` facts), for example a challenge when the passkey was added in the last day.
- Keep proof of the approving device with the order for a dispute.

## How it works

1. A person approves your [cart approval](https://provenanceauth.com/docs/authorize/guides/ask-your-own-customer.md) with a passkey.
2. The result ([`GET /v1/authorize/checkout_approvals/{id}`](https://provenanceauth.com/docs/api/checkout-approvals.md#get-v1-authorize-checkout-approvals-id)) and the `authorize.checkout_approval.approved` or `.declined` webhook carry `signals`.
3. Your decision record and its signed receipt carry the same signals, with the IP address replaced by `ip_commitment`.

Signals are on every plan. They never appear in the intent token or in the free [`POST /v1/verify`](https://provenanceauth.com/docs/api/verify.md#post-v1-verify), and each store sees a different pseudonym for the same person, with no store names and no counts split by store.

### The device and the passkey

How the person approved (the device, its time zone and language, the network, the passkey and its provider) is the approval's [approval context](https://provenanceauth.com/docs/concepts/approval-context.md), on every plan, on the approval, its webhooks and the assessment that reuses its token. Signals add the rest below.

Sharing the IP address is off by default. When it is on, the approval page tells the person "The store will see your device details, including your IP address." above the buttons, and the address is returned as `approval_context.network.ip`, kept encrypted for 120 days and then deleted; after that, the IP is `null` and `signals.ip_held_by` is `store`.

The ledger and the receipt hold only `ip_commitment`, the SHA-256 of the IP's UTF-8 bytes followed by the 16 nonce bytes in `signals.ip_nonce`. Check the address you received against it with `verifyIpCommitment(ip, ip_nonce, ip_commitment)` from `@provenanceauth/rails/checkout`.

### Prior authentication, account and ships-to

| Field | Source | Present when | 3-D Secure analogue |
| --- | --- | --- | --- |
| `prior_authentication` (`source`, `approved_at`, `method`) | An earlier approval of this exact cart ([ask once](https://provenanceauth.com/docs/authorize/guides/ask-once.md)) | The yes came from an earlier approval | `threeDSRequestorPriorAuthenticationInfo` |
| `account.account` | The person's Provenance account | Always: `people`, or `none` for a passkey without an account | `acctInfo` |
| `account.account_age_days` | The person's account | They have one | `chAccAgeInd` |
| `account.passkey_added_24h` | Their passkeys | Always | `chAccChange` |
| `account.approvals_24h_bucket` | Network events across stores | Your account contributes to the network | `txnActivityDay` |
| `account.approvals_365d_bucket` | The network rollup | Your account contributes; `null` below the minimums | `txnActivityYear` |
| `reported_agent_24h` | The person declined an order as unrecognized in the last 24 hours | Your account contributes | none |
| `ships_to.first_seen` | Your own approvals for this pseudonym and the cart's `fulfillment_digest` | The cart binds a `fulfillment_digest` | `shipAddressUsage` |

Each count is a bucket, from `0` up to `10_plus` (see the reference). Counts never say which stores.

### Passkey

Every approval decided with a passkey reports how that passkey was set up, on every plan, in its approval context: its `passkey` block, and `method.step_up` for a contact code. It is never in the token.

| Field | What it says |
| --- | --- |
| `passkey.status` | `new` when younger than `min_passkey_age` or set up during this approval, else `existing` |
| `passkey.age` | The passkey's age at the approval: whole days and the minutes past them |
| `passkey.created_during_approval` | The passkey was set up on this approval's page |
| `passkey.provider_attested` | Always `false`: the provider is the authenticator's own claim |
| `method.step_up` | `null`, or `{ method: "contact_code", channel, verified_at }` when a new passkey confirmed a code |

A new passkey needs what your store chooses, in your checkout rules, on one approval, or in the middleware:

- **Confirm a code** (`step_up_contact`, the default): the person also types a 6-digit code sent to the customer contact you passed. With no contact, `no_contact` decides.
- **Accept it** (`accept`): the approval counts, and `passkey.status` says `new`.
- **Require an existing passkey** (`require_existing`): the approval is declined with `passkey_too_new`.

A passkey younger than 24 hours is new by default; set `min_passkey_age` to change that, down to 0. Checkout rules can read the passkey facts as `approval.*` facts. See [the five-minute checkout](https://provenanceauth.com/docs/authorize/guides/five-minute-checkout.md#4-choose-what-a-new-passkey-needs).

`step_up_contact` is the default for every store, existing ones included: on the `customer` route, a passkey younger than 24 hours now also confirms a code. To keep the earlier behavior, set `passkeys.new_passkey` to `accept`.

### Agent

| Field | Source | Present when |
| --- | --- | --- |
| `class`, `id`, `verified`, `decision_action` | Identify's verdict from the [assessment](https://provenanceauth.com/docs/authorize/guides/assess-checkouts.md) that opened the approval | An assessment opened it |
| `mandate_depth`, `run_present` | The token's grant and run | Known |
| `decision_latency_ms`, `fast_decision` | From the first view of the page to the decision; `fast_decision` is true under 3,000 ms | The page was viewed |

App details (model, OS and app version, verified by device attestation) appear only when the decision came from the Provenance app with attestation verified on that decision.

## Related

- [3-D Secure for agentic commerce](https://provenanceauth.com/docs/authorize/guides/assess-checkouts.md)
- [Ask your own customer](https://provenanceauth.com/docs/authorize/guides/ask-your-own-customer.md)
- [Network signals](https://provenanceauth.com/docs/authorize/concepts/network-signals.md)
- [Set up agent checkout](https://provenanceauth.com/docs/authorize/guides/five-minute-checkout.md)
