Skip to content

Releases: stripe/stripe-android

stripe-android v13.0.0

13 Jan 18:54
Compare
Choose a tag to compare

This release includes several breaking changes.
See the migration guide for more details.

  • #1950 Add idempotency key for Stripe API POST methods
    class MyActivity : AppCompatActivity() {
    
       private fun createPaymentMethod(
           params: PaymentMethodCreateParams,
           idempotencyKey: String?
       ) {
           stripe.createPaymentMethod(
               params = params,
               idempotencyKey = idempotencyKey,
               callback = object : ApiResultCallback<PaymentMethod> {
                   override fun onSuccess(result: PaymentMethod) {
                   }
    
                   override fun onError(e: Exception) {
                   }
               }
           )
       }
    }
  • #1993 Remove deprecated methods from PaymentSession
  • #1994 Enable postal code field in CardInputWidget by default
  • #1995 Enable Google Pay option in Basic Integration and Stripe Activities
    • PaymentSession

      PaymentSessionConfig.Builder()
          // other settings
          .setShouldShowGooglePay(true)
          .build()
    • PaymentMethodsActivity

      PaymentMethodsActivityStarter.Args.Builder()
          // other settings
          .setShouldShowGooglePay(true)
          .build()
  • #1996 Update postal code logic for CardMultilineWidget
    • Default to showing postal code (i.e. shouldShowPostalCode = true)
    • Postal code is now optional when displayed
    • Remove validation on postal code field
    • Change postal code field hint text to "Postal Code"
    • Remove CardInputListener.onPostalCodeComplete()
  • #1998 Use CardBrand enum to represent card brands
    • Change the type of Card#brand and SourceCardData#brand properties from String? to CardBrand
    • Remove Card.CardBrand
  • #1999 Remove deprecated BroadcastReceiver logic from PaymentFlowActivity
  • #2000 Pass PaymentSessionConfig instance to PaymentSession constructor
  • #2002 Fix regression in CardInputWidget styling
    To customize the individual EditText fields of CardInputWidget, define a Stripe.CardInputWidget.EditText style
    that extends Stripe.Base.CardInputWidget.EditText. For example,
    <style name="Stripe.CardInputWidget.EditText" parent="Stripe.Base.CardInputWidget.EditText">
        <item name="android:textSize">22sp</item>
        <item name="android:textColor">@android:color/holo_blue_light</item>
        <item name="android:textColorHint">@android:color/holo_orange_light</item>
    </style>
  • #2003 Add support for authenticating a Source via in-app WebView
    class MyActivity : AppCompatActivity() {
        private fun authenticateSource(source: Source) {
            stripe.authenticateSource(this, source)
        }
    
        override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
            super.onActivityResult(requestCode, resultCode, data)
    
            if (data != null && stripe.isAuthenticateSourceResult(requestCode, data)) {
                stripe.onAuthenticateSourceResult(
                    data,
                    object : ApiResultCallback<Source> {
                        override fun onSuccess(result: Source) {
                        }
    
                        override fun onError(e: Exception) {
                        }
                    }
                )
            }
        }
    }
  • #2006 Create TokenizationMethod enum
    • Change the type of Card#tokenizationMethod and SourceCardData#tokenizationMethod from String? to TokenizationMethod?
  • #2013 Populate shipping address country from pre-populated shipping info
  • #2015 Update PaymentSessionConfig's default BillingAddressFields to PostalCode
  • #2020 Change PaymentMethod.type from String? to PaymentMethod.Type?
  • #2028 Update SourceParams fields
    • Update setOwner() to take OwnerParams instead of Map
    • Remove setRedirect(), use setReturnUrl() instead
    • Update some setters to take null values, simplifying usage
    • Update comments
  • #2029 Update CardInputWidget to use TextInputLayout
    • Make StripeEditText extend TextInputEditText
  • #2038 Update CardInputWidget to focus on first error field when validating
  • #2039 Add support for creating a person token
    • Add Stripe#createPersonToken() and Stripe#createPersonTokenSynchronous()
  • #2040 Add support for CVC recollection in PaymentIntents
    • Update ConfirmPaymentIntentParams.createWithPaymentMethodId() with optional PaymentMethodOptionsParams? argument
  • #2042 Create AccountParams.BusinessTypeParams
    • BusinessTypeParams.Company and BusinessTypeParams.Individual model the parameters for creating a
      company or
      individual
      account token.
      Use these instead of creating raw maps representing the data.
    • AccountParams.createAccountParams() is now deprecated. Use the appropriate AccountParams.create() method.

See the changelog for more details.

stripe-android v12.8.2

20 Dec 18:11
Compare
Choose a tag to compare
  • #1974 Add PaymentSessionConfig#shouldPrefetchCustomer
    • Mark PaymentSessionConfig#init() with shouldPrefetchCustomer argument as deprecated
  • #1980 Don't show a Dialog in StripeActivity if isFinishing()
  • #1989 Create CardBrand enum
  • #1990 Relax validation of UK postal codes

See the changelog for more details.

stripe-android v12.8.1

18 Dec 16:11
Compare
Choose a tag to compare
  • #1968 Upgrade 3DS2 SDK to 2.2.7
    • Downgrade to com.google.android.material:material:1.0.0

See the changelog for more details.

stripe-android v12.8.0

17 Dec 21:26
Compare
Choose a tag to compare
  • #1947 Allow setting of window flags on Stripe Activities
    • Basic Integration

      PaymentSessionConfig.Builder()
          .setWindowFlags(WindowManager.LayoutParams.FLAG_SECURE)
          .build()
      
    • Custom Integration

      AddPaymentMethodActivityStarter.Args.Builder()
          .setWindowFlags(WindowManager.LayoutParams.FLAG_SECURE)
          .build()
      
  • #1956 Add support for configuring billing address fields on AddPaymentMethodActivity
    • Basic Integration

      PaymentSessionConfig.Builder()
          .setBillingAddressFields(BillingAddressFields.Full)
          .build()
      
    • Custom Integration

      AddPaymentMethodActivityStarter.Args.Builder()
          .setBillingAddressFields(BillingAddressFields.Full)
          .build()
      
  • #1957 Enable PaymentSessionConfig.ShippingInformationValidator and PaymentSessionConfig.ShippingMethodsFactory
  • #1958 Add validation for PaymentIntent and SetupIntent client secrets
  • #1959 Upgrade 3DS2 SDK to 2.2.6

See the changelog for more details.

stripe-android v12.7.0

16 Dec 22:41
Compare
Choose a tag to compare
  • #1915 Update API version to 2019-12-03
  • #1928 Make Payment Method Wallet a sealed class
  • #1930 Update text size for CardInputWidget fields
  • #1939 Update Android Gradle Plugin to 3.5.3
  • #1946 Upgrade 3DS2 SDK to 2.2.5
    • Upgrade to com.google.android.material:material:1.2.0-alpha2
  • #1949 Catch NullPointerException when calling StripeEditText.setHint().
    This is a workaround for a known issue on some Samsung devices.
  • #1951 Expose ability to enable postal code on CardInputWidget
    • Enable via layout
        <com.stripe.android.view.CardInputWidget
            android:id="@+id/card_input_widget"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:shouldShowPostalCode="true" />
      
    • Enable via code
      • Java: cardInputWidget.setPostalCodeEnabled(true)
      • Kotlin: cardInputWidget.postalCodeEnabled = true

See the changelog for more details.

stripe-android v12.6.1

02 Dec 21:52
Compare
Choose a tag to compare
  • #1897 Upgrade 3DS2 SDK to 2.2.4
    • Fix crash when using Instant App

See the changelog for more details.

stripe-android v12.6.0

27 Nov 16:35
Compare
Choose a tag to compare
  • #1859 Create GooglePayJsonFactory, a factory for generating Google Pay JSON request objects
  • #1860 Namespace drawables with stripe_ prefix
  • #1861 Create GooglePayResult to parse and model Google Pay Payment Data response
  • #1863 Complete migration of SDK code to Kotlin 🎉
  • #1864 Make Klarna Source creation methods public and create example
    • See SourceParams.createKlarna()
  • #1865 Make all model classes implement Parcelable
  • #1871 Simplify configuration of example app
    • Example app can be configured via $HOME/.gradle/gradle.properties instead of Settings.kt
      STRIPE_EXAMPLE_BACKEND_URL=https://hidden-beach-12345.herokuapp.com/
      STRIPE_EXAMPLE_PUBLISHABLE_KEY=pk_test_12345
      STRIPE_ACCOUNT_ID=
      
  • #1883 Enable PaymentSessionConfig.ShippingInformationValidator and PaymentSessionConfig.ShippingMethodsFactory
  • #1884 Mark PaymentFlowExtras as deprecated
  • #1885 Create Stripe#retrieveSource() for asynchronous Source retrieval
  • #1890 Upgrade 3DS2 SDK to 2.2.3
    • Fix crash when using Instant App

See the changelog for more details.

stripe-android v12.5.0

21 Nov 15:47
Compare
Choose a tag to compare
  • #1836 Add support for statement_descriptor field to Source model via Source#statementDescriptor
  • #1837 Add support for source_order param via SourceOrderParams
  • #1839 Add support for source_order field to Source model via Source#sourceOrder
  • #1842 Add PaymentSessionConfig.Builder.setAllowedShippingCountryCodes(). Used to specify an allowed set of countries when collecting the customer's shipping address via PaymentSession.
    // Example
    PaymentSessionConfig.Builder()
        // only allowed US and Canada shipping addresses
        .setAllowedShippingCountryCodes(setOf("US", "CA"))
        .build()
  • #1845 Fix country code validation in PaymentFlowActivity's shipping information screen
    • Require that the customer submits a country that exists in the autocomplete dropdown
    • Show error UI when the submitted country fails validation
  • #1857 Fix crash related to Kotlin Coroutines
    • Downgrade kotlinx-coroutines from 1.3.2 to 1.3.0
    • Add Proguard rules

See the changelog for more details.

stripe-android v12.4.0

13 Nov 12:30
Compare
Choose a tag to compare
  • #1792 Remove default selection of a Payment Method from PaymentMethodsActivity
  • #1797 Document StripeDefaultTheme style
  • #1799 Document Stripe3DS2Theme and related styles
  • #1809 Update to Gradle 6.0
  • #1810 Update API version to 2019-11-05
  • #1812 Upgrade 3DS2 SDK to 2.2.2
  • #1813 Don't select a new PaymentMethod after deleting one in PaymentMethodsActivity
  • #1820 Update PaymentMethodsActivity result and PaymentSession.handlePaymentData() logic
    • PaymentMethodsActivity returns result code of Activity.RESULT_OK when the user selected a Payment Method
    • PaymentMethodsActivity returns result code of Activity.RESULT_CANCELED when the user taps back via the toolbar or device back button
    • PaymentSession#handlePaymentData() now calls PaymentSessionListener#onPaymentSessionDataChanged() for any result from PaymentMethodsActivity

See the changelog for more details.

stripe-android v12.3.0

05 Nov 20:59
Compare
Choose a tag to compare
  • #1775 Add support for idempotency key on Stripe Token API requests
  • #1777 Make Card implement Parcelable
  • #1781 Mark Stripe#createToken() as @Deprecated; replace with Stripe#createCardToken()
  • #1782 Mark Stripe#authenticatePayment() and Stripe#authenticateSetup() as @Deprecated; replace with Stripe#handleNextActionForPayment() and Stripe#handleNextActionForSetupIntent(), respectively
  • #1784 Update API version to 2019-10-17
  • #1787 Fix CardNumberEditText performance
  • #1788 Fix ExpiryDateEditText performance

See the changelog for more details.