> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete transaction

> Permanently delete a transaction and reverse the associated commission

## Endpoint

```
DELETE https://api.partnero.com/v1/transactions/{key}
```

Permanently deletes a transaction and reverses the associated commission. Use this to handle refunds and chargebacks.

<Warning>
  This action is permanent and cannot be undone. If you need a reversible option, use [archive](/api-reference/transactions/archive) instead.
</Warning>

## Parameters

You can identify the transaction either by path parameter or request body:

| Parameter | Location | Type   | Description                      |
| --------- | -------- | ------ | -------------------------------- |
| `key`     | path     | string | Transaction key in the URL path  |
| `key`     | body     | string | Transaction key in the JSON body |

## Request

<CodeGroup>
  ```bash cURL (path parameter) theme={null}
  curl --location --request DELETE 'https://api.partnero.com/v1/transactions/transaction_123' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```bash cURL (request body) theme={null}
  curl --location --request DELETE 'https://api.partnero.com/v1/transactions' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "key": "transaction_123"
    }'
  ```
</CodeGroup>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "status": 1
  }
  ```
</ResponseExample>

## Error responses

| Status | Error                 | Solution                             |
| ------ | --------------------- | ------------------------------------ |
| 404    | Transaction not found | Check the transaction key is correct |

<Tip>
  Implement transaction deletion to handle refunds and chargebacks from your payment provider. This ensures partner commissions are adjusted automatically.
</Tip>
