# Cancel a service

> Cancel a service at the end of its term or straight away, and learn what happens to its data and its unpaid invoices.

Source: https://www.coritan.com/docs/billing/cancel-a-service/

Cancelling ends a service and stops its billing. You choose when it ends: at the end of the current term, so it keeps running until the time you have paid for runs out, or immediately. Coritan does not refund unused time.

> [!CAUTION]
> When a service ends, Coritan deletes it and the data on it. You cannot restart a service once it has ended. Copy out anything you need before you cancel.

## Before you begin

- Sign in to the [dashboard](https://www.coritan.com/dashboard).
- Copy your data off the service. For a Container Apps server, you can also keep a snapshot, as the steps below show.
- Check what else uses the service, such as DNS records or proxies that point at its address. They stay on your account and stop working when the service ends.

## Cancel a service

1. Open the service's **Billing** tab. In the sidebar, select **Services** and then the service. For a Container Apps server, select **Plan and billing** on the server's **Settings** tab. A snapshot storage service opens the **Snapshots** page instead, which has no billing tab: go to `https://www.coritan.com/dashboard/services/<service number>/billing`, with the number from the **Services** list.
2. On the **Cancel service** card, select **Cancel service…**. The **Cancel this service?** dialog opens and says what the product deletes when the service ends.
3. Under **When**, choose:
   - **At the end of the current term** to keep the service running until the date the dialog shows. This is the default.
   - **Immediately** to end it now.

   An hourly service has no choice. It ends at once.
4. For a Container Apps server, leave **Take a snapshot first** ticked to keep a snapshot of the server, or clear it to keep nothing. The box also appears for a Cloud Compute instance, where it keeps nothing.
5. Type `cancel` and select **Cancel service**.

## Result

A message confirms the cancellation, and Coritan emails you about it. The **Activity** table on the **Billing** tab lists the request.

**At the end of the current term**
: The message reads `Scheduled for end-of-term termination; service remains active until then`. The **Billing** tab shows **Cancellation scheduled** with the end date, and the **Services** list shows the service as **Ending**. The service keeps working until that date, Coritan raises no more renewal invoices for it, and deletes it once the date has passed.

**Immediately**
: The message reads `Immediate termination queued`. The service's status becomes `pending_termination` while Coritan removes it, and then `terminated`. A service that was never set up, such as an order you never paid for, ends at once with `Service cancelled before provisioning`.

Either way, Coritan cancels every unpaid invoice for the service, so you do not owe them. That includes an invoice you have partly paid, and Coritan does not return the part you paid.

When you keep a snapshot, Coritan takes it at the moment you cancel, so after an end-of-term cancellation it holds the server as it was that day. It is named `Saved before cancellation` with the date, and you find it under **Snapshots** ([Take a server snapshot](/docs/managed-containers/snapshots/)).

## What ends with the service

The dialog names what each product deletes:

| Service | When it ends |
| --- | --- |
| Container Apps server | The server and its files are deleted. A snapshot you chose to keep stays under **Snapshots**. |
| Cloud Compute instance | The instance is stopped, and its disk, with every snapshot on it, is deleted ([Change an instance's plan or cancel it](/docs/cloud-compute/billing/#cancel-the-instance)). |
| Floating IP | The address goes back to the pool, and anything pointing at it stops resolving. |
| Mail Hosting and SMTP Relay | Mailboxes, aliases and stored mail are deleted. |
| Object Storage | Buckets and access keys stop working. Coritan keeps the objects for the number of days the dialog shows, and then deletes them. |
| Game proxy | The join address stops resolving. Your own server is not touched. |

## Orders you have not paid for

You do not need to cancel an order you decided against. A Container Apps server or floating IP order that is still unpaid and not set up after 48 hours, by default, is cancelled on its own, along with its invoice. Any other unpaid order stays on your account until you cancel it with **Immediately**.

## Troubleshooting

The **Cancel service** card is missing
: A cancellation is already scheduled, or the service has ended. The **Cancellation scheduled** alert shows the end date.

`Service already scheduled for end-of-term termination`
: You cancelled the service before, at the end of its term. To end it sooner, [contact support](/docs/support/conversations/).

`Service already cancelled/terminated`
: The service has ended or is being removed.

**Could not cancel the service**
: The cancellation failed. The message beside it gives the reason. Try again, or [contact support](/docs/support/conversations/).

You want to keep a service that is scheduled to end
: [Contact support](/docs/support/conversations/) before the end date. You cannot undo a cancellation yourself.

There is no `Saved before cancellation` snapshot
: Coritan skips the snapshot when the server has a recent snapshot already, and when it cannot take one. Look under **Snapshots** for the most recent snapshot of the server.

## Related

- [Change a service's plan](/docs/billing/change-plan/)
- [Pay an invoice](/docs/billing/invoices/)
- [How hourly billing works](/docs/billing/hourly-billing/)
- [Manage your services](/docs/get-started/services/)

## With the API

[`POST /services/{service_ref}/cancel`](/docs/api/reference/client/services/#op-post-api-v1-services-service-ref-cancel) cancels a service. `service_ref` is the service ID, or the UUID of the instance, server or floating IP behind it. Every field of the body is optional:

`immediate`
: `true` ends the service now. `false`, the default, ends it at the end of its term. Send `true` for an hourly service, as the dashboard does.

`keep_snapshot`
: `true`, the default, snapshots a Container Apps server before anything else happens. It has no effect on other products.

`reason`
: Your reason, recorded on the service's history.

```bash
curl -X POST https://api.coritan.com/api/v1/services/311/cancel \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"immediate": false, "keep_snapshot": true, "reason": "Moved to a larger server"}'
```

```json
{
  "message": "Scheduled for end-of-term termination; service remains active until then",
  "immediate": false,
  "status": "active",
  "termination_date": "2026-10-10T00:00:00",
  "snapshot_taken": true
}
```

`status` is the service's status after the request: `active` until an end-of-term date, `pending_termination` while an immediate cancellation runs, or `terminated` for a service that was never set up. `termination_date` is when the service ends, in UTC. `snapshot_taken` says whether Coritan took the snapshot.

| Status | `detail` | Cause |
| --- | --- | --- |
| `400` | `Service already cancelled/terminated` | The service has ended or is being removed. |
| `400` | `Service already scheduled for end-of-term termination` | The service is already set to end at the end of its term. |
| `403` | `Access denied` | The service belongs to another account. |
| `404` | `Service not found` | No service has that reference. |

## API

- `POST /api/v1/services/{service_ref}/cancel`: Cancel service (https://www.coritan.com/docs/api/reference/client/services/#op-post-api-v1-services-service-ref-cancel)
