> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Delete entities

Most entities in the Paddle API must be retained for record-keeping purposes, so can't be deleted. When you no longer need them, archive them instead.

---

This page covers how to retire entities in Paddle — archiving, canceling, or deleting — depending on the entity type.

Paddle is a merchant of record, which means you can't delete most entities. They're considered financial records, or relate to financial records, so have to be retained for record-keeping purposes. For example:

- [Transactions](https://developer.paddle.com/api-reference/transactions.md) are considered financial records.
- [Subscriptions](https://developer.paddle.com/api-reference/subscriptions.md) describe a recurring billing relationship with a customer. They create transactions.
- [Customers](https://developer.paddle.com/api-reference/customers.md), [addresses](https://developer.paddle.com/api-reference/addresses.md), and [businesses](https://developer.paddle.com/api-reference/businesses.md) describe who transactions are for.
- [Prices](https://developer.paddle.com/api-reference/prices.md) describe what transactions are for.

Instead of deleting, you can archive an entity when you no longer need it. You can archive customers and their related entities, as well as entities that make up your product catalog.

{% callout type="note" %}
If you're testing changes, use your sandbox account. The sandbox is separate to your live account, so changes don't impact your live account.
{% /callout %}

## Archive vs. delete

Archiving an entity is the primary way to mark entities as no longer needed.

When you **archive** an entity:

- It can't be used in Paddle, though it remains related to existing entities
- It isn't returned in [most list operations by default](https://developer.paddle.com/api-reference/about/default-scopes.md)
- It won't show up in default views in the Paddle dashboard

Archived entities remain on your Paddle system, so you can still get information about them in the future. You can unarchive them if you want to work with them again.

When you **delete** an entity, it's permanently removed from your Paddle system. Only notification destinations and payment methods can be deleted.

## Archive an entity

Send a PATCH request to the relevant update operation endpoint. For example, to update a product:

{% api-example method="PATCH" path="/products/{product_id}" %}

```json {% title="Request" %}
{
  "status": "archived"
}
```

```json {% title="Response" highlightLines="10" %}
{
  "data": {
    "id": "pro_01htz88xpr0mm7b3ta2pjkr7w2",
    "name": "AeroEdit Student",
    "tax_category": "standard",
    "type": "standard",
    "description": "Essential tools for student pilots to manage flight logs, analyze performance, and plan routes, and ensure compliance. Valid student pilot certificate from the FAA required.",
    "image_url": "https://paddle.s3.amazonaws.com/user/165798/bT1XUOJAQhOUxGs83cbk_pro.png",
    "custom_data": null,
    "status": "archived",
    "import_meta": null,
    "created_at": "2024-04-08T16:22:16.024Z",
    "updated_at": "2024-04-08T16:22:16.024Z"
  },
  "meta": {
    "request_id": "cf40234b-e140-44d1-a83f-7bbdedd88589"
  }
}
```

{% /api-example %}

## Unarchive an entity

To unarchive an entity, send a `PATCH` request to the relevant endpoint. Include `status` as `active`.

## Cancel transactions or subscriptions

Subscriptions and transactions have different statuses to other entities.

### Cancel a transaction

If you created a transaction in error, you can cancel it. The canceled transaction remains on your system for record-keeping purposes.

Send a PATCH request to the `/transactions/{transaction_id}` endpoint, setting `status` to `canceled`.

{% api-endpoint method="PATCH" path="/transactions/{transaction_id}" %}
{% /api-endpoint %}

You can't cancel a transaction that's `completed`. Once a transaction is completed, you can create an [adjustment](https://developer.paddle.com/api-reference/adjustments.md) to make post-billing changes to it, like refunding or crediting part or all of it.

### Cancel a subscription

Canceling a subscription is a core part of the subscription lifecycle. Make sure customers can cancel their subscription and have access to their data until their cancellation goes through.

Use the [cancel a subscription operation](https://developer.paddle.com/api-reference/subscriptions/cancel-subscription.md) to cancel a subscription. See [Cancel a subscription](https://developer.paddle.com/build/subscriptions/cancel-subscriptions.md) for the full workflow.

## Delete a notification destination

Notification destinations aren't related to financial records, so they can be deleted as well as deactivated. See [Work with notification destinations](https://developer.paddle.com/webhooks/notification-destinations.md).

## Delete a payment method

Customers can save payment methods at checkout so they can be used for future purchases. You can delete a payment method on behalf of a customer if they no longer need it.

Saved payment methods can't be deleted if tied to an `active`, `trialing`, `paused`, or `past_due` subscription. Update the subscription's payment method first, then delete the saved payment method.