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 #
- Trigger: the subscription is cancelled in your payment app or CRM.
- Suspend: POST to
https://api.anypress.io/v1/tenants/suspend?externalId=…, using the sameexternalIdyou created the site with. A backup is taken first. - 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.