Skip to content

Autumn: setup_payment and payment_method expand - #24

Merged
RhysSullivan merged 2 commits into
mainfrom
autumn-setup-payment
Sep 15, 2026
Merged

RhysSullivan merged 2 commits into
mainfrom
autumn-setup-payment

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Sep 15, 2026

Copy link
Copy Markdown

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_payment returns a hosted setup URL (/checkout/setup/:id). Completing the form redirects to success_url; the card lands only when the session is settled (POST /checkout/setup/:id/settle or 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_portal now has a hosted page at /checkout/portal/:customerId with a payment method form that updates the card immediately, and a return link to return_url.
  • customers.get_or_create honours expand: ["payment_method"]. The key is omitted when no card is on file, as upstream does.
  • Missing customer_id on setup_payment answers invalid_inputs, matching upstream.
  • Version 0.14.2.

🤖 Generated with Claude Code

@RhysSullivan
RhysSullivan marked this pull request as ready for review September 15, 2026 01:49
@RhysSullivan
RhysSullivan merged commit 3837d7c into main Sep 15, 2026
1 check passed
@RhysSullivan
RhysSullivan deleted the autumn-setup-payment branch September 15, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant