Repository navigation
Autumn: move a paid customer to another plan on its Stripe subscription - #39
Merged
Merged
Conversation
RhysSullivan
marked this pull request as ready for review
October 25, 2026 18:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds what Executor's v1 import needs to move a paid customer between two Autumn catalogs in one account, modelled on what the real sandbox did (x-api-version 2.3.0):
customers.updatewithnew_customer_id. Subscriptions, Stripe subscription and usage stay. A taken id gets409 customer_already_exists.billing.preview_attach, which takes the same body as attach and changes nothing.billing.attachwithremove_plan_idsandproration_behavior: "none". The new plan takes over the removed paid plan's Stripe subscription with its period and a running trial. Nothing is charged and there is no checkout. A cancellation at the end of the cycle is dropped, and a scheduled plan stays scheduled.customize(flat price, items) andversionare supported. Removing a running trial without proration gets400, a missing plan gets404 product_not_found, and attaching a plan already held gets409.customers.getwithexpand: ["subscriptions.plan"]returns the version each subscription bills.billing.verifylists each paid plan's Stripe subscription.customers.delete.versions, and a subscription'sversionandstripe_subscription_id.Tests:
src/__tests__/autumn-carry-over.test.ts. The package suite passes (69 tests).This only adds behaviour. Existing routes are unchanged except that a checkout-settled paid plan now records a Stripe subscription id. Executor's tests PR for the billing carry-over can't pass until this is deployed to
emulators.dev.