---
title: "Create a subscription for embedded Stripe Payment Element checkout"
method: POST
path: "/api/workspaces/{workspaceId}/billing/subscribe"
tags: ["Billing"]
---

# Create a subscription for embedded Stripe Payment Element checkout

`POST /api/workspaces/{workspaceId}/billing/subscribe`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/workspaces/{workspaceId}/billing/subscribe`
- Auth: API key in cookie `hiveship_access`

## Path parameters

- `workspaceId` string, required

## Response `200`

Returns clientSecret + publishableKey for Payment Element confirmation

---

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