# Open dispute

Opens a dispute on a payment from its receipt; the payment evidence is attached automatically and a public status link is returned. Requires dispute:open; merchant accounts cannot open disputes.

`POST /v1/disputes`

Opens a dispute on a payment from its receipt; the payment evidence is attached automatically and a public status link is returned. Requires dispute:open; merchant accounts cannot open disputes.

Requires permission `dispute:open`.

## Request body

```json
{
  "receipt_id": "rcpt_01jd2x3k4m5n6p7q8r9s0t1v2w"
}
```

## 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.

Example 200 response:

```json
{
  "dispute": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "org_id": "org_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "receipt_id": "rcpt_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "intent_id": "pi_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "merchant_id": "mch_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "merchant_name": "string",
    "merchant_tier": "VERIFIED",
    "reason": "not_delivered",
    "description": "Example",
    "status": "active",
    "resolution": "string",
    "merchant_response": "string",
    "amount_base_units": "50000",
    "amount_display": "string"
  },
  "evidence": {},
  "files": [
    {
      "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
      "dispute_id": "dsp_01jd2x3k4m5n6p7q8r9s0t1v2w",
      "name": "Example",
      "content_type": "string",
      "size": 1,
      "uploaded_by": "string",
      "created_at": "2026-11-16T12:00:00Z"
    }
  ],
  "refund": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "org_id": "org_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "dispute_id": "dsp_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "intent_id": "pi_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "amount_base_units": "50000",
    "amount_display": "string",
    "asset": "USDC",
    "failure_reason": "string",
    "status": "active",
    "rail": "x402",
    "source": "string",
    "tx_ref": "string",
    "receipt_id": "rcpt_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "simulated": true
  },
  "messages": [
    {
      "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
      "dispute_id": "dsp_01jd2x3k4m5n6p7q8r9s0t1v2w",
      "author_type": "string",
      "author_id": "aut_01jd2x3k4m5n6p7q8r9s0t1v2w",
      "author_name": "string",
      "body": "string",
      "created_at": "2026-11-16T12:00:00Z"
    }
  ],
  "timeline": [
    {
      "type": "string",
      "at": "string",
      "by": "string",
      "by_role": "string",
      "detail": "string"
    }
  ],
  "public_url": "https://example.com/resource"
}
```
