---
title: "Delete Payment With Invoice Update"
method: DELETE
path: "/payments/{payment_id}"
---

# Delete Payment With Invoice Update

`DELETE /payments/{payment_id}`

Delete a payment and automatically update the related invoice's payment status.

This endpoint provides intelligent payment deletion that:
1. Validates payment ownership and permissions
2. Automatically recalculates and updates the invoice payment status
3. Creates an audit trail in invoice events
4. Maintains data consistency across the system

Business Rules:
- Payment status is recalculated based on remaining payments
- Invoice events are created for audit purposes
- Only payments belonging to the authenticated organization can be deleted
- Note: Deleting Stripe payments removes the record but does not refund through Stripe

Args:
    payment_id: UUID of the payment to delete
    user_id: ID of the authenticated user (from auth middleware)
    org_id: ID of the user's organization (from auth middleware)

Returns:
    dict: Success response with updated invoice information
    
Raises:
    HTTPException: 401 if unauthorized, 404 if not found, 400 if Stripe payment, 500 if server error

## Path parameters

- `payment_id` string, required — The ID of the payment to delete

## Query parameters

- `bulk_operation` boolean
- `user_id` string
- `org_id` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/every/apis/every-api.md) · [All operations](https://skmtc.net/every/apis/every-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/every/every-api/versions/f8600f7a4ae3/schema)
