---
title: "Create Payment Checkout Session"
method: POST
path: "/v1/billing/checkout"
tags: ["Billing"]
---

# Create Payment Checkout Session

`POST /v1/billing/checkout`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/v1/billing/checkout`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

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.

## Request body

- CreateCheckoutRequest: Request to create a checkout session for payment collection.
  - `plan_name` string, required: Billing plan name (e.g., 'ladybug-standard')
  - `resource_type` string, required: Resource type ('graph' or 'repository')
  - `resource_config` object, required: Configuration for the resource to be provisioned. For repositories: {'repository_name': 'graph_id'} where graph_id is the repository slug (e.g., 'sec')

## Response `201`

Successful Response

- CheckoutResponse: Response from checkout session creation.
  - `checkout_url` string, nullable: URL to redirect user to for payment
  - `session_id` string, nullable: Checkout session ID for status polling
  - `subscription_id` string, nullable: Internal subscription ID
  - `requires_checkout` boolean: Whether checkout is required
  - `billing_disabled` boolean: Whether billing is disabled on this instance

## Other responses

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

---

[API](https://skmtc.dev/robosystems/apis/robosystems-api.md) · [All operations](https://skmtc.dev/robosystems/apis/robosystems-api/llms.txt) · [OpenAPI document](https://skmtc.dev/robosystems/apis/robosystems-api/revisions/e661e2d5ca6a?raw)
