> ## Documentation Index
> Fetch the complete documentation index at: https://docs.storiza.store/llms.txt
> Use this file to discover all available pages before exploring further.

# Renew, pause auto-renew, or cancel

> Keep a server paid for, stop automatic charges without losing it, or end it — and what happens to its IP.

Every server, additional IP, backup add-on and app has a **subscription**. It says how long each period is (`durationDays`: 7, 14, 30 or 90), until when it is paid (`currentPeriodEnd`), and how it is paid. Find a server's with `GET /vps/{vmId}` (`subscription`) or list them all with `GET /payments/subscriptions`.

There are three things you can do with one:

| You want to | Call | What happens at the end of the period |
| - | - | - |
| Keep it, renewing automatically (default) | nothing | Charged from your balance or saved card |
| Keep it, but **only renew when you say so** | `PATCH /payments/subscriptions/{id}/auto-renew` | Nothing is charged. It lapses with the normal grace period |
| End it | `DELETE /payments/subscriptions/{id}` | **Removed straight away** — no grace period |

## Renew a server

```bash theme={null}
curl -X POST https://api.storiza.store/vps/VPS_ID/renew \
  -H "Authorization: Bearer $STORIZA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

This buys one more period of the length the subscription already has, at the plan's current price. With no body it is paid from your balance and settles immediately; the response is the transaction, already `completed`. Time is **added** to the end of what you have paid for, so renewing early never loses days. Renewing after the period has ended starts the new period on the day you pay and turns the server back on.

| Option | Meaning |
| - | - |
| `target` | `"server"` (default) or `"backup"` to renew the backup add-on instead |
| `method` | Pay this renewal another way (see `GET /payments/methods`). A non-balance method returns a `checkoutUrl` to pay at |
| `couponCode` | A coupon for this renewal |

To change the length of future periods (say weekly to monthly), use `PATCH /payments/subscriptions/{id}/period` — see [Billing and payments](https://docs.storiza.store/concepts/billing-and-payments.md).

### When the server comes back on a new IP

A server's IP is kept for **3 days** after its period ends. After that it can be given to a new order. If you renew later than that and the old IP has been taken, the server comes back on a **new IP** — this is in our terms, and the owner is emailed the new address.

The renewal response tells you, in `ipChange`:

```json theme={null}
{
  "success": true,
  "data": {
    "id": 1234,
    "status": "completed",
    "ipChange": {
      "changed": true,
      "pending": false,
      "previousAddress": "192.0.2.10",
      "address": "192.0.2.57"
    }
  }
}
```

`changed: false` means the server kept its IP. `pending: true` means the renewal is waiting on a checkout payment, so it is not known yet; read `ip` from `GET /vps/{vmId}` after the payment settles. `POST /vps/{vmId}/start` returns the same `ipChange`. If no IP is free at all, the server stays off, `start` answers `WAITING_FOR_IP`, and our support team is notified to assign one.

## Stop automatic charges (`stopAutoRenew`)

For resellers and anyone who renews on someone else's behalf: you want a server to **stay** past its period end while you wait to hear from your customer, without paying for a period nobody may want.

```bash theme={null}
curl -X PATCH https://api.storiza.store/payments/subscriptions/SUBSCRIPTION_ID/auto-renew \
  -H "Authorization: Bearer $STORIZA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "stopAutoRenew": true }'
```

You can also set it when ordering: send `"stopAutoRenew": true` in `POST /vps/`, `POST /vps/order` or `POST /vps/{id}/additional-ips/order`.

With it set, nothing is ever taken automatically. At the end of the period the subscription becomes `past_due` and goes through the normal grace period:

| | Server | Additional IP |
| - | - | - |
| At period end | Powered off, kept with its data | Stops carrying traffic, kept |
| Grace | 7 days, then `expired` | 48 hours |
| Removed | The day after (8 days after the period) | After the 48 hours |

Renew at any point before it is removed (`POST /vps/{id}/renew`, `POST /vps-additional-ips/{id}/renew`) and it comes back. The setting stays on across renewals until you send `"stopAutoRenew": false`.

> [!NOTE]
>
> Only for subscriptions Storiza bills itself — paid from the balance or a saved Kashier card. A subscription billed by an external provider on its own schedule (`supportsManagement: true`) returns `SUBSCRIPTION_EXTERNALLY_BILLED`; manage it in that provider's portal.

## Cancel

```bash theme={null}
curl -X DELETE https://api.storiza.store/payments/subscriptions/SUBSCRIPTION_ID \
  -H "Authorization: Bearer $STORIZA_API_KEY"
```

Cancelling stops renewals and **keeps everything working until the end of the period you have paid for**. You can undo it with `POST /payments/subscriptions/{id}` any time before then.

> [!WARNING]
>
> When the paid period ends, a cancelled server is **deleted straight away** with its data, backups and snapshots, and a cancelled additional IP is released and may go to another customer. There is no grace period. If you might still want it, use `stopAutoRenew` instead.

## When a renewal fails

If an automatic renewal cannot be paid — an empty balance, a declined card — the subscription becomes `past_due` and follows the same grace period as `stopAutoRenew` above. A saved card is retried every 2 days; you can pay at any time by renewing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.