# Delete a subscription plan

Source: https://developers.swell.is/backend-api/subscription-plans/delete-a-subscription

Delete a subscription product permanently. The method outlined removes the entire product. Alternatively, you can also remove the subscription `purchase_option`, should you wish to retain the product and any other associated purchase options.

> **Warning:** This is not recommended if there are currently active subscriptions that reference this product. Update those subscriptions prior to deleting the subscription product.

## Arguments

- `id` (objectId, required): The id of the product you wish to delete.

## Example request

`DELETE /products/:id`

**cURL**

```bash
$ curl https://api.swell.store/products/{id} \
  -u store-id:secret-key \
  -X DELETE
```

**Node**

```javascript
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');

await swell.delete('/products/{id}');
```

**PHP**

```php
<?php $swell = new \Swell\Client('store-id', 'secret-key');

$swell->delete('/products/{id}');

?>
```

## Example response

```json
{
  "name": "Skooma",
  "purchase_options": {
    "subscription": {
      "active": true,
      "plans": [
        {
          "name": "Monthly",
          "description": null,
          "price": 75,
          "billing_schedule": {
            "interval": "monthly",
            "interval_count": 1,
            "limit": null,
            "trial_days": 1
          },
          "id": "64e799c1307e48001237eef5",
          "active": true
        }
      ]
    }
  },
  "currency": "USD",
  "slug": "skooooma",
  "price": 75,
  "type": "standard",
  "delivery": "shipment",
  "tax_class": "standard",
  "date_created": "2023-08-24T17:56:17.162Z",
  "active": false,
  "stock_status": null,
  "id": "64e799c1307e48001237eef4"
}
```
