---
title: "Reconcile the subscription against Dodo"
method: POST
path: "/api/v1/billing/reconcile"
tags: ["billing"]
---

# Reconcile the subscription against Dodo

`POST /api/v1/billing/reconcile`

## Request

- Base URL: `https://api.cadencz.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cadencz.com/api/v1/billing/reconcile`
- Auth: HTTP bearer

Fetches the workspace's subscription facts from Dodo and updates the local mirror: status, plan, renewal date, cancellation flag — and which subscription the workspace even has, matched via checkout metadata when the mirror never learned of a purchase. Webhooks remain the only path that grants credits; this syncs facts, which are idempotent. The client calls it after returning from checkout and on billing-page load, so the page is truthful even where webhooks cannot reach (local development) or have not arrived yet (production).

## Response `200`

Successful Response

- SubscriptionRead
  - `id` string, required
  - `workspace_id` string, required
  - `tier` string, required
  - `plan_state` string, required
  - `plan_label` string, required
  - `status` string, required
  - `renews_at` string, nullable, required
  - `cancel_at_period_end` boolean, required
  - `billing_period` 'monthly' | 'yearly', nullable, required
  - `has_provider_subscription` boolean
  - `trial_eligible` boolean, required
  - `included_credits` integer, required
  - `channel_cap` integer, required

## Other responses

- `401`: Missing or invalid Supabase bearer token.
- `502`: The upstream provider rejected the request.
- `503`: Required infrastructure or provider config is unavailable.

---

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