---
title: "Sandbox only: open or move a dispute on a paid payment"
method: POST
path: "/api/v1/test-helpers/payments/{id}/dispute"
tags: ["Payments"]
---

# Sandbox only: open or move a dispute on a paid payment

`POST /api/v1/test-helpers/payments/{id}/dispute`

## Request

- Base URL: `https://merchant.zahlo.eu`
- URL: `https://merchant.zahlo.eu/api/v1/test-helpers/payments/{id}/dispute`
- Auth: API key in header `x-api-key`

The first call opens one synthetic chargeback (dispute.created); later calls move it (dispute.updated, or dispute.closed for won and lost). Responding to it with evidence is not simulated. The provider never sees this outcome; the real handlers apply it, so the real events follow. 404 resource_not_available outside the sandbox; 409 state_conflict when the object is past this step.

## Path parameters

- `id` string, required

## Request body

- TestDisputeRequest
  - `status` 'needs_response' | 'under_review' | 'won' | 'lost', required

## Response `200`

Successful response

- Dispute
  - `id` string, required
  - `paymentId` string, required: The payment's id, as GET /api/v1/payments/{id} takes it.
  - `status` 'needs_response' | 'under_review' | 'won' | 'lost' | 'closed', required
  - `amount` Money, required
    - `amountMinor` integer, required: Amount in the smallest currency unit
    - `currency` string, required
  - `reason` string
  - `evidenceDueAt` string, date-time

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `404`: Resource not found
- `409`: Request conflicts with existing state

---

[API](https://skmtc.dev/zahlo/apis/zahlo-merchant-api.md) - [All operations](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zahlo/apis/zahlo-merchant-api/revisions/8fcbef981e0d?raw)
