---
title: "Remove a saved card"
method: DELETE
path: "/api/workspaces/{workspaceId}/billing/payment-methods/{paymentMethodId}"
tags: ["Billing"]
---

# Remove a saved card

`DELETE /api/workspaces/{workspaceId}/billing/payment-methods/{paymentMethodId}`

## Request

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

Refuses to remove the last card while a subscription is live — the next renewal would have nothing to charge. Cancel first, or add another card.

## Path parameters

- `workspaceId` string, required
- `paymentMethodId` string, required

## Response `200`

Payment method removed

## Other responses

- `400`: Last card on a live subscription
- `404`: Payment method not found for this workspace

---

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