CardMultilineWidget
A multiline card input widget that uses Material Components for Android.
To enable 19-digit card support, PaymentConfiguration.init must be called before CardMultilineWidget is instantiated.
The card number, cvc, and expiry date will always be left to right regardless of locale. Postal code layout direction will be set according to the locale.
Constructors
Properties
A CardParams representing the card details and postal code if all fields are valid; otherwise null
The Stripe account ID (if any) which is the business of record. See use cases to determine if this option is relevant for your integration. This should match the on_behalf_of provided on the Intent used when confirming payment.
A PaymentMethod.BillingDetails.Builder representing the card details and postal code if all fields are valid; otherwise null
A PaymentMethodCreateParams.Card representing the card details if all fields are valid; otherwise null
A PaymentMethodCreateParams representing the card details and postal code if all fields are valid; otherwise null
If shouldShowPostalCode is true and postalCodeRequired is true, then postal code is a required field.
If shouldShowPostalCode is true and usZipCodeRequired is true, then postal code is a required field and must be a 5-digit US zip code.
Functions
Set the card number. Method does not change text field focus.
Set a TextWatcher
to receive card number changes.
Set an optional CVC field label to override defaults, or null
to use defaults.
Set a TextWatcher
to receive CVC value changes.
Set a TextWatcher
to receive expiration date changes.
Set a TextWatcher
to receive postal code changes.
A list of preferred networks that should be used to process payments made with a co-branded card if your user hasn't selected a network themselves.
The postal code field is enabled by default. Disabling the postal code field may impact auth success rates, so it is discouraged to disable it unless you are collecting the postal code outside of this form.
Validates all fields and shows error messages if appropriate.
Checks whether the current card number is valid