---
updatedAt: 2026-06-30T16:05:21.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/llms.txt
---

# Delete phase

Delete a subscription schedule phase.

## Overview

Delete one or all future phases from a subscription schedule. Useful when a customer wants to undo a scheduled renewal or when replacing renewal offers.

***

## Modes

| Mode                   | Behavior                                                  |
| ---------------------- | --------------------------------------------------------- |
| `last_phase` (default) | Deletes only the last future phase                        |
| `all_phases`           | Deletes all future phases, leaving only the current phase |

***

## Restrictions

| Condition                       | Result            |
| ------------------------------- | ----------------- |
| Subscription has no schedule    | 404 error         |
| Subscription has only one phase | 422 error         |
| No future phases exist          | 422 error         |
| Phase is a gifted renewal       | Cannot be deleted |

***

## Behavior After Deletion

* **Auto-renew plan**: After deleting all phases, `end_behavior` is set to `release` (subscription will auto-renew after the last remaining phase)
* **Self-renew plan**: After deleting all phases, `end_behavior` is set to `cancel` (subscription expires after the last remaining phase)
* Advance invoices for deleted phases are voided or refunded depending on payment status

***

## Webhook

No explicit webhook event is dispatched for phase deletion. The subscription model update may trigger `subscription.updated` via the Eloquent observer if the subscription record is saved during the operation.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "core-api",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/core"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/subscriptions/{id}/phases": {
      "delete": {
        "summary": "Delete phase",
        "description": "Delete a subscription schedule phase.",
        "operationId": "api-core-delete-phase",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier of the subscription.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "site_id",
            "in": "query",
            "description": "The unique identifier your site.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer eyJ***"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "description": "(last_phase, all_phases) Specifies whether to delete all future phases or only the last future phase on the subscription.",
                    "default": "last_phase"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"error\": {\n\t\t\"status\": 200,\n\t\t\"message\": \"Phase has been deleted successfully.\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 200,
                          "default": 0
                        },
                        "message": {
                          "type": "string",
                          "example": "Phase has been deleted successfully."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Invalid request, please try again.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request, please try again."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": "Unauthenticated."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"error\": {\n\t\t\"status\": 404,\n\t\t\"message\": \"You cannot delete phase form subscription that does not have phases\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 404,
                          "default": 0
                        },
                        "message": {
                          "type": "string",
                          "example": "You cannot delete phase form subscription that does not have phases"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [List subscriptions](https://docs.pelcro.com/reference/api-core-list-subcriptions.md)
* [Create subscription](https://docs.pelcro.com/reference/api-core-create-subscription.md)
* [Get subscription](https://docs.pelcro.com/reference/api-core-get-subscription.md)
* [Update subscription](https://docs.pelcro.com/reference/api-core-update-subscription.md)
* [Cancel subscription](https://docs.pelcro.com/reference/api-core-cancel-subscription.md)
* [Renew subscription](https://docs.pelcro.com/reference/api-core-renew-subscription.md)
* [Gifts](https://docs.pelcro.com/reference/api-core-gifts.md)