---
title: "Start collecting a payment method"
method: POST
path: "/api/workspaces/{workspaceId}/billing/setup-intent"
tags: ["Billing"]
---

# Start collecting a payment method

`POST /api/workspaces/{workspaceId}/billing/setup-intent`

## Request

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

Creates a SetupIntent so the Payment Element can collect and save a card without buying anything. Used to add a card to a cardless trial and to replace an expiring one. The card becomes the default when Stripe confirms the setup.

## Path parameters

- `workspaceId` string, required

## Response `200`

clientSecret + publishableKey for the Payment Element

---

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