SDK reference · Python SDK
prov.account.billing_portal
prov.account.billing_portal in Python SDK.
Signature
prov.account.billing_portal() -> AnyParameters
No parameters.
Request fields
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
Returns
Any The customer portal URL.
HTTP operation
POST /v1/account/billing_portal: Open the billing portal
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/billing_portal`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/account/billing_portal", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()