curl --request POST \
--url https://app.base44.com/api/billing/update-subscription/{price_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/billing/update-subscription/{price_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/billing/update-subscription/{price_id}', 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://app.base44.com/api/billing/update-subscription/{price_id}",
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://app.base44.com/api/billing/update-subscription/{price_id}"
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://app.base44.com/api/billing/update-subscription/{price_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/update-subscription/{price_id}")
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{
"success": true,
"subscription": {
"id": "sub_1QxYzAbCdEfGhIjK",
"status": "active",
"is_downgrade": false,
"billing_period_change": false
}
}Change plan
Moves your workspace’s paid plan to another plan. Pass the price ID of the new plan, from price_ids in List plans. Only the workspace owner can change the plan.
A downgrade charges nothing now. It’s scheduled for the end of the billing period, and you can undo it with Cancel scheduled plan change. Either change also clears a pending cancellation, so the plan renews again.
success: false doesn’t mean the change failed. The upgrade is already applied, and its charge needs the payer to act. Send them to payment_action_url. Until they pay, the invoice stays open.This works for plans billed through Stripe. If the workspace is billed through Wix, this returns 409 workspace_billed_through_wix. Use Change Wix plan instead.
The base rate limit is 10 requests per hour per user. See Rate limits for the multiplier your plan gets.
curl --request POST \
--url https://app.base44.com/api/billing/update-subscription/{price_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/billing/update-subscription/{price_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/billing/update-subscription/{price_id}', 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://app.base44.com/api/billing/update-subscription/{price_id}",
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://app.base44.com/api/billing/update-subscription/{price_id}"
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://app.base44.com/api/billing/update-subscription/{price_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/update-subscription/{price_id}")
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{
"success": true,
"subscription": {
"id": "sub_1QxYzAbCdEfGhIjK",
"status": "active",
"is_downgrade": false,
"billing_period_change": false
}
}Authorizations
Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.
Path Parameters
Price ID of the plan to move to, from price_ids in List plans.
Response
The plan change, applied now or scheduled.
The outcome of a plan change.
true when the change is complete. false when an upgrade is already applied but its charge needs the payer to act, for example to confirm the payment with their bank.
true
Stripe page where the payer completes the charge when success is false. null when no action is needed. It can also be null when success is false. Then find the open invoice with Get billing info.
"https://invoice.stripe.com/i/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL"
The subscription after the change.
Show child attributes
Show child attributes
Was this page helpful?