latestOpenAPI 3.0.42026-08-194977335.3 KB

40bd25a4edaf

Cases

Edit a payment on a case

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.

put/cases/{id}/payments/{paymentId}

Path parameters

idstring uuid required
paymentIdstring uuid required

Request body

datestring date-time required

Payment date (when payment was received). Provide date only without time component.

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

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

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

paymentRecipientstring 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.
commissionPaymentStatusstring 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.

reopenCaseIfNeededboolean

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.

Example request

{
  "date": "2025-11-19",
  "paymentAmount": 5000,
  "payoutCreditor": 4000,
  "payoutCollectionPartner": 1000,
  "paymentRecipient": "Creditor",
  "commissionPaymentStatus": "Paid"
}

Response

Payment updated successfully

idstring uuid
dateCreatedstring date-time
dateUpdatedstring date-time nullable
datestring date-time
grossAmountnumber double
recipientstring nullable required
methodstring nullable required
currencystring nullable required