---
title: Suspend a site when a client cancels
description: When billing happens outside your storefront, take the site offline from the flow that ends the subscription.
url: "https://shop.anypress.io/docs/suspend-a-site-when-a-client-cancels/"
updated: "2026-10-24"
category: Automation
---

# Suspend a site when a client cancels

Sites sold on your storefront are taken offline automatically when the subscription ends. When billing happens somewhere else, do it from the same flow that ends the subscription.

## Steps

1. **Trigger:** the subscription is cancelled in your payment app or CRM.
2. **Suspend:** POST to `https://api.anypress.io/v1/tenants/suspend?externalId=…`, using the same `externalId` you created the site with. A backup is taken first.
3. **If they come back:** POST to `https://api.anypress.io/v1/tenants/resume?externalId=…` and the site is online again, exactly as it was.

```
curl -u "$KEY:$SECRET" -X POST \
  "https://api.anypress.io/v1/tenants/suspend?externalId=pay-3QxK81Lm"

curl -u "$KEY:$SECRET" -X POST \
  "https://api.anypress.io/v1/tenants/resume?externalId=pay-3QxK81Lm"
```

While a site is suspended, visitors see a "website unavailable" page. For resellers, that page shows your brand instead of ours.
