Payment Method

  • Configuration object for Apple Pay transactions.

    See more

    Declaration

    Swift

    @objc(DTApplePayConfig)
    @objcMembers
    public class ApplePayConfig : NSObject, NSCopying
  • Configuration object for Boncard transactions.

    See more

    Declaration

    Swift

    @objc(DTBoncardConfig)
    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

    @objc(DTBoncardType)
    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

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

    See more

    Declaration

    Swift

    @objc(DTCardExpiryDate)
    @objcMembers
    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

    @objc(DTCardLabelType)
    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

    @objc(DTPaymentMethod)
    @objcMembers
    public class PaymentMethod : NSObject, Codable, NSCoding, NSCopying
  • The payment method used during the transaction.

    See more

    Declaration

    Swift

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

    See more

    Declaration

    Swift

    @objc(DTPaymentMethodTypeMapper)
    public class PaymentMethodTypeMapper : NSObject
  • 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

    @objc(DTSavedBoncard)
    @objcMembers
    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

    @objc(DTSavedCard)
    @objcMembers
    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

    @objc(DTSavedPaymentMethod)
    @objcMembers
    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

    @objc(DTSavedPayPal)
    @objcMembers
    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

    @objc(DTSavedPostFinanceCard)
    @objcMembers
    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

    @objc(DTSavedReka)
    @objcMembers
    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

    @objc(DTSavedSEPA)
    @objcMembers
    public class SavedSEPA : SavedPaymentMethod