Payment Method

  • Configuration object for Apple Pay transactions.

    See more

    Declaration

    Swift

    public class ApplePayConfig: NSObject, NSCopying
  • Configuration object for Boncard transactions.

    See more

    Declaration

    Swift

    public class BoncardConfig: NSObject, NSCopying
  • The different types of Boncard, for determining how the PaymentMethodType.Boncard payment method type is displayed in the payment selection.

    See more

    Declaration

    Swift

    public enum BoncardType: Int, CaseIterable
  • Use this class to process raw card data for payments. You should use this class if your app takes over the user interface for the card input fields.

    See more

    Declaration

    Swift

    public class Card: PaymentMethod
  • Class to be used to represent the card expiry date (month and year).

    See more

    Declaration

    Swift

    public class CardExpiryDate: NSObject, Codable, NSCopying
  • Use this to choose which label to display for the card option in the payment method selection.

    See more

    Declaration

    Swift

    public enum CardLabelType: Int
  • This is the base class for payment methods. It contains a type to identify the payment method, e.g. Visa or Mastercard.

    See more

    Declaration

    Swift

    public class PaymentMethod: NSObject, Codable, NSCoding, NSCopying
  • The payment method used during the transaction.

    See more

    Declaration

    Swift

    public enum PaymentMethodType: Int, CaseIterable
  • Use this class to map the payment method identifiers from Datatrans to the PaymentMethodType.

    See more

    Declaration

    Swift

    public class PaymentMethodTypeMapper: NSObject
  • This class contains saved Apple Pay payment method details.

    Like any other SavedPaymentMethod subclass, it can be used to initiate follow-up payments with the same method. Note: Using this class will still present the Apple Pay sheet to the user when they are in session.

    A SavedApplePay object can be created by successfully completing an Apple Pay payment or with a dedicated registration.

    See more

    Declaration

    Swift

    public class SavedApplePay: SavedPaymentMethod
  • This class contains saved Boncard 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 SavedBoncard can be created by successfully completing a Boncard payment or with a dedicated registration.

    See more

    Declaration

    Swift

    public class SavedBoncard: 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.

    See more

    Declaration

    Swift

    public class SavedCard: SavedPaymentMethod
  • This is the base class to save a payment method and use it to process recurring payments or fast checkouts.

    This class is sufficient for some payment methods (e.g. Twint). More complex payment methods require you to specify additional details in their SavedPaymentMethod subclass (e.g. card payments, PostFinance, etc.).

    Please refer to this list to see if you need to use one of the subclasses for your payments:

    • Easy payment methods: Swisscom Pay, SEPA (ELV), Twint, Apple Pay, CembraPay, SwissPass, Powerpay Invoice
    • Complex payment methods (requiring a SavedPaymentMethod subclass): Card payments, PayPal, PostFinance, Reka, Boncard

    Please refer to the Datatrans documentation to see if you can register a payment method during payment or require a dedicated registration.

    See more

    Declaration

    Swift

    public class SavedPaymentMethod: PaymentMethod
  • This class contains saved PayPal 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 SavedPayPal can be created by successfully completing a PayPal payment or with a dedicated registration.

    See more

    Declaration

    Swift

    public class SavedPayPal: SavedPaymentMethod
  • This class contains saved PostFinance 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 SavedPostFinanceCard can be created by successfully completing a PostFinance Card payment or with a dedicated registration.

    See more

    Declaration

    Swift

    public class SavedPostFinanceCard: SavedCard
  • This class contains saved Reka 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 SavedReka can be created by successfully completing a Reka payment or with a dedicated registration.

    See more

    Declaration

    Swift

    public class SavedReka: SavedCard
  • This class contains saved SEPA (ELV) 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 SavedSEPA can be created by successfully completing a SEPA payment or with a dedicated registration.

    See more

    Declaration

    Swift

    public class SavedSEPA: SavedPaymentMethod