Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
    Overview
    Server-side SDKs
    Mobile SDKs
    iOS SDK
    Android SDK
    React Native SDK
    Web SDKs
    ES Module Stripe.js
    React Stripe.js
    Terminal SDKs
    iOS SDK
    Android SDK
    React Native SDK
    Community
    Community SDKs
    Mobile migrations
    Migrate to iOS SDK 24
    Migrate to Android SDK 21
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
Stripe Shell
Developers Dashboard
Agent toolkit
Build with LLMsStripe for Visual Studio CodeStripe health alertsFile uploads
Security and privacy
Security
Extend Stripe
Stripe Apps
Stripe Connectors
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsSDKs

Migrate to Stripe Android SDK 21

Migrate your Kotlin apps to our latest Android SDK major version.

Copy page

CollectBankAccountLauncher

CollectBankAccountLauncher’s dependency com.stripe.connections has been renamed com.stripe.financial-connections.

PaymentSheet

PaymentSheet displays payment methods in either a vertical or horizontal layout. Prior to this major version, PaymentSheet defaulted to a horizontal layout. Now, Stripe optimizes the layout automatically. To set a specific layout instead, set the PaymentSheet.Configuration.paymentMethodLayout property to either .horizontal or .vertical.

This example code sets the layout back to horizontal, the previous default.

Kotlin
PaymentSheet.Configuration.Builder("Example, Inc.") .paymentMethodLayout(PaymentSheet.PaymentMethodLayout.Horizontal) .build() )

Basic integration

We no longer support our legacy Basic Integration for collecting credit card and wallet payments.

If your app relies on any of the following APIs, it uses the Basic Integration. Migrate to the Mobile Payment Element, by following this migration guide.

  • CustomerSession
  • PaymentSession
  • PaymentMethodsActivity
  • AddPaymentMethodActivity
  • PaymentFlowActivity
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc