Skip to main content
PUT
cURL
Publishes the complete desired catalog for the environment selected by the API key in one request. Supply schemaVersion: 1, environment: "sandbox" with a test key or environment: "live" with a live key, currency: "usd", at least one plan and one feature, any add-ons, and policy.onInsufficientCredits: "block". A mismatched environment is rejected. This is a declarative replacement: active items omitted from the submitted lists are archived.
The examples in the request panel use Sandbox. For Live, use a ledger_live_ key and change the body to "environment": "live".
Ledger changes only rows whose values differ. The response reports changed: false for an identical catalog and a stripeSync state for paid plan prices after the database commit. Changed plans create new versions; existing subscriptions retain their referenced plan versions. Feature and add-on values update in place. A Stripe sync failure does not roll back an accepted catalog. If an add-on has a pending purchase, changing its price or credit amount returns 409 purchase_pending; complete the payment or wait for Stripe’s signed checkout.session.expired event to clear it before publishing the new value. A browser cancel redirect alone does not expire Checkout. An invalid catalog returns 400 invalid_catalog with issues that identify fields and validation errors. Use Create a plan, Create a feature, and Create an add-on for incremental onboarding without replacing unrelated items. See Catalog for the tradeoffs.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
schemaVersion
enum<integer>
required
Available options:
1
environment
enum<string>
required
Available options:
sandbox,
live
currency
enum<string>
required
Available options:
usd
plans
object[]
required
Minimum array length: 1
features
object[]
required
Minimum array length: 1
addOns
object[]
required
policy
object
required

Response

Catalog accepted. changed is false when the Ledger catalog is unchanged. stripeSync reports paid-plan Stripe Product sync after commit.

changed
boolean
required
stripeSync
enum<string>
required
Available options:
synced,
pending,
failed,
awaiting_connection