Skip to content

Create a Stripe Checkout session to start or resume billing

  • Method: POST
  • Path: /v1/orgs/{org}/billing/checkout-session
  • Operation ID: createBillingCheckoutSession
  • 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.
Name Type Required Description
Idempotency-Key string, nullable No
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/checkout-session" \
  -H "Authorization: Bearer $VIRTSCALE_API_KEY"