---
title: "Get subscription URL for checkout session"
method: GET
path: "/api/{org_id}/billings/hosted_subscription_url"
tags: ["Billings"]
---

# Get subscription URL for checkout session

`GET /api/{org_id}/billings/hosted_subscription_url`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/billings/hosted_subscription_url`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/billings/hosted_subscription_url/get.ts> (a function with typed inputs; its response is checked against the schema)

Creates a checkout session URL for subscription upgrades and billing management

## Path parameters

- `org_id` string, required

## Query parameters

- `plan` string, required

## Response `200`

Success

- StripeCheckoutSession
  - `amount_subtotal` integer, nullable
  - `amount_total` integer, nullable
  - `cancel_url` string, nullable
  - `client_reference_id` string, nullable
  - `created` integer, required
  - `currency` string, nullable
  - `customer_email` string, nullable
  - `expires_at` integer, required
  - `id` string, required
  - `livemode` boolean, required
  - `metadata` object, nullable
  - `mode` string, required
  - `payment_method_types` string[], required
  - `payment_status` string, required
  - `status` string, nullable
  - `success_url` string, nullable
  - `url` string, nullable

## Other responses

- `302`: Redirects to the checkout URL: under 1024 bytes it is in Location and the body is empty; at 1024 bytes or more there is no Location and the body is a text/html refresh page to it
- `404`: NotFound
- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
