Skip to navigation

Bulk Migrate Prices

View as Markdown

Bulk migrate default prices for multiple products.

This endpoint allows you to:

  • Update the default_price_id for multiple products in a single request
  • Optionally move active subscription items from a source price (the old default, or source_price_id) to the new one. No invoice is created; each subscription bills the new price from its next invoice.
  • Preview the whole request with dry_run (validates and counts, writes nothing)

Each migration item is validated and applied on its own, all or nothing. After a failed item, later items for the same product are not applied and are listed in errors; items for other products still run. One request may hold at most 500 migration items (more returns 422) and move at most 7,500 subscription items in total. A larger request normally returns 400 and writes nothing. Rarely, if subscriptions are added while the request runs, it returns 200: the items before the limit are applied, and the item that would cross it and every later item are listed in errors as “Not applied”. Returns detailed results including successes and errors for each migration.

Authentication

AuthorizationBearer

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

Path parameters

account_idstringRequired

Headers

Idempotency-Keystring or nullOptional>=8 characters
A unique key for this request. A retry with the same key returns the first response instead of running again, for 24 hours. Keys are per caller.

Request

This endpoint expects an object.
migrationslist of objectsRequired
List of product price migrations
dry_runbooleanOptionalDefaults to false
If true, run every check and return the results, including how many subscriptions would move, but change nothing.

Response

Successful Response
total_requestedinteger
Total migrations requested
successfulinteger
Number of successful migrations
failedinteger
Number of failed migrations
dry_runbooleanOptionalDefaults to false
True when the request was a dry run and nothing changed
resultslist of objectsOptional
Details of successful migrations
errorslist of objectsOptional
Details of failed migrations

Errors

422
Unprocessable Entity Error