Retrieve a price by ID, optionally expanding its product.
Optionaloptions: { expandProduct?: boolean }List prices with cursor-based pagination.
Optionaloptions: ListPricesOptionsChange a price by replacing it: create a new price on the same product, then deactivate the old one.
Exactly these are copied from the old price unless you override them:
currency, recurring.interval and recurring.interval_count,
nickname, metadata and tax_behavior. recurring.trial_period_days
is always carried over. Its lookup_key is moved to the new price. The
returned price is the new price's current state (lookup key included),
also on a retry. If the old price was the product's default price, the new
price becomes the default first, since Stripe won't deactivate a default
price. Nothing else is copied.
Only plain per-unit prices in one currency can be replaced. These are
refused with StripeValidationError rather than silently simplified:
tiered prices, metered prices (usage_type: 'metered' or a meter),
customer-chooses-the-amount prices (custom_unit_amount), prices with
transform_quantity, and prices with extra currency_options.
Retry a failed call with the same idempotencyKey: each step uses a key
derived from it and sends the same parameters on every attempt, so a
retry finishes the remaining steps without creating a second price.
Update a price's mutable fields (active flag, nickname, lookup key, metadata).
Prices service wrapping Stripe Prices.
Prices are immutable once created: to change an amount, create a new price and deactivate the old one. PricesService.replace does both.
Example