Skip to content

feat(keychain): pass CustomerSession client secret to Stripe Elements#2531

Merged
broody merged 1 commit intomainfrom
feat/stripe-saved-payment-methods
Apr 1, 2026
Merged

feat(keychain): pass CustomerSession client secret to Stripe Elements#2531
broody merged 1 commit intomainfrom
feat/stripe-saved-payment-methods

Conversation

@broody
Copy link
Copy Markdown
Contributor

@broody broody commented Mar 31, 2026

Summary

  • Add customerSessionClientSecret to GraphQL queries for both Stripe payment mutations
  • Wire the new field through the credit purchase context to the Stripe Elements provider
  • Update generated types to include the optional field

Depends on cartridge-gg/internal#4234

Test plan

  • Verify Payment Element renders saved payment methods for returning customers (live mode)
  • Verify test mode payments still work without customer session
  • Verify "save payment method" checkbox appears for new payment methods

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
controller-example-next Ready Ready Preview Mar 31, 2026 11:13pm
keychain Ready Ready Preview Mar 31, 2026 11:13pm
keychain-storybook Ready Ready Preview Mar 31, 2026 11:13pm

Request Review

Wire customerSessionClientSecret from the API through the credit
purchase context to the Elements provider, enabling saved payment
method display for returning customers.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@broody broody force-pushed the feat/stripe-saved-payment-methods branch from dcdc9aa to 8899902 Compare March 31, 2026 23:12
@broody broody merged commit 0eb64bc into main Apr 1, 2026
12 checks passed
@broody broody deleted the feat/stripe-saved-payment-methods branch April 1, 2026 00:17
@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 1, 2026

Claude finished @broody's task —— View job


Documentation Analysis Complete

  • Review PR changes to understand user-facing impact
  • Check docs repository structure
  • Determine if documentation updates are needed
  • Update documentation if required

Analysis Result

No documentation updates needed.

This PR implements an internal enhancement to the Stripe payment flow that does not affect user-facing behavior or APIs:

What changed:

  • Added customerSessionClientSecret field to GraphQL queries and TypeScript types
  • Wired the field through internal context to Stripe Elements provider
  • The change enables Stripe's saved payment methods feature for returning customers

Why no docs update is needed:

  1. No API changes: No changes to controller.openStarterPack(), controller.openPurchaseCredits(), or any public SDK methods
  2. Transparent to developers: Developers integrating Controller don't need to know about or configure this internal Stripe feature
  3. Internal implementation detail: This is an internal keychain enhancement that improves UX automatically without requiring developer action
  4. No configuration required: The feature works automatically when Stripe provides the customer session secret - no setup or code changes needed from integrators

The existing documentation in docs-repo/src/pages/controller/starter-packs.md already covers Stripe credit card payments at a high level, which remains accurate. This internal enhancement simply improves the payment experience for returning customers behind the scenes.


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