# Simulate mandate

Runs the same policy evaluation as live payments against draft fields, a mandate or an agent's mandate, and returns the decision, reason code and trace. Console session or API key with mandate:edit; nothing is reserved or sent.

`POST /v1/mandates/simulate`

Runs the same policy evaluation as live payments against draft fields, a mandate or an agent's mandate, and returns the decision, reason code and trace. Console session or API key with mandate:edit; nothing is reserved or sent.

Requires permission `mandate:edit`.

Policy decision: ALLOW, REQUIRE_APPROVAL, DENY.

## Request body

```json
{
  "agent_id": "agt_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "service_id": "svc_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "amount_base_units": "250000"
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **403**: Authenticated but not allowed: missing permission, passkey step-up required, or denied by policy.
- **404**: The resource does not exist or belongs to another organization.

Example 200 response:

```json
{
  "decision": "ALLOW",
  "reason_code": "WITHIN_POLICY",
  "scope": null,
  "message": "This purchase is within your spending rules.",
  "next_action": "",
  "trace": [
    {
      "step": "0",
      "label": "Payments not paused",
      "result": "pass",
      "detail": "kill switch off",
      "reason_code": null
    },
    {
      "step": "1",
      "label": "Agent credential and spending rules",
      "result": "pass",
      "detail": "mandate mdt_01m7dmxx4s2aw9p40vyaxmzdtf v4 active",
      "reason_code": null
    }
  ],
  "policy_version": "policy-2026-11-14.1",
  "inputs": {
    "rail": "card_lithic",
    "network": null,
    "asset": "USD",
    "amount_base_units": "50000",
    "merchant": {
      "id": "mch_01m7dmxx94amd9kk6aqvtnsey6",
      "name": "Demo Shop",
      "tier": "VERIFIED"
    },
    "service_id": "svc_01m7dmxx9qkb31sxgahwj24dwm",
    "category": "commerce",
    "merchant_tier": "VERIFIED",
    "mandate": {
      "id": "mdt_01m7dmxx4s2aw9p40vyaxmzdtf",
      "version": 4
    }
  }
}
```
