---
title: "Update a customer's subscription card through Stripe"
method: POST
path: "/portal/{token}/subscriptions"
tags: ["Customer Portal"]
---

# Update a customer's subscription card through Stripe

`POST /portal/{token}/subscriptions`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/portal/{token}/subscriptions`
- Auth: none required

Accepts only linkId. Validates portal ownership before creating a setup-mode Checkout session. On completion it revalidates the link, customer, account and portal grant, and updates only the selected subscription. No customer-wide default changes or immediate invoice collection. Linking, unlinking and portal management are unavailable to this credential.

## Path parameters

- `token` string, required

## Request body

- object
  - `linkId` string, uuid, required

## Response `200`

{checkoutUrl:string}, a short-lived secure Stripe card-entry URL

## Other responses

- `401`: Invalid, revoked or expired portal token
- `default`: Invalid input, unavailable Stripe account, or denied customer access

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
