- Method:
POST
- Path:
/v1/orgs/{org}/billing/portal-session
- Operation ID:
createBillingPortalSession
- Tag: Billing
Send Authorization: Bearer <credential>. The credential is either an API key (vsk_…) created for an organization, or an OIDC access token obtained by signing in to VirtScale.
| Name |
Type |
Required |
Description |
org |
string (uuid) |
Yes |
The organization’s id. |
| Field |
Type |
Required |
Enum |
Description |
url |
string |
Yes |
|
|
Every error response is application/problem+json (schema Problem).
| Status |
Meaning |
| 401 |
The credential is missing or invalid. |
| 403 |
The credential does not have permission to perform this operation. |
| 404 |
The resource does not exist. |
| 503 |
Stripe is unavailable to this request, as application/problem+json. code distinguishes the reasons: billing_unconfigured (this deployment has no Stripe API key or redirect URLs), billing_not_bootstrapped (the ceremony has not run, so there are no price ids / no portal configuration), or stripe_unreachable (Stripe itself refused or could not be reached – retry). |
| default |
Any other status is possible; the code field identifies the error. |
curl -X POST "https://api.virtscale.nl/v1/orgs/$ORG_ID/billing/portal-session" \
-H "Authorization: Bearer $VIRTSCALE_API_KEY"