---
title: "Manage a managed company's client subscription"
method: POST
path: "/companies/{companyId}/billing"
tags: ["Client Onboarding"]
---

# Manage a managed company's client subscription

`POST /companies/{companyId}/billing`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/companies/{companyId}/billing`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Changes a linked subscription on the next invoice without proration, schedules period-end cancellation, creates Stripe-hosted card entry, or emails a selected owner a secure card-update link. Package, custom-amount, cancellation, and email actions require confirmed=true. Custom amounts are integer US cents from 100 through 10000000.

## Path parameters

- `companyId` string, uuid, required

## Request body

- union
  - object
    - `action` 'change_package', required
    - `packageId` string, uuid, required
    - `confirmed` true, required
  - object
    - `action` 'set_custom_amount', required
    - `amountCents` integer, required
    - `confirmed` true, required
  - object
    - `action` 'cancel_at_period_end', required
    - `confirmed` true, required
  - object
    - `action` 'payment_method_session', required
  - object
    - `action` 'email_payment_method_link', required
    - `ownerId` string, uuid, required
    - `confirmed` true, required

## Response `200`

Updated billing summary, secure Stripe URL, or email receipt

## Other responses

- `404`: No LedgerHQ onboarding engagement is linked
- `409`: Stripe or the subscription cannot perform the requested action
- `default`: Error response

---

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