View as Markdown

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

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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.