> ## Documentation Index
> Fetch the complete documentation index at: https://tavryn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Review and Authorize Tavryn Procurement Decisions Now

> Learn when human approval is required, how HMAC-signed 1-tap approval links work, and what happens to USDC escrow after you authorize or reject a deal.

Tavryn is built on a principle of deterministic human control: the AI agent negotiates deals, but it cannot approve its own spend. Every transaction that exceeds a configurable threshold — and every vendor switch without exception — generates a cryptographically signed approval request that requires an authenticated supervisor to authorize before a single dollar moves on-chain. The approval system uses HMAC-SHA256-signed single-use links delivered out-of-band, so your supervisor can review and authorize a deal from any device without logging into the Tavryn dashboard.

## When approvals are required

Two conditions trigger a human approval request:

1. **Transaction amount exceeds the `human_approval_required_above` threshold.** The default is \$2,000 per transaction. If the negotiated price on a renewal or any other procurement action exceeds this value, the policy engine blocks autonomous execution and generates an approval link instead.

2. **All vendor switches.** Any time the agent recommends switching from the current vendor to a competitor — regardless of transaction size — a human approval is mandatory. The Switch vs. Renegotiate Matrix always requires explicit human sign-off before any vendor migration can proceed.

> [!NOTE]
>
> The policy engine re-evaluates every approval request at the moment of
> redemption, not just at creation time. If your policy changes between when a
> link was sent and when a supervisor clicks it, the new policy thresholds apply.

## How 1-tap approval links work

When the policy engine determines that human sign-off is required, Tavryn:

1. Generates a unique approval token using **HMAC-SHA256** keyed against a server-side secret
2. Embeds the token in a link pointing to `/approve/[token]`
3. Delivers the link to your configured notification webhook (Slack, Discord, or a custom endpoint)

The signed link has the following security properties:

| Property | Value |
| - | - |
| **Algorithm** | HMAC-SHA256 |
| **Expiry** | 48 hours from generation |
| **Use limit** | Single-use — the token is invalidated immediately after a decision is recorded |
| **Authentication** | A POST request to redeem requires an authenticated session |

> [!WARNING]
>
> A **GET** request to `/approve/[token]` is a **read-only preview** — it displays the deal terms, savings breakdown, and policy check result but does **not** approve or reject anything. The actual approval decision requires an authenticated **POST** request. Never share the link with anyone you do not want to have approval authority over this transaction.

## What the approval page shows

When your supervisor opens `/approve/[token]`, they see a secure review card containing:

> [card] Deal Terms
>
> Vendor name, service, category, the organization requesting approval, and the current "Pending Sign-Off" status.

> [card] Price Comparison
>
> Baseline (original) price, negotiated price, annual savings in dollars, and percentage discount achieved.

> [card] Policy Compliance
>
> Confirmation that the deterministic policy engine has evaluated the deal — including that the amount exceeds the auto-spend ceiling, which is why human approval is required.

> [card] Reviewer Verdict
>
> The adversarial Reviewer Agent's independent audit result: `AGREE`, `CHALLENGE`, or `REJECT`, with rationale.

## Authorizing a deal

To approve, the supervisor clicks **Authorize & Lock Escrow** on the approval page. This action:

1. Sends an authenticated POST to `/api/approve/[token]`
2. Triggers the policy engine to re-verify the deal against current thresholds
3. Calls the Circle Developer-Controlled Wallets SDK to escrow the negotiated amount in USDC into the Arc EVM smart contract
4. Notifies the vendor that payment has been committed
5. Records the approval in the append-only audit log

The supervisor's decision is permanent and immediately recorded on the immutable audit trail. Once USDC is locked in escrow, it is released only after the Fulfillment Verification Engine confirms that the vendor's counter-signed order receipt matches all four required fields: price, seat count, term length, and renewal date.

## Rejecting a deal

To reject, the supervisor clicks **Reject Deal** and is prompted to provide structured feedback:

**Reason codes available:**

| Code | When to use |
| - | - |
| `need_longer_commitment` | Prefer a multi-year commitment for greater savings |
| `vendor_unreliable` | Vendor has SLA or reliability issues |
| `wrong_seat_count` | Seat count in the deal doesn't match current headcount |
| `rate_too_high` | The negotiated price is still above acceptable levels |
| `budget_freeze` | Current budget period is frozen |
| `switch_preferred` | Prefer a competitive alternative over renewal |
| `other` | Free-text guidance for the agent |

The supervisor can also add free-text notes. After clicking **Confirm Rejection & Save Feedback**:

1. The transaction is blocked and the token is invalidated
2. The rejection reason code and notes are saved to your organization's override history
3. Future negotiation prompts for this vendor incorporate the feedback — for example, if `rate_too_high` is the reason, the agent anchors lower in its next opening position
4. The vendor's reputation score is adjusted (decremented) to reflect the failed negotiation

> [!TIP]
>
> Structured rejection feedback is one of the most powerful ways to improve
> Tavryn's future performance. The more specific your reason code and notes,
> the better the agent's next negotiation strategy will be calibrated to your
> organization's actual preferences.

## Approval link security model

```text theme={null}
Generation:   server generates HMAC-SHA256(secret, nonce + contract + expiry timestamp)
Delivery:     link sent out-of-band to supervisor webhook — never stored in browser
Preview:      GET /approve/[token] — validates signature, renders read-only card
Redemption:   POST /approve/[token] — requires authenticated session + valid signature
              → policy re-checked at redemption time
              → token immediately invalidated (single-use)
              → decision committed to append-only audit log
```

The separation between GET (preview) and POST (redeem) means that forwarding the link to a colleague for review does not grant them the ability to approve — only an authenticated, authorized session holder can complete the POST.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.