---
title: "Billing API: Order Paid Servers"
description: "Silly Development API reference for billing: read plans and subscriptions, order a paid server, cancel or resume a plan and downgrade with a refund."
url: "https://sillydev.co.uk/docs/panel/billing"
updated: "2026-11-05"
---

API reference

# Billing

Order paid servers and manage their plans from code.

[← Panel API docs](https://sillydev.co.uk/docs/panel) · 12 endpoints · Updated 5 November 2026

**Browse the docs**

## Billing

Paid servers. Only available while billing is switched on and a plan is on sale (and, while the panel is on test keys or soft-launching, only to administrators); otherwise every endpoint here returns 404. Anything that spends money, refunds it or changes a plan needs the `billing.purchase` scope, which no key has unless its owner turned it on. Managing an existing plan also returns 404 to an account that has never started a checkout. Prices are in pence (the smallest unit of the currency).

### Get billing status

GET`/billing`

Account scope billing.read Limited to 2400 per minute

Returns the plans on sale (`plans`, smallest first; `plan` is the default one), the account's paid servers with their plan state and refund quote, paid servers that lapsed and can be restored by subscribing again, and the saved card (brand and last four digits only). Works for accounts that have never bought anything. Use it to follow an upgrade or a new paid server: once the order is fulfilled the server appears in `subscriptions`. Orders that are paid for but still being built are listed in `meta.pending_orders` of the server list (`GET /`). Has its own, larger rate limit than the rest of the API.

Example

```
curl "https://sillydev.co.uk/panel/api/client/billing" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The account's billing status.

```
{
    "object": "billing",
    "attributes": {
        "is_customer": true,
        "sandbox": false,
        "restricted": false,
        "plan": {
            "key": "standard",
            "name": "Standard",
            "price_pence": 75,
            "currency": "gbp",
            "limits": {
                "memory": 512,
                "disk": 1024,
                "cpu": 50
            }
        },
        "plans": [
            {
                "key": "standard",
                "name": "Standard",
                "price_pence": 75,
                "currency": "gbp",
                "limits": {
                    "memory": 512,
                    "disk": 1024,
                    "cpu": 50
                }
            },
            {
                "key": "plus",
                "name": "Plus",
                "price_pence": 175,
                "currency": "gbp",
                "limits": {
                    "memory": 1280,
                    "disk": 2560,
                    "cpu": 125
                }
            }
        ],
        "subscriptions": [
            {
                "server_uuid": "1a7ce997-259b-452e-8b4e-cecc464142ca",
                "server_name": "My Discord bot",
                "status": "active",
                "plan": {
                    "key": "standard",
                    "name": "Standard",
                    "price_pence": 75,
                    "limits": {
                        "memory": 512,
                        "disk": 1024,
                        "cpu": 50
                    }
                },
                "scheduled_plan": null,
                "plan_changes": [
                    {
                        "key": "plus",
                        "direction": "up",
                        "charge_now_pence": 67,
                        "immediate": null,
                        "immediate_to_credit": null
                    }
                ],
                "cancel_at_period_end": false,
                "current_period_end": "2026-11-01T12:00:00+00:00",
                "payment_issue": null,
                "immediate_downgrade": {
                    "available": true,
                    "reason": null,
                    "refund_pence": 22,
                    "fee_pence": 25,
                    "gross_pence": 47,
                    "minimum_pence": 5,
                    "available_at": null
                }
            }
        ],
        "restorable": [],
        "saved_card": {
            "brand": "visa",
            "last4": "4242",
            "exp_month": 12,
            "exp_year": 2028
        }
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.is_customerrequired | boolean | Whether the account has ever started a checkout. Plan management routes 404 until it has. |
| attributes.sandboxrequired | boolean | Whether billing is on Stripe test keys (only administrators can reach billing then). |
| attributes.restrictedrequired | boolean | Whether billing is limited to administrators. |
| attributes.plans | array of object | Every paid server plan on sale, smallest first. Order one with `plan` in `createCheckout`. |
| attributes.plans\[\].key | string |  |
| attributes.plans\[\].name | string |  |
| attributes.plans\[\].price_pence | integer |  |
| attributes.plans\[\].currency | string |  |
| attributes.plans\[\].limits | object |  |
| attributes.plans\[\].limits.memory | integer |  |
| attributes.plans\[\].limits.disk | integer |  |
| attributes.plans\[\].limits.cpu | integer |  |
| attributes.planrequired | object | The default plan, which an order that names no plan buys. |
| attributes.plan.keyrequired | string |  |
| attributes.plan.namerequired | string |  |
| attributes.plan.price_pencerequired | integer | Monthly price in the smallest currency unit. |
| attributes.plan.currencyrequired | string |  |
| attributes.plan.limitsrequired | object | Size of a paid server; memory and disk in MiB, CPU in percent of one core. |
| attributes.plan.limits.memoryrequired | integer |  |
| attributes.plan.limits.diskrequired | integer |  |
| attributes.plan.limits.cpurequired | integer |  |
| attributes.subscriptionsrequired | array of object | The account's servers with a live paid plan. |
| attributes.subscriptions\[\].server_uuidrequired | string (uuid) |  |
| attributes.subscriptions\[\].server_namerequired | string |  |
| attributes.subscriptions\[\].in_free_month | boolean | On the free month the free month offer gave it, paid by card. Its first charge is at `current_period_end`, and its plan cannot be changed until then. |
| attributes.subscriptions\[\].planrequired | object | The paid plan the server is on. |
| attributes.subscriptions\[\].plan.keyrequired | string |  |
| attributes.subscriptions\[\].plan.namerequired | string |  |
| attributes.subscriptions\[\].plan.price_pencerequired | integer |  |
| attributes.subscriptions\[\].plan.limitsrequired | object |  |
| attributes.subscriptions\[\].scheduled_planrequired | object \| null | A smaller paid plan the server moves to at `current_period_end`. |
| attributes.subscriptions\[\].scheduled_plan.key | string |  |
| attributes.subscriptions\[\].scheduled_plan.name | string |  |
| attributes.subscriptions\[\].scheduled_plan.price_pence | integer |  |
| attributes.subscriptions\[\].plan_changesrequired | array of object | The other paid plans it can move to with `changeServerPlan`. Empty for a server prepaid in crypto. |
| attributes.subscriptions\[\].upgrade_pending | boolean | Only in the answer to `changeServerPlan`. A move up was asked for but its charge must be paid first. |
| attributes.subscriptions\[\].upgrade_payment_url | string (uri) \| null | Only in the answer to `changeServerPlan`. The invoice to pay for a pending move up. |
| attributes.subscriptions\[\].statusrequired | string | Stripe's subscription status (e.g. `active`, `trialing`, `past_due`, `incomplete`, `canceled`), or `ended` once the plan is over and the server has been downgraded or suspended. |
| attributes.subscriptions\[\].cancel_at_period_endrequired | boolean |  |
| attributes.subscriptions\[\].current_period_endrequired | string (date-time) \| null |  |
| attributes.subscriptions\[\].payment_issuerequired | object \| null | Set when the latest payment is outstanding and the customer can act on it. |
| attributes.subscriptions\[\].payment_issue.typerequired | one of 'requires_action', 'failed' | `requires_action`: the bank wants it confirmed (3D Secure). `failed`: the card was declined. |
| attributes.subscriptions\[\].payment_issue.urlrequired | string (uri) \| null | Stripe page where a person can complete the payment. |
| attributes.subscriptions\[\].payment_issue.grace_ends_atrequired | string (date-time) \| null | When the server is suspended if the payment is still outstanding. |
| attributes.subscriptions\[\].immediate_downgraderequired | object | Whether `cancelSubscriptionImmediately` would be allowed now, and what it would refund. |
| attributes.subscriptions\[\].immediate_downgrade.availablerequired | boolean |  |
| attributes.subscriptions\[\].immediate_downgrade.reasonrequired | one of 'no_payment', 'blackout', 'quota', 'too_small', 'prepaid', 'credit_plan', 'plan_changed', null | Why it is unavailable. `no_payment` still lets the plan be ended, just without a refund; `blackout`: renews too soon; `quota`: one used in the last 30 days; `too_small`: the refund would be under the minimum; `prepaid`: paid in crypto; `credit_plan`: paid from credit, so only a refund to credit is possible; `plan_changed`: it moved between paid plans since its last bill. |
| attributes.subscriptions\[\].immediate_downgrade.refund_pencerequired | integer | Refund after the fee. |
| attributes.subscriptions\[\].immediate_downgrade.fee_pencerequired | integer |  |
| attributes.subscriptions\[\].immediate_downgrade.gross_pencerequired | integer | The unused part of the period before the fee. For `too_small`, this less `fee_pence` is the refund that was under the minimum. |
| attributes.subscriptions\[\].immediate_downgrade.minimum_pencerequired | integer | The smallest refund sent, after the fee. |
| attributes.subscriptions\[\].immediate_downgrade.available_atrequired | string (date-time) \| null | For `quota`, when the next immediate downgrade is allowed. |
| attributes.restorablerequired | array of object | Paid servers suspended because their plan lapsed; ordering with their `server_uuid` restores them. |
| attributes.restorable\[\].server_uuidrequired | string (uuid) |  |
| attributes.restorable\[\].server_namerequired | string |  |
| attributes.restorable\[\].deletion_due_atrequired | string (date-time) \| null |  |
| attributes.database_plans | array of object | Paid database plans on sale to the account. |
| attributes.database_plans\[\].keyrequired | string |  |
| attributes.database_plans\[\].namerequired | string |  |
| attributes.database_plans\[\].price_pencerequired | integer | Monthly price in the smallest currency unit. |
| attributes.database_plans\[\].quota_mbrequired | integer |  |
| attributes.database_plans\[\].quota_bytesrequired | integer |  |
| attributes.database_plans\[\].sizerequired | string |  |
| attributes.database_subscriptions | array of object | The account's databases on a paid plan. |
| attributes.database_subscriptions\[\].database_idrequired | integer |  |
| attributes.database_subscriptions\[\].database_labelrequired | string |  |
| attributes.database_subscriptions\[\].statusrequired | string | Stripe's status for the subscription. |
| attributes.database_subscriptions\[\].planrequired | object |  |
| attributes.database_subscriptions\[\].plan.keyrequired | string |  |
| attributes.database_subscriptions\[\].plan.namerequired | string |  |
| attributes.database_subscriptions\[\].plan.price_pencerequired | integer \| null |  |
| attributes.database_subscriptions\[\].plan.sizerequired | string \| null |  |
| attributes.database_subscriptions\[\].scheduled_planrequired | string \| null | The plan it moves to when the period ends (a smaller plan's key, or `free`), or null when nothing changes. |
| attributes.database_subscriptions\[\].current_period_endrequired | string (date-time) \| null |  |
| attributes.database_subscriptions\[\].payment_issuerequired | any |  |
| attributes.saved_cardrequired | object \| null |  |
| attributes.saved_card.brandrequired | string |  |
| attributes.saved_card.last4required | string |  |
| attributes.saved_card.exp_monthrequired | integer |  |
| attributes.saved_card.exp_yearrequired | integer |  |
| attributes.free_month_offer | object \| null | The account's one-time free month offer, while it can use it; null otherwise. Use it by ordering with `free_month_offer` true. |
| attributes.free_month_offer.expires_atrequired | string (date-time) |  |
| attributes.free_month_offer.dismissedrequired | boolean | The panel's banner for it was hidden in the last week. The offer is still open. |
| attributes.free_month_offer.planrequired | object | The plan the free month is of. |
| attributes.free_month_offer.plan.key | string |  |
| attributes.free_month_offer.plan.name | string |  |
| attributes.free_month_offer.plan.price_pence | integer |  |
| attributes.free_month_offer.crypto_bonus_monthsrequired | integer | Free months added on top of the months paid for in crypto. |
| attributes.free_month_offer.serversrequired | array of object | The account's free servers it can be used to upgrade. |
| attributes.free_month_offer.servers\[\].uuid | string (uuid) |  |
| attributes.free_month_offer.servers\[\].name | string |  |

Errors

- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

### Get account credit

GET`/billing/credit`

Account scope billing.read

Returns the account credit balance and one page (25 entries, newest first) of its activity log. `view=history` (the default) lists every change to the balance, so the entries add up to `balance_pence`; an administrator's change shows as type `adjustment` with no description. `view=pending` lists referral rewards that are on their way but are not credit yet, with when each is expected. Credit is only spent on the account's own plans and is never paid out.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| view | one of 'history', 'pending' |  |
| page | integer |  |

Example

```
curl "https://sillydev.co.uk/panel/api/client/billing/credit" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The balance and one page of the activity log.

```
{
    "balance_pence": 120,
    "pending_pence": 3,
    "view": "history",
    "data": [
        {
            "uuid": "0b9d0f0e-7d1c-4c1e-9b64-3f5c2a8e1d42",
            "type": "renewal",
            "amount_pence": -75,
            "description": "My Discord bot",
            "created_at": "2026-10-28T12:00:00+00:00"
        },
        {
            "uuid": "5f2a3c1b-8e4d-4a7f-a1b2-c3d4e5f60718",
            "type": "adjustment",
            "amount_pence": 195,
            "description": null,
            "created_at": "2026-10-20T09:30:00+00:00"
        }
    ],
    "pagination": {
        "current_page": 1,
        "total_pages": 1,
        "total": 2
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| balance_pencerequired | integer | Credit that can be spent now. |
| pending_pencerequired | integer | Referral rewards not yet credit. |
| viewrequired | one of 'history', 'pending' |  |
| datarequired | array of object | With `view=history`, changes to the balance (`uuid`, `type`, `amount_pence`, negative when spent, `description`, `created_at`). With `view=pending`, referral rewards (`uuid`, `kind`, `status`, `amount_pence`, `paid_pence`, `cancel_reason`, `expected_at`, `cleared_at`, `cancelled_at`, `created_at`). |
| paginationrequired | object |  |
| pagination.current_page | integer |  |
| pagination.total_pages | integer |  |
| pagination.total | integer |  |

Errors

- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
- 422 Some fields were missing or invalid. There is one error per problem, and `meta.source_field` names the field.

### Order a paid server or upgrade a free one

POST`/billing/checkout`

Account scope billing.purchase Limited to 20 per minute

Starts an order for a new paid server (send `name` and `runtime`) or for upgrading an existing free server the account owns (send `server_uuid`). With `use_saved_card` true and a card on file, the order goes straight to being built and the returned `url` is just the billing page; otherwise `url` is a Stripe Checkout page that a person must open in a browser to enter a card, and nothing happens until they do.

Needs the `billing.purchase` scope, which no key has unless its owner turns it on. Each key may start 2 orders in any rolling 24 hours, abandoned ones included (an administrator can change this for an account, and 0 means the account's keys cannot order at all, which answers 403). The account owner is emailed about every order a key starts.

Send an `Idempotency-Key` header to make retries safe: repeating a key the account already used returns that order instead of starting another. A Stripe Checkout that is never finished is cancelled after 48 hours (any promotion code it claimed can then be used again), and other unfilled orders after 7 days.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| Idempotency-Key | string | 1 to 255 characters, unique per order you mean to place. A repeat returns the original order (same `order_uuid`, `url` pointing at the billing page) without buying again, even if the first request is still running. |

Body

| Name | Type | Description |
| --- | --- | --- |
| server_uuid | string (uuid) | Full UUID of a server the account owns, to upgrade it (or restore one listed in `restorable`). |
| name | string | Required without `server_uuid`. |
| description | string \| null |  |
| runtime | one of 'nodejs', 'python', 'bun' | Required without `server_uuid`; a runtime key from `getServerCreationOptions`. |
| plan | string \| null | A plan key from `plans` in `GET /billing`, such as `standard` or `plus`. The default plan when left out. 400 if it is not on sale. |
| use_saved_card | boolean | Use the card on file instead of returning a Stripe Checkout page. 400 if there is none. |
| promotion_code | string \| null | A promotion code, applied to the plan once the server is running. 400 if it does not exist, has run out, or cannot be used on this order (some codes are for a first purchase only). |
| free_month_offer | boolean | Use the account's one-time free month offer (`free_month_offer` in `GET /billing`) on the offer's plan. The first month is free and the plan then renews at its normal price. 400 if the account has no open offer, with `pay_with_credit` or `promotion_code`, on another plan, or with a card that already used the offer on another account. |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/checkout" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Discord bot","description":"Posts the daily quiz.","runtime":"nodejs","use_saved_card":true}'
```

Response 200The order. Follow it with \`GET /\` (\`meta.pending_orders\`, while it is \`provisioning\` or \`pending_deployment\`) and \`GET /billing\` (\`subscriptions\`, once the server is on the plan).

```
{
    "object": "billing_checkout",
    "attributes": {
        "url": "https://sillydev.co.uk/panel/account/billing?order=5d2f8a3c-6b1e-4c7a-9f0d-2e8b7a6c5d4f",
        "order_uuid": "5d2f8a3c-6b1e-4c7a-9f0d-2e8b7a6c5d4f"
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.urlrequired | string (uri) | A Stripe Checkout page a person must open to pay, or the panel's billing page when the order needs nothing more (saved card, or a replayed Idempotency-Key). |
| attributes.order_uuidrequired | string (uuid) |  |

Errors

- 400 The Idempotency-Key header is empty or too long, the runtime is not available, the server is already on a paid plan or is suspended, no saved card was found, another plan's payment needs attention before the saved card can be used again, or the promotion code cannot be used.
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key lacks the `billing.purchase` scope, or the account's keys may not order (daily limit 0).
- 404 Billing is switched off, or `server_uuid` is not a server the account owns.
- 422 Some fields were missing or invalid. There is one error per problem, and `meta.source_field` names the field.
- 429 The key has used its daily order limit, or the per-minute rate limit was hit.

### Cancel an order

DELETE`/billing/orders/{orderUuid}`

Account scope billing.purchase

Cancels an order that has not been fulfilled: one still awaiting payment, being built (`provisioning`) or waiting for room (`pending_deployment`). Nothing is charged, because a plan only starts once its server exists. Returns 400 for an order that is already fulfilled, cancelled or failed. Database orders (from `createDatabaseCheckout`) are cancelled here too, except while `provisioning`.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| orderUuidrequired | string (uuid) | The order's UUID, as returned by `createCheckout`. |

Example

```
curl -X DELETE "https://sillydev.co.uk/panel/api/client/billing/orders/{orderUuid}" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The cancelled order.

```
{
    "object": "server_order",
    "attributes": {
        "uuid": "5d2f8a3c-6b1e-4c7a-9f0d-2e8b7a6c5d4f",
        "status": "cancelled"
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | one of 'server_order', 'database_order' |  |
| attributesrequired | object |  |
| attributes.uuidrequired | string (uuid) |  |
| attributes.statusrequired | one of 'awaiting_payment', 'provisioning', 'pending_deployment', 'fulfilled', 'cancelled', 'failed' |  |

Errors

- 400 The request could not be carried out as sent. `detail` says why.
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

### Order a paid database or upgrade a free one

POST`/billing/databases/checkout`

Account scope billing.purchase Limited to 20 per minute

Starts an order for a new database on a paid plan (send `label` and `version_id`) or for putting one of the account's free databases on a paid plan (send `database_id`). It works like `createCheckout`: with `use_saved_card` the order goes straight ahead and `url` is the Databases page; otherwise `url` is a Stripe Checkout page a person must open. The plan is billed monthly from when the database is ready.

Paid databases do not count towards the free limit, and there is no cap on how many an account may have. If the database server is short of disk, the order waits (`pending_deployment`) until there is room.

Same scope, daily key limit, `Idempotency-Key` handling and expiry as `createCheckout`.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| Idempotency-Key | string | 1 to 255 characters, unique per order you mean to place. |

Body

| Name | Type | Description |
| --- | --- | --- |
| planrequired | string | A plan key from `plans` in `listDatabases`. |
| database_id | integer | A free database the account owns, or one listed as suspended with reason `plan_ended` (subscribing restores it). |
| label | string | Required without `database_id`. |
| version_id | integer | Required without `database_id`; an active version from `listDatabases`. |
| use_saved_card | boolean | Use the card on file instead of returning a Stripe Checkout page. |
| promotion_code | string \| null | A promotion code that can be used on databases. |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/databases/checkout" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"plan":"standard","label":"Bot data","version_id":3,"use_saved_card":true}'
```

Response 200The order. Follow it with \`listDatabases\` (\`orders\`, then the database's \`subscription\`).

```
{
    "object": "billing_checkout",
    "attributes": {
        "url": "https://checkout.stripe.com/c/pay/cs_live_xxxxxxxxxxxxxxxx",
        "order_uuid": "5d2f8a3c-6b1e-4c7a-9f0d-2e8b7a6c5d4f"
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.urlrequired | string (uri) | A Stripe Checkout page a person must open to pay, or the panel's billing page when the order needs nothing more (saved card, or a replayed Idempotency-Key). |
| attributes.order_uuidrequired | string (uuid) |  |

Errors

- 400 The plan or version is not available, the database is already on a paid plan, suspended by an administrator, being moved, holds more than the plan allows or already has an order, no saved card was found, a payment needs attention first, or the promotion code cannot be used on databases.
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 Billing or databases are switched off, no paid plan is on sale, or `database_id` is not a database the account owns.
- 422 Some fields were missing or invalid. There is one error per problem, and `meta.source_field` names the field.
- 429 Too many requests. Wait for the number of seconds in the `Retry-After` header, then try again.

### Change a paid database's plan

POST`/billing/databases/{database}/plan`

Account scope billing.purchase Limited to 20 per minute

Moves a database that is on a paid plan to another plan, or back to free (`plan: free`).

A bigger plan happens now: the difference for the rest of the month is charged straight away, and the database gets the bigger quota. If that payment needs confirming, the database stays on its plan and the account is emailed the invoice; it moves up once it is paid.

A smaller plan, or free, always waits for the next bill, and is refused while the database holds more than that plan allows (or, for free, while the account already has its free databases). If the database has grown past it by then, it is suspended until it moves back up or is made smaller. Asking for the plan it is on undoes a change that is waiting.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| databaserequired | integer | The database's `id`. |

Body

| Name | Type | Description |
| --- | --- | --- |
| planrequired | string | A plan key from `plans`, or `free`. |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/databases/{database}/plan" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"plan":"large"}'
```

Response 200The database's plan after the change.

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.database_idrequired | integer |  |
| attributes.subscriptionrequired | any |  |
| attributes.orderrequired | any | For a move up, the order that made it. `fulfilled` when it is done, `pending_deployment` while it waits for room on the database server, `failed` when it did not happen (see `error`). Null for other changes. |

Errors

- 400 The database is not on a paid plan, the plan is not available, it holds too much for the smaller plan, a payment needs attention first, or it is being moved.
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
- 422 Some fields were missing or invalid. There is one error per problem, and `meta.source_field` names the field.

### Keep a paid database's plan

POST`/billing/databases/{database}/plan/keep`

Account scope billing.purchase

Undoes a move to a smaller plan, or to free, that is waiting for the next bill. The database stays on its plan and is billed for it.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| databaserequired | integer | The database's `id`. |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/databases/{database}/plan/keep" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The database's plan.

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.database_idrequired | integer |  |
| attributes.subscriptionrequired | any |  |
| attributes.orderrequired | any | For a move up, the order that made it. `fulfilled` when it is done, `pending_deployment` while it waits for room on the database server, `failed` when it did not happen (see `error`). Null for other changes. |

Errors

- 400 The request could not be carried out as sent. `detail` says why.
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

### Move a paid server to another paid plan

POST`/billing/subscriptions/{serverUuid}/plan`

Account scope billing.purchase Limited to 10 per hour

Moves a server on a paid plan to another paid plan from `plans` (to free, use `cancelSubscription` or `cancelSubscriptionImmediately`). `plan_changes` in `GET /billing` lists the plans it can move to.

A bigger plan happens now: the difference for the rest of the month is charged straight away (`charge_now_pence` is about what that is), and the server is resized and restarted. If that payment needs confirming, the server stays on its plan, `upgrade_pending` is true and `upgrade_payment_url` is the invoice to pay; it moves up once it is paid. A plan paid from account credit takes the difference from credit.

A smaller plan happens at the next bill (`when: next_bill`, the default), or now (`when: now`) with the unused part of the difference refunded under the same rules as `cancelSubscriptionImmediately` (see `immediate` in `plan_changes`). Either is refused while the server uses more disk than the smaller plan has. A server prepaid in crypto keeps its plan until its paid time runs out. Asking for the plan it is on undoes a move down that is waiting.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| serverUuidrequired | string (uuid) | The full UUID of a server the account owns (not the 8-character identifier). |

Body

| Name | Type | Description |
| --- | --- | --- |
| planrequired | string | A plan key from `plans`. |
| when | one of 'next_bill', 'now' | For a move down. |
| refund_to | one of 'card', 'credit' | For a move down now. A plan paid from credit is always refunded to credit. |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/subscriptions/{serverUuid}/plan" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"plan":"plus"}'
```

Response 200The plan's new state.

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.planrequired | object | The paid plan the server is on. |
| attributes.plan.keyrequired | string |  |
| attributes.plan.namerequired | string |  |
| attributes.plan.price_pencerequired | integer |  |
| attributes.plan.limitsrequired | object |  |
| attributes.plan.limits.memory | integer |  |
| attributes.plan.limits.disk | integer |  |
| attributes.plan.limits.cpu | integer |  |
| attributes.scheduled_planrequired | object \| null | A smaller paid plan the server moves to at `current_period_end`. |
| attributes.scheduled_plan.key | string |  |
| attributes.scheduled_plan.name | string |  |
| attributes.scheduled_plan.price_pence | integer |  |
| attributes.plan_changesrequired | array of object | The other paid plans it can move to with `changeServerPlan`. Empty for a server prepaid in crypto. |
| attributes.plan_changes\[\].keyrequired | string |  |
| attributes.plan_changes\[\].directionrequired | one of 'up', 'down' |  |
| attributes.plan_changes\[\].charge_now_pencerequired | integer | Moving up, about what is charged now for the rest of the period. |
| attributes.plan_changes\[\].immediaterequired | any | Moving down now with a refund to the card. Null when moving up. |
| attributes.plan_changes\[\].immediate_to_creditrequired | any | Moving down now with a refund to account credit. Null when moving up. |
| attributes.upgrade_pending | boolean | Only in the answer to `changeServerPlan`. A move up was asked for but its charge must be paid first. |
| attributes.upgrade_payment_url | string (uri) \| null | Only in the answer to `changeServerPlan`. The invoice to pay for a pending move up. |
| attributes.statusrequired | string | Stripe's subscription status (e.g. `active`, `trialing`, `past_due`, `incomplete`, `canceled`), or `ended` once the plan is over and the server has been downgraded or suspended. |
| attributes.cancel_at_period_endrequired | boolean |  |
| attributes.current_period_endrequired | string (date-time) \| null |  |
| attributes.payment_issuerequired | object \| null | Set when the latest payment is outstanding and the customer can act on it. |
| attributes.payment_issue.typerequired | one of 'requires_action', 'failed' | `requires_action`: the bank wants it confirmed (3D Secure). `failed`: the card was declined. |
| attributes.payment_issue.urlrequired | string (uri) \| null | Stripe page where a person can complete the payment. |
| attributes.payment_issue.grace_ends_atrequired | string (date-time) \| null | When the server is suspended if the payment is still outstanding. |
| attributes.immediate_downgraderequired | object | Whether `cancelSubscriptionImmediately` would be allowed now, and what it would refund. |
| attributes.immediate_downgrade.availablerequired | boolean |  |
| attributes.immediate_downgrade.reasonrequired | one of 'no_payment', 'blackout', 'quota', 'too_small', 'prepaid', 'credit_plan', 'plan_changed', null | Why it is unavailable. `no_payment` still lets the plan be ended, just without a refund; `blackout`: renews too soon; `quota`: one used in the last 30 days; `too_small`: the refund would be under the minimum; `prepaid`: paid in crypto; `credit_plan`: paid from credit, so only a refund to credit is possible; `plan_changed`: it moved between paid plans since its last bill. |
| attributes.immediate_downgrade.refund_pencerequired | integer | Refund after the fee. |
| attributes.immediate_downgrade.fee_pencerequired | integer |  |
| attributes.immediate_downgrade.gross_pencerequired | integer | The unused part of the period before the fee. For `too_small`, this less `fee_pence` is the refund that was under the minimum. |
| attributes.immediate_downgrade.minimum_pencerequired | integer | The smallest refund sent, after the fee. |
| attributes.immediate_downgrade.available_atrequired | string (date-time) \| null | For `quota`, when the next immediate downgrade is allowed. |

Errors

- 400 The plan is not available or not different, the server uses too much disk for the smaller plan, a payment needs attention first, the server is prepaid in crypto, or a move down now is not allowed (the message says why).
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
- 422 Some fields were missing or invalid. There is one error per problem, and `meta.source_field` names the field.

### Keep a paid server's plan after scheduling a move down

POST`/billing/subscriptions/{serverUuid}/plan/keep`

Account scope billing.purchase

Undoes a move to a smaller paid plan that is waiting for the next bill. The server stays on its plan and is billed for it. To undo a move to free, use `resumeSubscription`.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| serverUuidrequired | string (uuid) | The full UUID of a server the account owns (not the 8-character identifier). |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/subscriptions/{serverUuid}/plan/keep" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The plan's new state.

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.planrequired | object | The paid plan the server is on. |
| attributes.plan.keyrequired | string |  |
| attributes.plan.namerequired | string |  |
| attributes.plan.price_pencerequired | integer |  |
| attributes.plan.limitsrequired | object |  |
| attributes.plan.limits.memory | integer |  |
| attributes.plan.limits.disk | integer |  |
| attributes.plan.limits.cpu | integer |  |
| attributes.scheduled_planrequired | object \| null | A smaller paid plan the server moves to at `current_period_end`. |
| attributes.scheduled_plan.key | string |  |
| attributes.scheduled_plan.name | string |  |
| attributes.scheduled_plan.price_pence | integer |  |
| attributes.plan_changesrequired | array of object | The other paid plans it can move to with `changeServerPlan`. Empty for a server prepaid in crypto. |
| attributes.plan_changes\[\].keyrequired | string |  |
| attributes.plan_changes\[\].directionrequired | one of 'up', 'down' |  |
| attributes.plan_changes\[\].charge_now_pencerequired | integer | Moving up, about what is charged now for the rest of the period. |
| attributes.plan_changes\[\].immediaterequired | any | Moving down now with a refund to the card. Null when moving up. |
| attributes.plan_changes\[\].immediate_to_creditrequired | any | Moving down now with a refund to account credit. Null when moving up. |
| attributes.upgrade_pending | boolean | Only in the answer to `changeServerPlan`. A move up was asked for but its charge must be paid first. |
| attributes.upgrade_payment_url | string (uri) \| null | Only in the answer to `changeServerPlan`. The invoice to pay for a pending move up. |
| attributes.statusrequired | string | Stripe's subscription status (e.g. `active`, `trialing`, `past_due`, `incomplete`, `canceled`), or `ended` once the plan is over and the server has been downgraded or suspended. |
| attributes.cancel_at_period_endrequired | boolean |  |
| attributes.current_period_endrequired | string (date-time) \| null |  |
| attributes.payment_issuerequired | object \| null | Set when the latest payment is outstanding and the customer can act on it. |
| attributes.payment_issue.typerequired | one of 'requires_action', 'failed' | `requires_action`: the bank wants it confirmed (3D Secure). `failed`: the card was declined. |
| attributes.payment_issue.urlrequired | string (uri) \| null | Stripe page where a person can complete the payment. |
| attributes.payment_issue.grace_ends_atrequired | string (date-time) \| null | When the server is suspended if the payment is still outstanding. |
| attributes.immediate_downgraderequired | object | Whether `cancelSubscriptionImmediately` would be allowed now, and what it would refund. |
| attributes.immediate_downgrade.availablerequired | boolean |  |
| attributes.immediate_downgrade.reasonrequired | one of 'no_payment', 'blackout', 'quota', 'too_small', 'prepaid', 'credit_plan', 'plan_changed', null | Why it is unavailable. `no_payment` still lets the plan be ended, just without a refund; `blackout`: renews too soon; `quota`: one used in the last 30 days; `too_small`: the refund would be under the minimum; `prepaid`: paid in crypto; `credit_plan`: paid from credit, so only a refund to credit is possible; `plan_changed`: it moved between paid plans since its last bill. |
| attributes.immediate_downgrade.refund_pencerequired | integer | Refund after the fee. |
| attributes.immediate_downgrade.fee_pencerequired | integer |  |
| attributes.immediate_downgrade.gross_pencerequired | integer | The unused part of the period before the fee. For `too_small`, this less `fee_pence` is the refund that was under the minimum. |
| attributes.immediate_downgrade.minimum_pencerequired | integer | The smallest refund sent, after the fee. |
| attributes.immediate_downgrade.available_atrequired | string (date-time) \| null | For `quota`, when the next immediate downgrade is allowed. |

Errors

- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

### Downgrade a server at the end of its billing period

POST`/billing/subscriptions/{serverUuid}/cancel`

Account scope billing.purchase

Schedules the server's paid plan to end at `current_period_end`; the server keeps its paid size until then and nothing is refunded. Reversible with `resumeSubscription` until that date. The owner is emailed. Returns 404 when the server is not the account's or has no live plan.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| serverUuidrequired | string (uuid) | The full UUID of a server the account owns (not the 8-character identifier). |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/subscriptions/{serverUuid}/cancel" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The plan's new state.

```
{
    "object": "server_subscription",
    "attributes": {
        "status": "active",
        "cancel_at_period_end": true,
        "current_period_end": "2026-11-01T12:00:00+00:00",
        "payment_issue": null,
        "immediate_downgrade": {
            "available": true,
            "reason": null,
            "refund_pence": 22,
            "fee_pence": 25,
            "gross_pence": 47,
            "minimum_pence": 5,
            "available_at": null
        }
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.planrequired | object | The paid plan the server is on. |
| attributes.plan.keyrequired | string |  |
| attributes.plan.namerequired | string |  |
| attributes.plan.price_pencerequired | integer |  |
| attributes.plan.limitsrequired | object |  |
| attributes.plan.limits.memory | integer |  |
| attributes.plan.limits.disk | integer |  |
| attributes.plan.limits.cpu | integer |  |
| attributes.scheduled_planrequired | object \| null | A smaller paid plan the server moves to at `current_period_end`. |
| attributes.scheduled_plan.key | string |  |
| attributes.scheduled_plan.name | string |  |
| attributes.scheduled_plan.price_pence | integer |  |
| attributes.plan_changesrequired | array of object | The other paid plans it can move to with `changeServerPlan`. Empty for a server prepaid in crypto. |
| attributes.plan_changes\[\].keyrequired | string |  |
| attributes.plan_changes\[\].directionrequired | one of 'up', 'down' |  |
| attributes.plan_changes\[\].charge_now_pencerequired | integer | Moving up, about what is charged now for the rest of the period. |
| attributes.plan_changes\[\].immediaterequired | any | Moving down now with a refund to the card. Null when moving up. |
| attributes.plan_changes\[\].immediate_to_creditrequired | any | Moving down now with a refund to account credit. Null when moving up. |
| attributes.upgrade_pending | boolean | Only in the answer to `changeServerPlan`. A move up was asked for but its charge must be paid first. |
| attributes.upgrade_payment_url | string (uri) \| null | Only in the answer to `changeServerPlan`. The invoice to pay for a pending move up. |
| attributes.statusrequired | string | Stripe's subscription status (e.g. `active`, `trialing`, `past_due`, `incomplete`, `canceled`), or `ended` once the plan is over and the server has been downgraded or suspended. |
| attributes.cancel_at_period_endrequired | boolean |  |
| attributes.current_period_endrequired | string (date-time) \| null |  |
| attributes.payment_issuerequired | object \| null | Set when the latest payment is outstanding and the customer can act on it. |
| attributes.payment_issue.typerequired | one of 'requires_action', 'failed' | `requires_action`: the bank wants it confirmed (3D Secure). `failed`: the card was declined. |
| attributes.payment_issue.urlrequired | string (uri) \| null | Stripe page where a person can complete the payment. |
| attributes.payment_issue.grace_ends_atrequired | string (date-time) \| null | When the server is suspended if the payment is still outstanding. |
| attributes.immediate_downgraderequired | object | Whether `cancelSubscriptionImmediately` would be allowed now, and what it would refund. |
| attributes.immediate_downgrade.availablerequired | boolean |  |
| attributes.immediate_downgrade.reasonrequired | one of 'no_payment', 'blackout', 'quota', 'too_small', 'prepaid', 'credit_plan', 'plan_changed', null | Why it is unavailable. `no_payment` still lets the plan be ended, just without a refund; `blackout`: renews too soon; `quota`: one used in the last 30 days; `too_small`: the refund would be under the minimum; `prepaid`: paid in crypto; `credit_plan`: paid from credit, so only a refund to credit is possible; `plan_changed`: it moved between paid plans since its last bill. |
| attributes.immediate_downgrade.refund_pencerequired | integer | Refund after the fee. |
| attributes.immediate_downgrade.fee_pencerequired | integer |  |
| attributes.immediate_downgrade.gross_pencerequired | integer | The unused part of the period before the fee. For `too_small`, this less `fee_pence` is the refund that was under the minimum. |
| attributes.immediate_downgrade.minimum_pencerequired | integer | The smallest refund sent, after the fee. |
| attributes.immediate_downgrade.available_atrequired | string (date-time) \| null | For `quota`, when the next immediate downgrade is allowed. |

Errors

- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

### Keep a server's plan after scheduling a downgrade

POST`/billing/subscriptions/{serverUuid}/resume`

Account scope billing.purchase

Undoes `cancelSubscription`, so the plan renews as normal at `current_period_end`. No charge. Returns 404 when the server is not the account's or has no live plan.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| serverUuidrequired | string (uuid) | The full UUID of a server the account owns (not the 8-character identifier). |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/subscriptions/{serverUuid}/resume" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The plan's new state.

```
{
    "object": "server_subscription",
    "attributes": {
        "status": "active",
        "cancel_at_period_end": false,
        "current_period_end": "2026-11-01T12:00:00+00:00",
        "payment_issue": null,
        "immediate_downgrade": {
            "available": true,
            "reason": null,
            "refund_pence": 22,
            "fee_pence": 25,
            "gross_pence": 47,
            "minimum_pence": 5,
            "available_at": null
        }
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.planrequired | object | The paid plan the server is on. |
| attributes.plan.keyrequired | string |  |
| attributes.plan.namerequired | string |  |
| attributes.plan.price_pencerequired | integer |  |
| attributes.plan.limitsrequired | object |  |
| attributes.plan.limits.memory | integer |  |
| attributes.plan.limits.disk | integer |  |
| attributes.plan.limits.cpu | integer |  |
| attributes.scheduled_planrequired | object \| null | A smaller paid plan the server moves to at `current_period_end`. |
| attributes.scheduled_plan.key | string |  |
| attributes.scheduled_plan.name | string |  |
| attributes.scheduled_plan.price_pence | integer |  |
| attributes.plan_changesrequired | array of object | The other paid plans it can move to with `changeServerPlan`. Empty for a server prepaid in crypto. |
| attributes.plan_changes\[\].keyrequired | string |  |
| attributes.plan_changes\[\].directionrequired | one of 'up', 'down' |  |
| attributes.plan_changes\[\].charge_now_pencerequired | integer | Moving up, about what is charged now for the rest of the period. |
| attributes.plan_changes\[\].immediaterequired | any | Moving down now with a refund to the card. Null when moving up. |
| attributes.plan_changes\[\].immediate_to_creditrequired | any | Moving down now with a refund to account credit. Null when moving up. |
| attributes.upgrade_pending | boolean | Only in the answer to `changeServerPlan`. A move up was asked for but its charge must be paid first. |
| attributes.upgrade_payment_url | string (uri) \| null | Only in the answer to `changeServerPlan`. The invoice to pay for a pending move up. |
| attributes.statusrequired | string | Stripe's subscription status (e.g. `active`, `trialing`, `past_due`, `incomplete`, `canceled`), or `ended` once the plan is over and the server has been downgraded or suspended. |
| attributes.cancel_at_period_endrequired | boolean |  |
| attributes.current_period_endrequired | string (date-time) \| null |  |
| attributes.payment_issuerequired | object \| null | Set when the latest payment is outstanding and the customer can act on it. |
| attributes.payment_issue.typerequired | one of 'requires_action', 'failed' | `requires_action`: the bank wants it confirmed (3D Secure). `failed`: the card was declined. |
| attributes.payment_issue.urlrequired | string (uri) \| null | Stripe page where a person can complete the payment. |
| attributes.payment_issue.grace_ends_atrequired | string (date-time) \| null | When the server is suspended if the payment is still outstanding. |
| attributes.immediate_downgraderequired | object | Whether `cancelSubscriptionImmediately` would be allowed now, and what it would refund. |
| attributes.immediate_downgrade.availablerequired | boolean |  |
| attributes.immediate_downgrade.reasonrequired | one of 'no_payment', 'blackout', 'quota', 'too_small', 'prepaid', 'credit_plan', 'plan_changed', null | Why it is unavailable. `no_payment` still lets the plan be ended, just without a refund; `blackout`: renews too soon; `quota`: one used in the last 30 days; `too_small`: the refund would be under the minimum; `prepaid`: paid in crypto; `credit_plan`: paid from credit, so only a refund to credit is possible; `plan_changed`: it moved between paid plans since its last bill. |
| attributes.immediate_downgrade.refund_pencerequired | integer | Refund after the fee. |
| attributes.immediate_downgrade.fee_pencerequired | integer |  |
| attributes.immediate_downgrade.gross_pencerequired | integer | The unused part of the period before the fee. For `too_small`, this less `fee_pence` is the refund that was under the minimum. |
| attributes.immediate_downgrade.minimum_pencerequired | integer | The smallest refund sent, after the fee. |
| attributes.immediate_downgrade.available_atrequired | string (date-time) \| null | For `quota`, when the next immediate downgrade is allowed. |

Errors

- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.

### Downgrade a server now with a pro-rata refund

POST`/billing/subscriptions/{serverUuid}/cancel-immediately`

Account scope billing.purchase Limited to 10 per hour

Ends the server's paid plan now and refunds the unused part of the current month, less what the payment provider charged to take the payment (including 2p per card attempt for fraud screening) plus 5p (the exact fee is read from Stripe). If that fee cannot be read the refund is refused with 400 and the user is pointed to support. The server then becomes a free server if the account has a free slot, and is suspended otherwise. Check `immediate_downgrade` in `GET /billing` first. Refused with 400 when the period renews in under 12 days, when the account already had one of these refunds in the last 30 days (`available_at` says when the next is allowed), or when the refund would be under 5p. If nothing was paid for the current period the plan still ends, without a refund. The owner is emailed about the refund.

Parameters

| Name | Type | Description |
| --- | --- | --- |
| serverUuidrequired | string (uuid) | The full UUID of a server the account owns (not the 8-character identifier). |

Example

```
curl -X POST "https://sillydev.co.uk/panel/api/client/billing/subscriptions/{serverUuid}/cancel-immediately" \
  -H "Authorization: Bearer $SILLYDEV_API_KEY" \
  -H "Accept: application/json"
```

Response 200The ended plan.

```
{
    "object": "server_subscription",
    "attributes": {
        "status": "ended",
        "cancel_at_period_end": false,
        "current_period_end": "2026-11-01T12:00:00+00:00",
        "payment_issue": null,
        "immediate_downgrade": {
            "available": false,
            "reason": "no_payment",
            "refund_pence": 0,
            "fee_pence": 0,
            "gross_pence": 0,
            "minimum_pence": 5,
            "available_at": null
        }
    }
}
```

**Every field in the response**

| Name | Type | Description |
| --- | --- | --- |
| objectrequired | string |  |
| attributesrequired | object |  |
| attributes.planrequired | object | The paid plan the server is on. |
| attributes.plan.keyrequired | string |  |
| attributes.plan.namerequired | string |  |
| attributes.plan.price_pencerequired | integer |  |
| attributes.plan.limitsrequired | object |  |
| attributes.plan.limits.memory | integer |  |
| attributes.plan.limits.disk | integer |  |
| attributes.plan.limits.cpu | integer |  |
| attributes.scheduled_planrequired | object \| null | A smaller paid plan the server moves to at `current_period_end`. |
| attributes.scheduled_plan.key | string |  |
| attributes.scheduled_plan.name | string |  |
| attributes.scheduled_plan.price_pence | integer |  |
| attributes.plan_changesrequired | array of object | The other paid plans it can move to with `changeServerPlan`. Empty for a server prepaid in crypto. |
| attributes.plan_changes\[\].keyrequired | string |  |
| attributes.plan_changes\[\].directionrequired | one of 'up', 'down' |  |
| attributes.plan_changes\[\].charge_now_pencerequired | integer | Moving up, about what is charged now for the rest of the period. |
| attributes.plan_changes\[\].immediaterequired | any | Moving down now with a refund to the card. Null when moving up. |
| attributes.plan_changes\[\].immediate_to_creditrequired | any | Moving down now with a refund to account credit. Null when moving up. |
| attributes.upgrade_pending | boolean | Only in the answer to `changeServerPlan`. A move up was asked for but its charge must be paid first. |
| attributes.upgrade_payment_url | string (uri) \| null | Only in the answer to `changeServerPlan`. The invoice to pay for a pending move up. |
| attributes.statusrequired | string | Stripe's subscription status (e.g. `active`, `trialing`, `past_due`, `incomplete`, `canceled`), or `ended` once the plan is over and the server has been downgraded or suspended. |
| attributes.cancel_at_period_endrequired | boolean |  |
| attributes.current_period_endrequired | string (date-time) \| null |  |
| attributes.payment_issuerequired | object \| null | Set when the latest payment is outstanding and the customer can act on it. |
| attributes.payment_issue.typerequired | one of 'requires_action', 'failed' | `requires_action`: the bank wants it confirmed (3D Secure). `failed`: the card was declined. |
| attributes.payment_issue.urlrequired | string (uri) \| null | Stripe page where a person can complete the payment. |
| attributes.payment_issue.grace_ends_atrequired | string (date-time) \| null | When the server is suspended if the payment is still outstanding. |
| attributes.immediate_downgraderequired | object | Whether `cancelSubscriptionImmediately` would be allowed now, and what it would refund. |
| attributes.immediate_downgrade.availablerequired | boolean |  |
| attributes.immediate_downgrade.reasonrequired | one of 'no_payment', 'blackout', 'quota', 'too_small', 'prepaid', 'credit_plan', 'plan_changed', null | Why it is unavailable. `no_payment` still lets the plan be ended, just without a refund; `blackout`: renews too soon; `quota`: one used in the last 30 days; `too_small`: the refund would be under the minimum; `prepaid`: paid in crypto; `credit_plan`: paid from credit, so only a refund to credit is possible; `plan_changed`: it moved between paid plans since its last bill. |
| attributes.immediate_downgrade.refund_pencerequired | integer | Refund after the fee. |
| attributes.immediate_downgrade.fee_pencerequired | integer |  |
| attributes.immediate_downgrade.gross_pencerequired | integer | The unused part of the period before the fee. For `too_small`, this less `fee_pence` is the refund that was under the minimum. |
| attributes.immediate_downgrade.minimum_pencerequired | integer | The smallest refund sent, after the fee. |
| attributes.immediate_downgrade.available_atrequired | string (date-time) \| null | For `quota`, when the next immediate downgrade is allowed. |

Errors

- 400 An immediate downgrade is not allowed right now; the message says why and what to do instead.
- 401 No API key was sent, or it is wrong, expired or deleted.
- 403 The key is valid but may not do this: it lacks the permission or account scope, it is limited to other servers or IP addresses, or the account may not do it at all.
- 404 There is no such resource, or the key cannot see it. Features that are switched off answer 404 too.
- 429 Too many requests. Wait for the number of seconds in the `Retry-After` header, then try again.
