CardRequest

public struct CardRequest : Codable

Card request model.

  • The unique identifier of the card in your own system.

    Declaration

    Swift

    public var externalId: String
  • pan

    The payment card number.

    Declaration

    Swift

    public var pan: String
  • The expiration year of the card.

    Declaration

    Swift

    public var expirationYear: String
  • The expiration month of the card.

    Declaration

    Swift

    public var expirationMonth: String
  • Card billing address postal code (ZIP Code for the US).

    Declaration

    Swift

    public var postalCode: String?
  • The name of the cardholder as it shows on the face of the card.

    Declaration

    Swift

    public var nameOnCard: String?
  • The card CVC or CVV code.

    Declaration

    Swift

    public var securityCode: String
  • Allows for any number of custom metadata keys and values to be stored with a given entity.

    Declaration

    Swift

    public var metadata: [String : Any]?
  • Auxiliary constructor

    Declaration

    Swift

    public init(
        externalId: String,
        pan: String,
        expirationYear: String,
        expirationMonth: String,
        securityCode: String,
        postalCode: String? = nil,
        nameOnCard: String? = nil,
        metadata: [String: Any]? = nil)

    Parameters

    externalId

    The unique identifier of the card in your own system.

    pan

    The payment card number.

    expirationYear

    The expiration year of the card.

    expirationMonth

    The expiration month of the card.

    securityCode

    The card CVC or CVV code.

    postalCode

    Card billing address postal code (ZIP Code for the US).

    nameOnCard

    The name of the cardholder as it shows on the face of the card.

    metadata

    Allows for any number of custom metadata keys and values to be stored with a given entity.

  • Creates a new instance by decoding from the given decoder.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to read data from.

  • Encodes the instance by encoding to the given decoder.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.