Skip to content

Add playground API configuration setting - #14370

Draft
tjclawson-stripe wants to merge 2 commits into
tyler/payment-config-stack-13-embedded-configurationfrom
tyler/payment-config-stack-14-playground-api-configuration
Draft

Add playground API configuration setting#14370
tjclawson-stripe wants to merge 2 commits into
tyler/payment-config-stack-13-embedded-configurationfrom
tyler/payment-config-stack-14-playground-api-configuration

Conversation

@tjclawson-stripe

@tjclawson-stripe tjclawson-stripe commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a "Use ApiConfiguration" playground setting for PaymentSheet, FlowController, and Embedded Payment Element.

When enabled, the playground stores the publishable key and optional Stripe account ID returned by the backend and supplies them through each integration configuration instead of initializing process-wide PaymentConfiguration. The standalone Embedded example also resolves credentials before configuration and reuses its prefetched intent result during confirmation.

Expose the preview PaymentSheet.Configuration.Builder.apiConfiguration() entry point so PaymentSheet and FlowController can opt into per-instance credentials alongside Embedded Payment Element.

Committed and created by Codex.

Motivation

The playground should exercise API-configuration-only integrations and verify that PaymentSheet, FlowController, and Embedded Payment Element do not depend on global PaymentConfiguration initialization.

Keeping the resolved credential pair in the playground snapshot preserves it across Activity recreation while ensuring each payment-element instance owns the credentials selected by its backend response.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Not applicable — playground configuration behavior only.

Changelog

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