---
title: "Edit a payment on a case"
method: PUT
path: "/cases/{id}/payments/{paymentId}"
tags: ["Cases"]
---

# Edit a payment on a case

`PUT /cases/{id}/payments/{paymentId}`

Edits an existing payment on a collection case. Mirrors the payout-split semantics of the create-payment endpoint.

**Payout Split:** supply both PayoutCreditor and PayoutCollectionPartner to set the split explicitly (they must sum to PaymentAmount), or omit both to have it recomputed from the case's pricing terms.

**Invoiced payments are frozen:** a payment whose payout has already been invoiced (Stripe/QBO) cannot be edited and returns **422 Unprocessable Entity**. This protects the issued accounting entry from silent drift.

**Reopen consent:** if the edit lowers the payment so a previously closed (Paid) case is left with a positive outstanding balance, the case must be reopened. By default this returns **409 Conflict**; resend with `reopenCaseIfNeeded: true` to confirm — the case is reopened to Active and a `case.updated` webhook fires.

## Path parameters

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

## Request body

- DebituraWebExternalApiContractsV1PaymentsUpdatePaymentRequest — Request to edit an existing payment on a case. Mirrors the payout-split semantics of Debitura.Web.ExternalApi.Contracts.V1.Payments.CreatePaymentRequest. **Currency:** A payment's currency cannot be changed — it is fixed to the case currency. **Invoiced payments are frozen:** a payment whose payout has already been invoiced (Stripe/QBO) cannot be edited and returns HTTP 422.
  - `date` string, date-time, required — Payment date (when payment was received). Provide date only without time component.
  - `paymentAmount` number, double, required — Total payment amount received. When both PayoutCreditor and PayoutCollectionPartner are supplied they must sum to this amount. When both are omitted, the split is computed server-side from the case's pricing terms.
  - `payoutCreditor` number, double, nullable — Amount to be paid out to creditor. **Optional.** When omitted (along with PayoutCollectionPartner), the split is computed server-side from the case's pricing terms (success fee). When supplied, PayoutCollectionPartner must also be supplied and the two must sum to PaymentAmount.
  - `payoutCollectionPartner` number, double, nullable — Amount to be kept by collection partner (commission). **Optional.** When omitted (along with PayoutCreditor), the split is computed server-side from the case's pricing terms (success fee). When supplied, PayoutCreditor must also be supplied and the two must sum to PaymentAmount.
  - `paymentRecipient` string, required — Who received the payment. **Valid values:** - **Creditor**: Payment was received by the creditor (client). When used, you must also specify CommissionPaymentStatus. - **CollectionPartner**: Payment was received by the collection partner. Commission is automatically marked as paid.
  - `commissionPaymentStatus` string, nullable — Commission payment status. **Required only if PaymentRecipient is Creditor.** When PaymentRecipient is CollectionPartner, this field is ignored and commission is automatically marked as Paid. **Valid values:** Paid, Unpaid.
  - `reopenCaseIfNeeded` boolean — Consent to reopen the case if this edit lowers the payment so a previously closed (Paid) case is left with a positive outstanding balance. When the edit would reopen the case and this flag is `false` (default), the request is rejected with HTTP 409 Conflict. Resend with `true` to confirm the reopen — the case is reopened to Active and a `case.updated` webhook fires.

## Response `200`

Payment updated successfully

- DebituraWebExternalApiContractsV1PaymentsPaymentDto
  - `id` string, uuid
  - `dateCreated` string, date-time
  - `dateUpdated` string, date-time, nullable
  - `date` string, date-time
  - `grossAmount` number, double
  - `recipient` string, nullable, required
  - `method` string, nullable, required
  - `currency` string, nullable, required
  - `invoice` DebituraWebExternalApiContractsV1PaymentsPaymentRelatedInvoiceDto, required
    - `status` string, nullable, required
    - `reference` string, nullable, required
    - `invoiceId` string, uuid

## Other responses

- `400` — Invalid request (validation errors)
- `404` — Case or payment not found / not assigned to you
- `409` — Edit would reopen the case; resend with reopenCaseIfNeeded=true
- `422` — Payment has already been invoiced and cannot be edited
- `500` — Server error occurred

---

[API](https://skmtc.net/debitura/apis/debitura-collection-partner-api.md) · [All operations](https://skmtc.net/debitura/apis/debitura-collection-partner-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/debitura/debitura-collection-partner-api/revisions/40bd25a4edaf/schema)
