Open payment-method portal
curl --request POST \
--url https://api.truthlocks.com/v1/billing/portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"return_url": "https://console.truthlocks.com/settings/billing"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({return_url: 'https://console.truthlocks.com/settings/billing'})
};
fetch('https://api.truthlocks.com/v1/billing/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/portal"
payload = { "return_url": "https://console.truthlocks.com/settings/billing" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/portal"
payload := strings.NewReader("{\n \"return_url\": \"https://console.truthlocks.com/settings/billing\"\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))
}{
"portal_url": "<string>"
}Billing
Open payment-method portal
Create a short-lived Stripe portal link for a signed-in billing account.
POST
/
v1
/
billing
/
portal
Open payment-method portal
curl --request POST \
--url https://api.truthlocks.com/v1/billing/portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"return_url": "https://console.truthlocks.com/settings/billing"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({return_url: 'https://console.truthlocks.com/settings/billing'})
};
fetch('https://api.truthlocks.com/v1/billing/portal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/portal"
payload = { "return_url": "https://console.truthlocks.com/settings/billing" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/portal"
payload := strings.NewReader("{\n \"return_url\": \"https://console.truthlocks.com/settings/billing\"\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))
}{
"portal_url": "<string>"
}Use this action from Console → Settings → Billing → Payment methods or your
consumer billing page. It requires a signed-in human session. API keys cannot open
a customer portal. Business workspaces require an active workspace administrator
or a tenant-wide role with billing-management permission.
For a usage-based workspace without a linked Stripe customer, the explicit portal
request initializes and links that customer using the verified account email.
Opening the portal does not charge a card, create a subscription, or change the plan.
Request
Setprovider to stripe (the default). Flutterwave does not currently provide a
self-service portal through this endpoint. Paystack is not supported here.
Set return_url to an HTTPS address on console.truthlocks.com for a business
session or verify.truthlocks.com for a consumer session. Other hosts are rejected.
Response
portal_url is a short-lived Stripe link. Open it to add or update payment details
and view available Stripe invoices. Truthlocks’ payment-method portal configuration
does not enable subscription changes or cancellation; use the appropriate billing
page for those actions. Treat this link as private and request a fresh one each time.
Errors
Errors return JSON withcode and error. 403 means the signed-in person cannot
manage this billing account. 422 identifies an unsupported provider. 502 or
503 indicates a provider or account-service failure; the message explains the
next step. A failed account lookup does not create another provider customer.Body
application/json

