CardKYCFields

data class CardKYCFields(val number: String? = null, val expirationDate: String? = null, val cvc: String? = null, val holderName: String? = null, val network: String? = null, val postalCode: String? = null, val countryCode: String? = null, val stateOrProvince: String? = null, val city: String? = null, val address: String? = null, val token: String? = null)

Payment card information for KYC verification.

Contains credit or debit card details for payment processing. All field keys are automatically prefixed with "card." when serialized.

Supports:

  • Full card details (number, expiration, CVC)

  • Tokenized card references (for PCI DSS compliance)

  • Billing address information

  • Card network identification

Security considerations:

  • Use tokenized cards when possible to avoid handling sensitive card data

  • Never log or store full card numbers in application logs

  • Follow PCI DSS compliance requirements when handling card data

  • Consider encryption for card data in transit and at rest

Example - Full card details:

val card = CardKYCFields(
number = "4111111111111111",
expirationDate = "29-11", // YY-MM format (November 2029)
cvc = "123",
holderName = "John Doe",
network = "Visa",
postalCode = "12345",
countryCode = "US"
)

// Extract fields for submission (automatically adds "card." prefix)
val fields = card.fields()
// Result: {"card.number": "4111...", "card.expiration_date": "29-11", ...}

Example - Tokenized card:

val card = CardKYCFields(
token = "tok_visa_1234",
holderName = "John Doe",
countryCode = "US"
)

See also:

Constructors

Link copied to clipboard
constructor(number: String? = null, expirationDate: String? = null, cvc: String? = null, holderName: String? = null, network: String? = null, postalCode: String? = null, countryCode: String? = null, stateOrProvince: String? = null, city: String? = null, address: String? = null, token: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Full billing address as multi-line string

Link copied to clipboard
val city: String?

Billing address city

Link copied to clipboard

Billing address country in ISO 3166-1 alpha-2 (e.g., "US")

Link copied to clipboard
val cvc: String?

CVC/CVV security code from back of card

Link copied to clipboard

Expiration in YY-MM format (e.g., "29-11" for November 2029)

Link copied to clipboard

Name of the card holder as it appears on the card

Link copied to clipboard

Card brand/network (e.g., Visa, Mastercard, AmEx)

Link copied to clipboard

Card number (use tokenized alternative when possible)

Link copied to clipboard

Billing address postal code

Link copied to clipboard

Billing address state/province in ISO 3166-2 format

Link copied to clipboard

Token representation from external payment system (e.g., Stripe)

Functions

Link copied to clipboard

Converts all card KYC fields to a map for SEP-9 submission.