---
title: "Sync Checkout Session"
method: POST
path: "/api/billing/{team_key}/checkout-sync"
tags: ["billing"]
---

# Sync Checkout Session

`POST /api/billing/{team_key}/checkout-sync`

## Request

- Base URL: `https://api.superit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.superit.ai/api/billing/{team_key}/checkout-sync`
- Auth: HTTP bearer

## Path parameters

- `team_key` string, required

## Request body

- CheckoutSyncRequest: Body for the checkout success-URL sync. Carries the Stripe Checkout ``session_id`` handed back on the success URL so the server can retrieve it and reconcile billing state — a backstop for a missed ``checkout.session.completed`` webhook.
  - `sessionId` string, required: Stripe Checkout Session id from the success URL (cs_…)

## Response `200`

Successful Response

- BillingStatusResponse: Team billing status shown in the settings UI.
  - `billingStatus` 'pending_payment' | 'free' | 'trialing' | 'active' | 'past_due' | 'canceled', required
  - `accessLevel` 'blocked' | 'full' | 'read_only', required
  - `stripeConfigured` boolean, required
  - `hasSubscription` boolean, required
  - `portalAvailable` boolean, required
  - `cancellationAvailable` boolean
  - `checkoutAvailable` boolean, required: False while checkout would refuse a live subscription.
  - `stripeSubscriptionStatus` string, required
  - `trialEnd` string, date-time, nullable: Stripe's current trial end, updated by subscription reconciliation.
  - `checkoutAgreement` CheckoutAgreement
    - `version` string, required
    - `agreementRevision` string, required
    - `documentSha256` string, required
    - `url` string, required
    - `name` string, required
    - `acceptanceText` string, required
    - `screenTitle` string, required
    - `screenDescription` string, required
    - `buttonLabel` string, required
  - `topupPaymentLinkUrl` string, nullable: Stripe Payment Link for buying credit top-ups; null when top-ups aren't configured.

## Other responses

- `400`: Invalid input
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/superit/apis/super-it-api.md) - [All operations](https://skmtc.dev/superit/apis/super-it-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superit/apis/super-it-api/revisions/4944d556c2bb?raw)
