---
title: "Delete a payment on a test case (managing partner)"
method: DELETE
path: "/managed-cases/{id}/payments/{paymentId}"
tags: ["ManagedCases"]
---

# Delete a payment on a test case (managing partner)

`DELETE /managed-cases/{id}/payments/{paymentId}`

## Request

- Base URL: `https://collectionpartner-api.debitura.com`
- URL: `https://collectionpartner-api.debitura.com/managed-cases/{id}/payments/{paymentId}`
- Auth: API key in header `XApiKey`

Deletes a payment from a test case you submitted as managing partner, reverting its effect on the case balance and cascading the payout deletion. A durable audit record is retained.

**Test-Only Restriction:** only works on cases created with `isTestCase: true`. Production cases return a 400 — the assigned collection partner must delete via `DELETE /cases/{id}/payments/{paymentId}`.

**Invoiced payments are frozen:** an already-invoiced payment cannot be deleted and returns **422**.

**Reopen consent:** if the deletion leaves a previously closed (Paid) case with an outstanding balance, the case is reopened only when `reopenCaseIfNeeded=true`; otherwise the request returns **409 Conflict**.

## Path parameters

- `id` string, uuid, required
- `paymentId` string, uuid, required

## Query parameters

- `reopenCaseIfNeeded` boolean

## Response `204`

Payment deleted successfully

## Other responses

- `400`: Invalid request or production case
- `404`: Case or payment not found / not submitted by you
- `409`: Deletion would reopen the case; resend with reopenCaseIfNeeded=true
- `422`: Payment has already been invoiced and cannot be deleted
- `500`: Server error

---

[API](https://skmtc.dev/debitura/apis/debitura-collection-partner-api.md) - [All operations](https://skmtc.dev/debitura/apis/debitura-collection-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/debitura/apis/debitura-collection-partner-api/revisions/a7cf0ff022b6?raw)
