curl --request POST \
--url https://app.base44.com/api/billing/create-update-payment-method-portal-session \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/billing/create-update-payment-method-portal-session"
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/create-update-payment-method-portal-session', 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/create-update-payment-method-portal-session",
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/create-update-payment-method-portal-session"
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/create-update-payment-method-portal-session")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/create-update-payment-method-portal-session")
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{
"url": "https://manage.wix.com/account/billing/payment-methods?token=7c1e9f2a4b8d4e6f9a3c5b7d1e2f4a6c"
}{
"detail": [
{
"type": "bool_parsing",
"loc": [
"query",
"open_other_payment_methods_tab"
],
"msg": "Input should be a valid boolean, unable to interpret input",
"input": "maybe"
}
]
}Create payment method update session
Creates a link to the Wix page where the workspace owner replaces the payment method that pays for a Wix-billed plan. The link opens a hosted page: open it in a browser, and the owner changes the card there. The page doesn’t send them back to Base44 afterwards. You can’t change the card through the API. Only the workspace owner can create the link.
Set open_other_payment_methods_tab to true to open the page on adding a new payment method instead of editing the current one.
This works only for workspaces billed through Wix. For a Stripe-billed workspace, use Create billing portal session with flow_type set to payment_method_update. Wix billing is still rolling out, so this can return 404 for your account.
The base rate limit is 20 requests per hour per user. See Rate limits for the multiplier your plan gets.
curl --request POST \
--url https://app.base44.com/api/billing/create-update-payment-method-portal-session \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/billing/create-update-payment-method-portal-session"
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/create-update-payment-method-portal-session', 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/create-update-payment-method-portal-session",
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/create-update-payment-method-portal-session"
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/create-update-payment-method-portal-session")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/billing/create-update-payment-method-portal-session")
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{
"url": "https://manage.wix.com/account/billing/payment-methods?token=7c1e9f2a4b8d4e6f9a3c5b7d1e2f4a6c"
}{
"detail": [
{
"type": "bool_parsing",
"loc": [
"query",
"open_other_payment_methods_tab"
],
"msg": "Input should be a valid boolean, unable to interpret input",
"input": "maybe"
}
]
}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.
Query Parameters
true opens the page on adding a new payment method instead of editing the current one. Defaults to false.
Response
A link to the Wix payment method page.
A hosted billing page for a person to open.
Link to a hosted page. Open it in a browser for a person to finish there. Some links work only once or expire, so open it right away and don't store it.
"https://billing.stripe.com/p/session/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL"
Was this page helpful?