Mint a plan version
Mint a new plan version from a price diff and make it the version the plan bills from, in one step. The diff references existing prices by id: create prices beforehand with POST /prices, then add, remove, or replace them here. To return to an earlier price set, make that version the default with a PATCH on the version.
Authorizations
API key authentication
Path Parameters
Unique identifier for a plan
^plan_[a-zA-Z0-9]+$Body
A reference-by-id price diff applied to the prices of the plan's current version. Every id references an existing price created via POST /prices; inline price definitions are not accepted. An empty body copies the current prices into the new version unchanged. A version must carry at least one price, so a diff that would leave none is rejected.
Prices to add to the version. Each must not already be on the plan's current version.
Unique identifier for a price
^price_[a-zA-Z0-9]+$Prices to remove. Each must be on the plan's current version.
Unique identifier for a price
^price_[a-zA-Z0-9]+$Prices to swap in place, preserving the slot's lineage so the price keeps its identity where the plan is configured for stable price ids. replacesPriceId must be on the plan's current version; withPriceId is the new price.
Response
The newly minted version, published and now the plan's default
A single plan version, including its price slots. Extends the list summary with the version's prices for draft review.
Unique identifier for a plan version
^pver_[a-zA-Z0-9]+$plan_version Monotonic version number within the plan, starting at 1.
x >= 1Lifecycle status of the version.
draft, published, archived Whether this version is the plan's current default (live) version.
Number of committed-status subscriptions pinned to this version at creation time. Not a live-billing cohort.
x >= 0When this version was last modified. Optimistic-concurrency token: read this value and echo it back as an If-Match header on a draft-price-mutation request to reject the write (412) if the draft changed since this read.
The price slots that make up this version.
When this version was published. Absent for draft versions.
The version this one follows on from — the version that was live when this one was created, and whose prices it was built from. Absent for versions created before this field existed.
^pver_[a-zA-Z0-9]+$