curl --request POST \
--url https://app.base44.com/api/billing/preview-upgrade/{price_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/billing/preview-upgrade/{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/preview-upgrade/{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/preview-upgrade/{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/preview-upgrade/{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/preview-upgrade/{price_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/preview-upgrade/{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{
"prorated_amount_due": 12.5,
"currency": "usd",
"next_billing_date": 1767225600,
"recurring_amount": 50,
"billing_interval": "month",
"full_diff": false
}Preview plan change
Shows what upgrading your workspace to another plan costs, without changing or charging anything. Pass the price ID of the plan you’re considering, from price_ids in List plans. Only the workspace owner can preview.
The preview mirrors Change plan: prorated_amount_due is what that call charges now, and recurring_amount is what the new plan costs at each renewal. It previews upgrades only. A downgrade returns 400, because a downgrade charges nothing now and takes effect at the end of the billing period.
This previews plans billed through Stripe. For a workspace billed through Wix, use Preview Wix plan change. A Wix-billed workspace can still get a result here, but it doesn’t apply to its plan.
The base rate limit is 20 requests per minute per user. See Rate limits for the multiplier your plan gets.
curl --request POST \
--url https://app.base44.com/api/billing/preview-upgrade/{price_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/billing/preview-upgrade/{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/preview-upgrade/{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/preview-upgrade/{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/preview-upgrade/{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/preview-upgrade/{price_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/preview-upgrade/{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{
"prorated_amount_due": 12.5,
"currency": "usd",
"next_billing_date": 1767225600,
"recurring_amount": 50,
"billing_interval": "month",
"full_diff": 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 preview, from price_ids in List plans.
Response
What the upgrade costs now and at renewal.
What an upgrade costs now and at renewal.
Amount Change plan charges now for this upgrade, in major units of currency (dollars, not cents). When full_diff is true, this is the full price difference rather than a prorated amount.
12.5
Lowercase three-letter currency code of both amounts.
"usd"
When the new plan next renews, as a Unix timestamp in seconds.
1767225600
What the new plan costs at each renewal, in major units of currency.
50
How often the new plan renews: month or year.
"month"
true when prorated_amount_due is the full price difference between the plans, not a prorated share of it.
false
Was this page helpful?