Browse the API reference

Create Payment Checkout Session

post/v1/billing/checkout

Part 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-Key header.
  • Bearer token in the Authorization header.

Request body

Required, application/json.

FieldTypeDescription
plan_namerequiredstring

Billing plan name (e.g., 'ladybug-standard')

resource_typerequiredstring

Resource type ('graph' or 'repository')

resource_configrequiredobject

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
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

FieldTypeDescription
checkout_urloptionalstring

URL to redirect user to for payment

session_idoptionalstring

Checkout session ID for status polling

subscription_idoptionalstring

Internal subscription ID

requires_checkoutoptionalboolean

Whether checkout is required

Default: true

billing_disabledoptionalboolean

Whether billing is disabled on this instance

Default: false

StatusMeaning
400Invalid request
401Authentication required
402Payment required
403Access denied
422Validation Error
429Rate limit exceeded
500Internal server error