curl --request POST \
--url https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uuid": "a216c52c-ccea-430f-b3bf-09aaf1025a44",
"provider": "paddle",
"status": "active",
"is_healthy": true,
"is_cancelled": false,
"is_ending": true,
"description": "Standard 4 GB · Kansas City, MO · Monthly",
"billing_cycle": "monthly",
"amount": "12.00",
"currency": "USD",
"next_charge_at": null,
"ends_at": "2026-10-02T19:15:08+00:00",
"cancelled_at": null,
"last_paid_at": "2026-09-02T19:15:08+00:00",
"can_cancel": false,
"services": [
{
"service_id": 7312,
"name": "Standard 4 GB",
"hostname": "lambda-core.blackmesa.example.com",
"status": "Active",
"next_due_date": "2026-10-02",
"server_id": "ecc6f4f1",
"server": {
"id": "ecc6f4f1",
"name": "lambda-core",
"hostname": "lambda-core.blackmesa.example.com",
"location": "Kansas City, MO",
"windows": false,
"template_name": "Ubuntu 24.04",
"template_icon_url": "https://img.icons8.com/color/48/ubuntu.png"
},
"is_known": true
}
],
"cancellation_service_id": null
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Cancel an automatic payment
Overview
Stops a subscription at the end of its paid period. The service continues to run, and future invoices must be paid manually. To stop the service, use the service cancellation endpoint. can_cancel indicates whether cancellation is allowed. Subscriptions belonging to another account return 404.
Permissions
Requires the account permission billing.manage (Manage billing).
curl --request POST \
--url https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.advinservers.com/api/v1/client/billing/subscriptions/{subscription}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uuid": "a216c52c-ccea-430f-b3bf-09aaf1025a44",
"provider": "paddle",
"status": "active",
"is_healthy": true,
"is_cancelled": false,
"is_ending": true,
"description": "Standard 4 GB · Kansas City, MO · Monthly",
"billing_cycle": "monthly",
"amount": "12.00",
"currency": "USD",
"next_charge_at": null,
"ends_at": "2026-10-02T19:15:08+00:00",
"cancelled_at": null,
"last_paid_at": "2026-09-02T19:15:08+00:00",
"can_cancel": false,
"services": [
{
"service_id": 7312,
"name": "Standard 4 GB",
"hostname": "lambda-core.blackmesa.example.com",
"status": "Active",
"next_due_date": "2026-10-02",
"server_id": "ecc6f4f1",
"server": {
"id": "ecc6f4f1",
"name": "lambda-core",
"hostname": "lambda-core.blackmesa.example.com",
"location": "Kansas City, MO",
"windows": false,
"template_name": "Ubuntu 24.04",
"template_icon_url": "https://img.icons8.com/color/48/ubuntu.png"
},
"is_known": true
}
],
"cancellation_service_id": null
}{
"message": "Unauthenticated."
}{
"message": "This API key is not allowed to do that in this team. It needs the \"snapshot.delete\" permission."
}{
"message": "Not found."
}{
"message": "The name field is required.",
"errors": {}
}{
"message": "Too Many Attempts."
}Authorizations
Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.
Path Parameters
The subscription ID.
"a216c52c-ccea-430f-b3bf-09aaf1025a44"
Response
The record, as a JSON object. There is no envelope.
One standing arrangement to charge the customer again.
The uuid UUID.
"a216c52c-ccea-430f-b3bf-09aaf1025a44"
The value of provider.
"paddle"
The payment provider's current status.
"active"
Whether the resource is healthy.
true
Whether the resource is cancelled.
false
Whether the resource is ending.
false
What it was bought as. The fallback name for a row whose services have gone away.
"Standard 4 GB · Kansas City, MO · Monthly"
How often the service renews and is billed.
"monthly"
The amount in the currency shown by currency.
"12.00"
The three-letter currency code used for monetary amounts.
"USD"
The next charge date, or null if no further payments are scheduled. Ending subscriptions have no next charge date. If the payment provider has not reported a date, this is the next due date of the earliest service covered.
"2026-10-02T19:15:08+00:00"
When the agreed cancellation actually takes effect.
null
The date and time for cancelled at, in UTC.
null
The date and time for last paid at, in UTC.
"2026-09-02T19:15:08+00:00"
Whether the subscription can still be cancelled through its payment provider.
true
The value of services.
Show child attributes
Show child attributes
[
{
"service_id": 7312,
"name": "Standard 4 GB",
"hostname": "lambda-core.blackmesa.example.com",
"status": "Active",
"next_due_date": "2026-10-02",
"server_id": "ecc6f4f1",
"server": {
"id": "ecc6f4f1",
"name": "lambda-core",
"hostname": "lambda-core.blackmesa.example.com",
"location": "Kansas City, MO",
"windows": false,
"template_name": "Ubuntu 24.04",
"template_icon_url": "https://img.icons8.com/color/48/ubuntu.png"
},
"is_known": true
}
]
For external payments, use the service autopay cancellation endpoint.
null