Create Payment Checkout Session
/v1/billing/checkoutPart of Billing.
Initiates a Stripe checkout session for payment collection. Creates a pending subscription; the webhook activates it and provisions the resource after payment completes. Returns billing_disabled=true with no URL when billing is off. Requires org owner role.
Authentication
Authenticate in any one of these ways — not all of them:
- API key in the
X-API-Keyheader. - Bearer token in the
Authorizationheader.
Request body
Required, application/json.
| Field | Type | Description |
|---|---|---|
plan_namerequired | string | Billing plan name (e.g., 'ladybug-standard') |
resource_typerequired | string | Resource type ('graph' or 'repository') |
resource_configrequired | object | Configuration for the resource to be provisioned. For repositories: {'repository_name': 'graph_id'} where graph_id is the repository slug (e.g., 'sec') |
Example request
curl -X POST "https://api.robosystems.ai/v1/billing/checkout" \
-H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plan_name": "string",
"resource_type": "string",
"resource_config": {}
}'Responses
201 Successful Response
| Field | Type | Description |
|---|---|---|
checkout_urloptional | string | URL to redirect user to for payment |
session_idoptional | string | Checkout session ID for status polling |
subscription_idoptional | string | Internal subscription ID |
requires_checkoutoptional | boolean | Whether checkout is required Default: |
billing_disabledoptional | boolean | Whether billing is disabled on this instance Default: |
| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Authentication required |
| 402 | Payment required |
| 403 | Access denied |
| 422 | Validation Error |
| 429 | Rate limit exceeded |
| 500 | Internal server error |