SavedCard

open class SavedCard(val type: PaymentMethodType, var alias: String, cardExpiryDate: CardExpiryDate?, maskedCardNumber: String?, cardholder: String?) : SavedPaymentMethod

This class contains saved credit or debit card payment method details.

Just like any other SavedPaymentMethod subclass, this class can be used to finalize a payment without user interaction or to display a selection of saved payment methods to the user for fast checkouts.

A SavedCard can be created by successfully completing a card payment or with a dedicated registration.

Inheritors

Constructors

Link copied to clipboard
constructor(type: PaymentMethodType, alias: String, cardExpiryDate: CardExpiryDate?, maskedCardNumber: String?, cardholder: String?)

Properties

Link copied to clipboard
open var alias: String

The alias that can be used to process recurring payments or fast checkouts.

Link copied to clipboard
Link copied to clipboard

Cardholder's name

Link copied to clipboard
open override val isValid: Boolean

Checks if the expiration date is in the future or not.

Link copied to clipboard

The masked card number you can use to display that specific card in your app. The masked card number shows the first 6 digits and the last 4 digits of the card, e.g. 432930xxxxxx6095.

Link copied to clipboard

Payment method type, e.g. Visa.

Functions

Link copied to clipboard
open override fun clone(): SavedCard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun getAccessibilityTitle(context: Context): String

For TalkBack this title is used instead of getInternalDisplayTitle.

Link copied to clipboard
open fun getDisplayTitle(context: Context): String

A human readable title.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun toJson(): String

Returns a JSON string representation of this saved payment method object to be deserialized with create.

Link copied to clipboard
open override fun toString(): String