BTCard

Objective-C

@interface BTCard : NSObject

Swift

class BTCard : NSObject

The card tokenization request represents raw credit or debit card data provided by the customer. Its main purpose is to serve as the input for tokenization.

  • The card number

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *number;

    Swift

    var number: String? { get set }
  • The expiration month as a one or two-digit number on the Gregorian calendar

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *expirationMonth;

    Swift

    var expirationMonth: String? { get set }
  • The expiration year as a two or four-digit number on the Gregorian calendar

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *expirationYear;

    Swift

    var expirationYear: String? { get set }
  • cvv

    The card verification code (like CVV or CID).

    Note

    If you wish to create a CVV-only payment method nonce to verify a card already stored in your Vault, omit all other properties to only collect CVV.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *cvv;

    Swift

    var cvv: String? { get set }
  • The postal code associated with the card’s billing address

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *postalCode;

    Swift

    var postalCode: String? { get set }
  • Optional: the cardholder’s name.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *cardholderName;

    Swift

    var cardholderName: String? { get set }
  • Optional: first name on the card.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *firstName;

    Swift

    var firstName: String? { get set }
  • Optional: last name on the card.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *lastName;

    Swift

    var lastName: String? { get set }
  • Optional: company name associated with the card.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *company;

    Swift

    var company: String? { get set }
  • Optional: the street address associated with the card’s billing address

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *streetAddress;

    Swift

    var streetAddress: String? { get set }
  • Optional: the extended address associated with the card’s billing address

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *extendedAddress;

    Swift

    var extendedAddress: String? { get set }
  • Optional: the city associated with the card’s billing address

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *locality;

    Swift

    var locality: String? { get set }
  • Optional: Either a two-letter state code (for the US), or an ISO-3166-2 country subdivision code of up to three letters.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *region;

    Swift

    var region: String? { get set }
  • Optional: the country name associated with the card’s billing address.

    Note

    Braintree only accepts specific country names.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *countryName;

    Swift

    var countryName: String? { get set }
  • Optional: the ISO 3166-1 alpha-2 country code specified in the card’s billing address.

    Note

    Braintree only accepts specific alpha-2 values.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *countryCodeAlpha2;

    Swift

    var countryCodeAlpha2: String? { get set }
  • Optional: The ISO 3166-1 alpha-3 country code specified in the card’s billing address.

    Note

    Braintree only accepts specific alpha-3 values.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *countryCodeAlpha3;

    Swift

    var countryCodeAlpha3: String? { get set }
  • Optional: The ISO 3166-1 numeric country code specified in the card’s billing address.

    Note

    Braintree only accepts specific numeric values.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *countryCodeNumeric;

    Swift

    var countryCodeNumeric: String? { get set }
  • Controls whether or not to return validations and/or verification results. By default, this is not enabled.

    Note

    Use this flag with caution. By enabling client-side validation, certain tokenize card requests may result in adding the card to the vault. These semantics are not currently documented.

    Declaration

    Objective-C

    @property (nonatomic) BOOL shouldValidate;

    Swift

    var shouldValidate: Bool { get set }
  • Optional: If authentication insight is requested. If this property is set to true, a merchantAccountID must be provided. Defaults to false.

    Declaration

    Objective-C

    @property (nonatomic) BOOL authenticationInsightRequested;

    Swift

    var authenticationInsightRequested: Bool { get set }
  • Optional: The merchant account ID.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *merchantAccountID;

    Swift

    var merchantAccountID: String? { get set }