Update billing cycle and due date
curl --request PUT \
--url https://{domain}/api/application/services/{service}/billing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billing_cycle": "quarterly",
"due_date": "2026-12-16"
}
'import requests
url = "https://{domain}/api/application/services/{service}/billing"
payload = {
"billing_cycle": "quarterly",
"due_date": "2026-12-16"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({billing_cycle: 'quarterly', due_date: '2026-12-16'})
};
fetch('https://{domain}/api/application/services/{service}/billing', 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://{domain}/api/application/services/{service}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'billing_cycle' => 'quarterly',
'due_date' => '2026-12-16'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{domain}/api/application/services/{service}/billing"
payload := strings.NewReader("{\n \"billing_cycle\": \"quarterly\",\n \"due_date\": \"2026-12-16\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{domain}/api/application/services/{service}/billing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"billing_cycle\": \"quarterly\",\n \"due_date\": \"2026-12-16\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/application/services/{service}/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"billing_cycle\": \"quarterly\",\n \"due_date\": \"2026-12-16\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 908,
"name": "Managed VPS - Jane Cooper",
"status": "pending",
"module": null,
"price": 14.99,
"original_price": null,
"modified_pricing": null,
"billing_cycle": "quarterly",
"due_date": "2026-12-16T00:00:00.000000Z",
"auto_renewal_enabled": false,
"provisioned_at": null,
"addons": [],
"created_at": "2026-11-16T14:33:49.000000Z",
"updated_at": "2026-11-16T14:33:50.000000Z"
},
"message": "Service billing updated.",
"meta": {
"request_id": "e1e0bb86-87a4-47b0-83bb-d96c5360cf0b"
}
}Billing
Update billing cycle and due date
Changes the billing cycle and next due date.
Permission: services.billing.update
PUT
/
services
/
{service}
/
billing
Update billing cycle and due date
curl --request PUT \
--url https://{domain}/api/application/services/{service}/billing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"billing_cycle": "quarterly",
"due_date": "2026-12-16"
}
'import requests
url = "https://{domain}/api/application/services/{service}/billing"
payload = {
"billing_cycle": "quarterly",
"due_date": "2026-12-16"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({billing_cycle: 'quarterly', due_date: '2026-12-16'})
};
fetch('https://{domain}/api/application/services/{service}/billing', 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://{domain}/api/application/services/{service}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'billing_cycle' => 'quarterly',
'due_date' => '2026-12-16'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{domain}/api/application/services/{service}/billing"
payload := strings.NewReader("{\n \"billing_cycle\": \"quarterly\",\n \"due_date\": \"2026-12-16\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{domain}/api/application/services/{service}/billing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"billing_cycle\": \"quarterly\",\n \"due_date\": \"2026-12-16\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/application/services/{service}/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"billing_cycle\": \"quarterly\",\n \"due_date\": \"2026-12-16\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 908,
"name": "Managed VPS - Jane Cooper",
"status": "pending",
"module": null,
"price": 14.99,
"original_price": null,
"modified_pricing": null,
"billing_cycle": "quarterly",
"due_date": "2026-12-16T00:00:00.000000Z",
"auto_renewal_enabled": false,
"provisioned_at": null,
"addons": [],
"created_at": "2026-11-16T14:33:49.000000Z",
"updated_at": "2026-11-16T14:33:50.000000Z"
},
"message": "Service billing updated.",
"meta": {
"request_id": "e1e0bb86-87a4-47b0-83bb-d96c5360cf0b"
}
}Authorizations
Body
application/json
Was this page helpful?

