Autumn: setup_payment and payment_method expand - #24
Merged
Merged
Conversation
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 the card flows to the Autumn emulator so an app can exercise "change billing card" end to end. Behaviour verified against the live Autumn sandbox API.
POST /v1/billing.setup_paymentreturns a hosted setup URL (/checkout/setup/:id). Completing the form redirects tosuccess_url; the card lands only when the session is settled (POST /checkout/setup/:id/settleor the customer-wide/checkout/settle), mirroring the webhook race. As in real Autumn, a setup session never replaces an existing default card.billing.open_customer_portalnow has a hosted page at/checkout/portal/:customerIdwith a payment method form that updates the card immediately, and a return link toreturn_url.customers.get_or_createhonoursexpand: ["payment_method"]. The key is omitted when no card is on file, as upstream does.customer_idon setup_payment answersinvalid_inputs, matching upstream.🤖 Generated with Claude Code