Skip to main content
GET
cURL
Reads the Stripe account connected to the key’s environment and answers what a migration would do. It changes nothing in Stripe or Ledger. ledger migrate stripe runs on it.
  • prices: each Stripe Price that a subscription Stripe still bills is on, with openSubscriptions and importableSubscriptions. ledgerPlanId is set when the Price is one of your plans’ own synced Prices (a subscription Ledger already moved). refusal is set when no subscription on it can be imported: not_monthly, metered_price, a non-USD price_mismatch, or a free Price (plan_not_paid).
  • subscriptions: each open subscription, with the Stripe customer’s customerMetadata (to choose your own customer ID from), the next renewal (currentPeriodEnd), importedAs when Ledger already holds it, and refusal: the code Import a Stripe subscription would answer, or null when it would be imported. A customer whose Ledger metadata names another workspace or environment is stripe_customer_owned_elsewhere.
The preview runs the import’s own checks against a plan priced like the subscription’s Price, except two it leaves to the import: pending invoice items, and a Ledger customer that already has a plan. In Sandbox it includes subscriptions on test clocks. It reads up to 1,000 open subscriptions; truncated: true means there are more, so migrate these and preview again. It needs a saved Stripe connection (502 stripe_not_configured), but not a healthy webhook, so you can preview before fixing one. The key needs the customers:read permission.

Authorizations

Authorization
string
header
required

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

Response

What a migration would import and refuse

prices
object[]
required
subscriptions
object[]
required
truncated
boolean
required

More open subscriptions exist than one preview reads (1,000). Import these, then preview again.