---
title: "Create a provider-neutral hosted subscription Checkout"
description: "POST /admin/v1/workspace-accesses/{accessId}/billing-checkouts — Create a provider-neutral hosted subscription Checkout"
---

> Documentation Index
> Fetch the complete documentation index at: https://nexus.microvoid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a provider-neutral hosted subscription Checkout

## Endpoint

```http
POST /admin/v1/workspace-accesses/{accessId}/billing-checkouts
```

Operation ID: `createCheckout`

## Authentication

Send a Nexus Management Key as `Authorization: Bearer <management-key>`. This credential is control-plane only.

## Idempotency

This operation requires `Idempotency-Key`. Reuse the same caller-owned value only when retrying the same logical command.

## Request

### Parameters

| Name              | Location | Required | Schema   | Description                       |
| ----------------- | -------- | -------- | -------- | --------------------------------- |
| `accessId`        | path     | Yes      | `string` | —                                 |
| `Idempotency-Key` | header   | Yes      | `string` | Access-scoped Checkout retry key. |

### application/json body

Required: **Yes**

Type: `CreateBillingCheckoutDto`

| Field                 | Required | Type           | Description |
| --------------------- | -------- | -------------- | ----------- |
| `billingConnectionId` | Yes      | `string`       | —           |
| `planKey`             | Yes      | `string`       | —           |
| `successUrl`          | Yes      | `string / uri` | —           |

## Responses

| Status | Description | Content type     | Schema               |
| ------ | ----------- | ---------------- | -------------------- |
| `201`  | —           | application/json | `BillingCheckoutDto` |

Only responses explicitly declared by the accepted Admin OpenAPI contract are shown. The current contract does not declare operation-specific error bodies; the SDK preserves any non-success status and body in [`AdminApiError`](/management-sdk/error-handling).

### `201` application/json schema

Type: `BillingCheckoutDto`

| Field         | Required | Type                       | Description |
| ------------- | -------- | -------------------------- | ----------- |
| `id`          | Yes      | `string`                   | —           |
| `provider`    | Yes      | `string (STRIPE \| CREEM)` | —           |
| `checkoutUrl` | Yes      | `string / uri`             | —           |
| `requestId`   | Yes      | `string`                   | —           |
| `replayed`    | Yes      | `boolean`                  | —           |

## Examples

### TypeScript Management SDK

`NexusAdminClient.createCheckout` uses `AdminOperationInput<"createCheckout">` and returns `Promise<AdminOperationOutput<"createCheckout">>`.

```ts
import { NexusAdminClient } from '@nexus/sdk-typescript';

const nexus = new NexusAdminClient({
  baseUrl: 'https://nexus.microvoid.io',
  managementKey: process.env.NEXUS_MANAGEMENT_KEY,
});

const result = await nexus.createCheckout({
  path: {
    accessId: '533c4e1e-2823-4349-86b9-d6f1a869a2ca',
  },
  headers: {
    'Idempotency-Key': 'operation:stable-key',
  },
  body: {
    billingConnectionId: '533c4e1e-2823-4349-86b9-d6f1a869a2ca',
    planKey: 'example-key',
    successUrl: 'https://app.example/callback',
  },
});
```

### Fetch

```ts
const response = await fetch(
  'https://nexus.microvoid.io/admin/v1/workspace-accesses/533c4e1e-2823-4349-86b9-d6f1a869a2ca/billing-checkouts',
  {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.NEXUS_MANAGEMENT_KEY}`,
      'Idempotency-Key': 'operation:stable-key',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      billingConnectionId: '533c4e1e-2823-4349-86b9-d6f1a869a2ca',
      planKey: 'example-key',
      successUrl: 'https://app.example/callback',
    }),
  },
);

if (!response.ok) throw new Error(`Nexus request failed: ${response.status}`);
```

### curl

```bash
curl --request POST \
  "https://nexus.microvoid.io/admin/v1/workspace-accesses/533c4e1e-2823-4349-86b9-d6f1a869a2ca/billing-checkouts" \
  --header "Authorization: Bearer ${NEXUS_MANAGEMENT_KEY}" \
  --header "Idempotency-Key: operation:stable-key" \
  --header "Content-Type: application/json" \
  --data "{\"billingConnectionId\":\"533c4e1e-2823-4349-86b9-d6f1a869a2ca\",\"planKey\":\"example-key\",\"successUrl\":\"https://app.example/callback\"}"
```

## Related guide

- [Time boundaries](/docs/give-users-access/time-boundaries)
- [API Reference overview](/api-reference)

Source: https://nexus.microvoid.io/api-reference/admin/billing/create-checkout/index.mdx
