# Require confirmation for sensitive actions

- Check 40.14 · AI agent compatibility · Experimental
- Source: https://checklist-seo-geo.com/en/ai-agent-compatibility/require-confirmation-sensitive-actions
- Have a human confirm payments, cancellations and deletions started by an AI agent: summary, confirmation token, two-step validation and MCP tools.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/ai-agent-compatibility/require-confirmation-sensitive-actions.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

A sensitive action is one that is hard to undo or that commits the user: paying, ordering, booking, canceling, deleting, changing an email address or a payment method, sending a message, sharing data. When an AI agent acts for someone, these actions must go through explicit confirmation by the human, based on an exact summary of what is about to happen. Once this check is done, every sensitive action on your site, your API or your MCP (Model Context Protocol) server takes place in two stages, preparation then confirmation, and the server rejects a confirmation that does not exactly match what was presented.

## Why it matters

An agent can make an honest mistake (wrong slot, wrong quantity, wrong product out of two variants) or be manipulated by an instruction hidden in a page or document it has read. In both cases, the last line of defense is a human who sees the summary and says yes.

Industry players are converging on this principle. The MCP specification recommends that a human be able to deny a tool call and that applications ask for confirmation for sensitive operations. OpenAI's documentation for apps in ChatGPT asks developers to declare tools that delete or overwrite data as destructive, so that the host requests explicit approval, while pointing out that these hints do not exempt the server from its own checks. OWASP, in its ranking of risks for applications built on large language models, lists human approval of high-risk actions among the countermeasures to prompt injection.

Confirmation cannot rely on the agent alone: the agent preparing the action can also click “Confirm”. What protects is an accurate summary, a server-side verified link between what was shown and what is executed and, for the most serious actions, a confirmation that only the user can give: strong customer authentication for the payment, a code sent by text message, re-entering the password.

The law already requires part of this setup. In Europe, Directive 2011/83/EU (transposed in France as Article L221-14 of the French Consumer Code) requires the button that places an order to clearly state the obligation to pay, for example “order with obligation to pay”. The Payment Services Directive (PSD2) requires strong customer authentication for most online card payments in the European Economic Area.

## What it improves

- **Fewer mistaken orders, bookings and deletions** when an agent acts for a customer.
- **Resistance to manipulation**: a malicious instruction read by the agent is not enough to trigger a payment or a deletion.
- **Fewer disputes and chargebacks**: the customer approved a timestamped summary.
- **Trust**: agent platforms and users favor services that do not trigger irreversible actions by surprise. A plausible effect, not measured.
- **Compliance**: explicit order button, strong authentication for payments.
- **Rankings**: no effect.

## How to check

List the sensitive actions on your site and test each one:

| Check | Compliant |
|---|---|
| A summary comes before the action: item, quantity, date, final price including all taxes and fees, cancellation terms | yes, on a dedicated page or screen |
| The final button says what it does and what it costs | “Pay €89.00”, “Order with obligation to pay”, “Permanently delete account” |
| Changing the cart or the parameters after the summary voids the confirmation | the server refuses and shows a new summary |
| A double click or a repeated request does not create two orders | a single order |
| The most serious actions require proof that only the user can provide | 3-D Secure, code by text message, re-entering the password |
| A confirmation email is sent, with a way to cancel if the law or your terms provide for it | yes |

For an API, prepare an action, change the state, then confirm:

```bash
API=https://api.example.com/v1

# 1. Prepare the cancellation: returns an intent ID and a summary
curl -s -X POST -H "Authorization: Bearer $TOKEN" $API/interventions/918/annulations

# 2. Change the job (time, fees) from the interface, then confirm
curl -s -o /dev/null -w "%{http_code}\n" -X PUT -H "Authorization: Bearer $TOKEN" $API/intentions/int_7c41e2

# 3. Replay the same confirmation a second time
curl -s -o /dev/null -w "%{http_code}\n" -X PUT -H "Authorization: Bearer $TOKEN" $API/intentions/int_7c41e2
```

Compliant result: `409` at step 2, because the conditions have changed since the summary, and `409` at step 3, because a confirmation can only be used once. A `200` means the server is executing something other than what was shown.

Finally, run the test with a browsing agent: ask it to buy a low-priced product in a test environment, and watch whether it stops to ask for confirmation and what your summary contains at that point. The method is in [test user journeys with browsing agents](https://checklist-seo-geo.com/en/ai-agent-compatibility/test-user-journeys-browsing-agents).

## How to implement

### Before you start

Rank your actions by risk level:

| Level | Examples | Minimum mechanism |
|---|---|---|
| Low, reversible | add to cart, save a draft, subscribe to a newsletter | none, or simple undo |
| Medium | order without immediate payment, booking with free cancellation, rescheduling an appointment | summary and explicit button, confirmation email |
| High | payment, non-refundable booking, cancellation with fees, sending a message to a third party | summary, confirmation token bound to the parameters, strong authentication for payment |
| Critical | account deletion, change of email, password or payment method, export of personal data, adding an access | re-authentication or a code sent outside the journey, grace period, notification on the old channel |

Then apply the same principle everywhere: **prepare, show, confirm**.

1. **Prepare**: the server computes everything (final price, fees, availability, consequences) and records an action intent with an ID, the user, a fingerprint of the parameters and a short expiry (ten minutes, for example).
2. **Show**: the summary displays exactly what the intent contains. For an agent, also return it as structured text.
3. **Confirm**: the confirmation request carries only the intent ID. The server checks that it belongs to the user, has not expired, has not already been used and that the state has not changed (price, stock), then executes.

Summary page template, readable by a human as well as by an agent:

```html
<section aria-labelledby="recap-titre">
  <h1 id="recap-titre">Review your booking</h1>
  <dl>
    <dt>Service</dt><dd>Gas boiler servicing</dd>
    <dt>Date</dt><dd>Thursday, December 3, 2026, 9:00 to 10:00 a.m.</dd>
    <dt>Address</dt><dd>12 rue des Lilas, 44000 Nantes</dd>
    <dt>Total price incl. VAT</dt><dd>€89.00, travel included</dd>
    <dt>Cancellation</dt><dd>free until December 2 at 9:00 a.m., then a €30.00 fee</dd>
  </dl>
  <form method="post" action="/reservations/confirmer">
    <input type="hidden" name="intention" value="int_7c41e2">
    <button type="submit">Book with obligation to pay: €89.00</button>
  </form>
  <a href="/reservations/modifier?intention=int_7c41e2">Change the booking</a>
</section>
```

Avoid pre-ticked boxes, amounts that change between the summary and the payment, and buttons with vague labels (“Continue”, “OK”). Button labels are covered in [identify what each button does](https://checklist-seo-geo.com/en/ai-agent-compatibility/identify-what-each-button-does).

> **Warning:** a confirmation the agent can give on its own is just one more step. For the high and critical levels, the final “yes” must come from something only the user holds: strong authentication from their bank, a code received on their phone, a re-entered password, or approval in the assistant's interface when the assistant provides it.

### Laravel

Versions: Laravel 12 and 13.

An action intent stored in the database, then a single-use confirmation:

```php
// app/Http/Controllers/AnnulationsController.php
use App\Models\Intervention;
use App\Models\IntentionAction;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Str;

public function store(Request $request, Intervention $intervention): JsonResponse
{
    Gate::authorize('update', $intervention);

    $frais = $intervention->fraisAnnulation();

    $intention = IntentionAction::create([
        'id' => 'int_'.Str::random(24),
        'user_id' => $request->user()->id,
        'action' => 'annuler_intervention',
        'empreinte' => hash('sha256', "{$intervention->id}|{$frais}"),
        'parametres' => ['intervention_id' => $intervention->id, 'frais' => $frais],
        'expire_le' => now()->addMinutes(10),
    ]);

    return response()->json([
        'intention' => $intention->id,
        'recapitulatif' => "Cancellation of the job on {$intervention->debut->format('d/m/Y H:i')}. Fee: €{$frais}.",
        'expire_le' => $intention->expire_le->toIso8601String(),
    ], 201);
}

public function update(Request $request, IntentionAction $intention): JsonResponse
{
    abort_if($intention->user_id !== $request->user()->id, 404);
    abort_if($intention->utilisee_le !== null, 409, 'Confirmation already used.');
    abort_if($intention->expire_le->isPast(), 410, 'Confirmation expired, prepare a new cancellation.');

    $intervention = Intervention::findOrFail($intention->parametres['intervention_id']);
    $empreinteActuelle = hash('sha256', "{$intervention->id}|{$intervention->fraisAnnulation()}");

    abort_if($empreinteActuelle !== $intention->empreinte, 409, 'The conditions have changed, review the new summary.');

    DB::transaction(function () use ($intention, $intervention): void {
        $intention->update(['utilisee_le' => now()]);
        $intervention->annuler();
    });

    return response()->json(['statut' => 'annulee']);
}
```

Matching routes, in `routes/api.php`:

```php
Route::middleware(['auth:api', 'throttle:api'])->group(function () {
    Route::post('/interventions/{intervention}/annulations', [AnnulationsController::class, 'store']);
    Route::put('/intentions/{intention}', [AnnulationsController::class, 'update']);
});
```

For critical actions in the web interface, add the built-in `password.confirm` middleware, which asks for the password again if the last confirmation is more than three hours old by default (`auth.password_timeout`):

```php
Route::delete('/compte', [ComptesController::class, 'destroy'])
    ->middleware(['auth', 'password.confirm']);
```

For a Laravel MCP server, separate preparation (a tool marked `#[IsReadOnly]`) from execution (a tool marked `#[IsDestructive]`), and make the execution tool require the intent ID: the host can then ask for the user's approval before the destructive call, and your server keeps the verification.

### Next.js

Versions: Next.js 15 and 16 (App Router).

The same logic in two server actions: `preparerCommande` computes the summary and records the intent, `confirmerCommande` receives only its ID:

```ts
'use server';

import { auth } from '@/lib/auth';
import { db } from '@/lib/db';

export async function confirmerCommande(intentionId: string) {
  const session = await auth();

  if (!session) {
    throw new Error('Authentication required');
  }

  const intention = await db.intention.findUnique({ where: { id: intentionId } });

  if (!intention || intention.userId !== session.user.id) {
    throw new Error('Confirmation not found');
  }

  if (intention.utiliseeLe || intention.expireLe < new Date()) {
    throw new Error('Confirmation expired or already used, prepare a new order');
  }

  await db.$transaction([
    db.intention.update({ where: { id: intentionId }, data: { utiliseeLe: new Date() } }),
    db.commande.create({ data: { ...intention.parametres, userId: session.user.id } }),
  ]);
}
```

Recalculate price and stock in `confirmerCommande` and refuse if the fingerprint has changed, as in the Laravel example.

### WordPress

Versions: WordPress 6.4 and later, WooCommerce 9 and 10.

WooCommerce already displays a checkout page with a summary. Check three points:

- **The button label**: it must state the obligation to pay. If your theme or your payment plugin shows vague text, change it with the dedicated filter, in a site plugin or in a child theme's `functions.php`:

```php
add_filter( 'woocommerce_order_button_text', function () {
    return 'Order with obligation to pay';
} );
```

- **Fees**: shipping, taxes and surcharges must appear before the button, not after.
- **Account actions**: changing the email or password and deleting the account must ask for the current password or an email confirmation. For an email change from the profile, WordPress sends a confirmation link to the new address before applying the change.

### Shopify

Versions: Shopify stores, November 2026.

Shopify's checkout handles the summary, the payment button and strong card authentication: do not add a step. Your checkpoints: shipping costs and taxes must be known early in the journey, the booking or subscription apps you install must display a summary before commitment, and order cancellations triggered from the admin remain restricted to staff accounts with the appropriate permissions.

## Common mistakes

- **A confirmation the agent approves on its own** for a payment or an account deletion.
- **An incomplete summary**: fees added at the next step, cancellation terms missing.
- **Confirming parameters sent by the client** instead of the intent recorded on the server: the agent or an attacker changes the amount between the two requests.
- **Reusable confirmation tokens, or tokens with no expiry**.
- **No idempotency**: an agent that does not receive the response retries and creates two orders.
- **Relying on MCP tool annotations** as the only protection: they are hints for the host.
- **Confirming everything, including trivial actions**: the user gets used to approving without reading. Keep confirmation for the actions that warrant it.

## Frequently asked questions

### Which actions must be confirmed when an AI agent acts for a customer?

Actions that commit the user or are hard to undo must be confirmed: payment, order, non-refundable booking, cancellation with fees, deletion of data or of an account, change of email address, password or payment method, sending a message to a third party and sharing personal data. Reversible actions, such as adding to the cart, can do without it so as not to wear the user out.

### Can an AI agent click the confirmation button itself?

Technically yes, a browsing agent can click any button. That is why confirmation of serious actions must rely on something only the user holds: strong payment authentication, a code received by text message, a re-entered password. Consumer agents generally plan to ask for the user's approval before important actions, but your site must not depend on it.

### What should a summary before payment contain?

The summary must present the product or service, the quantities and options, the date or slot, the address, the total price including all taxes and fees, the delivery times and terms, and the cancellation or withdrawal terms. The final button must clearly state the obligation to pay. Nothing may change between this summary and the charge; otherwise, a new summary must be presented.

### How do I prevent an agent from placing the same order twice?

Make the confirmation idempotent: each order intent has a single-use ID, and a second request with the same ID returns the result of the first without creating a new order. On the API side, accept an Idempotency-Key header. On the interface side, disable the button after the first submission and redirect to a confirmation page so that a reload does not resubmit the form.

## Resources

- [Model Context Protocol: tools and security considerations](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)
- [OpenAI: Apps SDK reference for ChatGPT](https://developers.openai.com/apps-sdk/reference)
- [OWASP: LLM01:2025 Prompt Injection](https://genai.owasp.org/llmrisk/llm01-prompt-injection/)
- [EUR-Lex: Directive 2011/83/EU on consumer rights](https://eur-lex.europa.eu/eli/dir/2011/83/oj/eng)
- [Laravel: password confirmation](https://laravel.com/docs/13.x/authentication#password-confirmation)

Next steps: [test user journeys with browsing agents](https://checklist-seo-geo.com/en/ai-agent-compatibility/test-user-journeys-browsing-agents) and [prevent prompt injection and unauthorized interactions](https://checklist-seo-geo.com/en/ai-agent-compatibility/prevent-prompt-injection-unauthorized-interactions).
