# Card

class Card : Parcelable

Information about the card used in a purchase.

#### Parameters

brand

The brand (for example, VISA or Mastercard) of a Card.

cardCoBrand

The co-brand (for example, an Afterpay virtual card would have a co-brand of AFTERPAY.) of a Card.

lastFourDigits

The last 4 digits of this card's number.

expirationMonth

The month of the expiration date of the card. This must be in range of 1-12

expirationYear

The year of the expiration date of the card, 4 digits.

cardholderName

The cardholder's full name, if available.

id

The card identifier, if this card instance came from storing a card on file.

bin

The first six digits of the card number.

## Types

Brand
Link copied to clipboard
enum Brand : Enum<Card.Brand>

Card brand (e.g. Mastercard, VISA, etc).

Builder
Link copied to clipboard
class Builder(brand: Card.Brand, lastFourDigits: String)

Lets developers create and configure card data for automated testing. There is no need to reference this builder class outside of tests.

CoBrand
Link copied to clipboard
enum CoBrand : Enum<Card.CoBrand>

The card's co-brand if available. For example, an Afterpay virtual card would have a co-brand of AFTERPAY.

## Properties

bin
Link copied to clipboard
val bin: String?
brand
Link copied to clipboard
val brand: Card.Brand
cardCoBrand
Link copied to clipboard
val cardCoBrand: Card.CoBrand
cardholderName
Link copied to clipboard
val cardholderName: String?
expirationMonth
Link copied to clipboard
val expirationMonth: Int
expirationYear
Link copied to clipboard
val expirationYear: Int
id
Link copied to clipboard
val id: String?
lastFourDigits
Link copied to clipboard
val lastFourDigits: String

## Functions

buildUpon
Link copied to clipboard
fun buildUpon(): Card.Builder
describeContents
Link copied to clipboard
abstract fun describeContents(): Int
toString
Link copied to clipboard
open override fun toString(): String

Simply print "Card" because we don't want to accidentally log or otherwise leak card data.

writeToParcel
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)