curl --request POST \
--url https://app.base44.com/api/billing/dynamic-offering/preview-subscription \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"new_product_id": "5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63",
"period_unit": "MONTH"
}
'import requests
url = "https://app.base44.com/api/billing/dynamic-offering/preview-subscription"
payload = {
"new_product_id": "5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63",
"period_unit": "MONTH"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({new_product_id: '5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63', period_unit: 'MONTH'})
};
fetch('https://app.base44.com/api/billing/dynamic-offering/preview-subscription', 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/dynamic-offering/preview-subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'new_product_id' => '5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63',
'period_unit' => 'MONTH'
]),
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://app.base44.com/api/billing/dynamic-offering/preview-subscription"
payload := strings.NewReader("{\n \"new_product_id\": \"5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63\",\n \"period_unit\": \"MONTH\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.base44.com/api/billing/dynamic-offering/preview-subscription")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"new_product_id\": \"5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63\",\n \"period_unit\": \"MONTH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/dynamic-offering/preview-subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"new_product_id\": \"5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63\",\n \"period_unit\": \"MONTH\"\n}"
response = http.request(request)
puts response.read_body{
"prorated_amount_due": 18.5,
"currency": "usd",
"recurring_amount": 50,
"next_billing_date": 1763971200,
"billing_interval": "month",
"card_last4": "4242"
}{
"detail": [
{
"type": "literal_error",
"loc": [
"body",
"period_unit"
],
"msg": "Input should be 'MONTH' or 'YEAR'",
"input": "WEEK",
"ctx": {
"expected": "'MONTH' or 'YEAR'"
}
}
]
}Preview Wix plan change
Shows what an upgrade with Change Wix plan would charge, without changing or charging anything. Send the same new_product_id and period_unit you plan to send there. Only the workspace owner can preview.
Only upgrades can be previewed. A downgrade returns 400, because it charges nothing now and takes effect at the end of the billing period.
This works only for workspaces billed through Wix. For a Stripe-billed workspace, use Preview plan change. Wix billing is still rolling out, so this can return 404 for your account.
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/dynamic-offering/preview-subscription \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"new_product_id": "5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63",
"period_unit": "MONTH"
}
'import requests
url = "https://app.base44.com/api/billing/dynamic-offering/preview-subscription"
payload = {
"new_product_id": "5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63",
"period_unit": "MONTH"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({new_product_id: '5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63', period_unit: 'MONTH'})
};
fetch('https://app.base44.com/api/billing/dynamic-offering/preview-subscription', 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/dynamic-offering/preview-subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'new_product_id' => '5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63',
'period_unit' => 'MONTH'
]),
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://app.base44.com/api/billing/dynamic-offering/preview-subscription"
payload := strings.NewReader("{\n \"new_product_id\": \"5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63\",\n \"period_unit\": \"MONTH\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.base44.com/api/billing/dynamic-offering/preview-subscription")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"new_product_id\": \"5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63\",\n \"period_unit\": \"MONTH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/dynamic-offering/preview-subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"new_product_id\": \"5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63\",\n \"period_unit\": \"MONTH\"\n}"
response = http.request(request)
puts response.read_body{
"prorated_amount_due": 18.5,
"currency": "usd",
"recurring_amount": 50,
"next_billing_date": 1763971200,
"billing_interval": "month",
"card_last4": "4242"
}{
"detail": [
{
"type": "literal_error",
"loc": [
"body",
"period_unit"
],
"msg": "Input should be 'MONTH' or 'YEAR'",
"input": "WEEK",
"ctx": {
"expected": "'MONTH' or 'YEAR'"
}
}
]
}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.
Body
Wix product of the plan to preview, from wix_product_id in List plans.
1 - 100"5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63"
Billing period of the new plan: MONTH or YEAR.
MONTH, YEAR "MONTH"
Response
What the upgrade costs now and at renewal.
What a Wix plan upgrade costs now and at renewal.
Amount Change Wix plan charges now for this upgrade, in major units of currency (dollars, not cents).
18.5
Lowercase three-letter currency code of both amounts.
"usd"
What the new plan costs at each renewal, in major units of currency.
50
When the new plan next renews, as a Unix timestamp in seconds.
1763971200
How often the new plan renews: month or year.
month, year "month"
Last four digits of the card that would be charged, or the wallet's name for a wallet such as Apple Pay. null when Wix doesn't report one.
"4242"
Was this page helpful?