SDK reference · Node SDK
prov.account.upgradeSession
prov.account.upgradeSession in Node SDK. Billing go-live: a Stripe Checkout URL to upgrade this account to Growth (owner/admin).
Signature
prov.account.upgradeSession(): Promise<CheckoutSession>Parameters
No parameters.
Request fields
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
planenum- The plan to buy. One of
pro,growth. intervalenum- Monthly or yearly billing. One of
monthly,yearly. seatsinteger- Extra seats beyond the plan's included ones.
Returns
Promise<CheckoutSession> The Stripe Checkout URL.
HTTP operation
POST /v1/account/upgrade_session: Start an upgrade
Errors
- authentication_required
- billing_not_configured
- insufficient_role
- parameter_invalid
- rate_limit_exceeded
- recent_two_factor_required
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/upgrade_session`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "plan": "pro", "interval": "monthly" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/account/upgrade_session", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"plan": "pro",
"interval": "monthly"
}).json()