Prototype: Connect support for CheckoutSession#13081
Draft
cttsai-stripe wants to merge 3 commits into
Draft
Conversation
- Add Connect mode toggle to playground (None / OBO / Destination) - Add transfer_data_destination and application_fee_amount to CheckoutRequest - Add tests verifying Stripe-Account header on init, confirm, and update calls - Add tests verifying on_behalf_of parsing and ElementsSession.onBehalfOf for OBO Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
The US connected account (acct_1SG4B2LapbQGsfjG) was deleted. Use the France one (acct_1SGP1sPvdtoA7EjP) which is still active under the platform account. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
- Add DIRECT option to Connect mode toggle - Add stripeAccountId field to CheckoutRequest for backend - Pass stripeAccountId to PaymentConfiguration.init for direct charges so all SDK API calls include the Stripe-Account header Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
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.
Summary
Prototype verifying that the Android SDK supports all three Connect charge types for CheckoutSession with zero production code changes.
What was tested E2E
payment_intent_data.on_behalf_ofon sessionpayment_intent_data.transfer_data+application_fee_amountStripe-Accountheader on all API callsPaymentConfiguration.stripeAccountId)Key finding
The SDK already wires
stripeAccountthrough all CheckoutSession API calls (init, confirm, update) viaApiRequest.Options. Theon_behalf_offield is parsed fromserver_built_elements_session_paramsand propagated toElementsSession.onBehalfOf. No production code changes were required.Changes in this PR (all playground/test only)
PlaygroundCheckoutModel.kt: AddedtransferDataDestination,applicationFeeAmount,stripeAccountIdfields toCheckoutRequestPlaygroundRequester.kt: PassstripeAccountIdtoPaymentConfiguration.initfor direct chargesCheckoutSessionRepositoryTest.kt: 3 new tests verifyingStripe-Accountheader flows through init, confirm, and update API callsCheckoutSessionResponseJsonParserTest.kt: 2 new tests verifyingon_behalf_ofparsing andElementsSession.onBehalfOffor Connect OBONotes
acct_1SGP1sPvdtoA7EjP) since the US one (acct_1SG4B2LapbQGsfjG) was deletedpayment_intent_data.transfer_dataandapplication_fee_amountare server-side params not visible in thepayment_pagesconfirm response, but confirmed present on the underlying PaymentIntent via DashboardTest plan
🤖 Generated with Claude Code