Skip to content
POST /billing/portal-session

Request Body

return_urlstring

Must be a URL on this deployment's app origin. Defaults to the Billing settings page.

team_idstring · uuid

Response Body

urlstring
Example: https://billing.stripe.com/p/session/test_abc
curl -X POST 'https://api.truto.one/billing/portal-session' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "team_id": "your_team_id",
  "return_url": "your_return_url"
}'
const body = {
  "team_id": "your_team_id",
  "return_url": "your_return_url"
};

const response = await fetch('https://api.truto.one/billing/portal-session', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/billing/portal-session"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "team_id": "your_team_id",
    "return_url": "your_return_url"
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())