Payment Method
-
Configuration object for Apple Pay transactions.
See moreDeclaration
Swift
@objc(DTApplePayConfig) @objcMembers public class ApplePayConfig : NSObject, NSCopying
-
Configuration object for Boncard transactions.
See moreDeclaration
Swift
@objc(DTBoncardConfig) public class BoncardConfig : NSObject, NSCopying
-
The different types of Boncard, for determining how the
See morePaymentMethodType.Boncard
payment method type is displayed in the payment selection.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 moreDeclaration
Swift
@objc(DTCard) @objcMembers public class Card : PaymentMethod
-
Class to be used to represent the card expiry date (month and year).
See moreDeclaration
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 moreDeclaration
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 moreDeclaration
Swift
@objc(DTPaymentMethod) @objcMembers public class PaymentMethod : NSObject, Codable, NSCoding, NSCopying
-
The payment method used during the transaction.
See moreDeclaration
Swift
@objc(DTPaymentMethodType) public enum PaymentMethodType : Int, CaseIterable
-
Use this class to map the payment method identifiers from Datatrans to the
See morePaymentMethodType
.Declaration
Swift
@objc(DTPaymentMethodTypeMapper) 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
See moreSavedApplePay
object can be created by successfully completing an Apple Pay payment or with a dedicated registration.Declaration
Swift
@objc(DTSavedApplePay) @objcMembers 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
See moreSavedBoncard
can be created by successfully completing a Boncard payment or with a dedicated registration.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
See moreSavedCard
can be created by successfully completing a card payment or with a dedicated registration.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 moreDeclaration
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
See moreSavedPayPal
can be created by successfully completing a PayPal payment or with a dedicated registration.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
See moreSavedPostFinanceCard
can be created by successfully completing a PostFinance Card payment or with a dedicated registration.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
See moreSavedReka
can be created by successfully completing a Reka payment or with a dedicated registration.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
See moreSavedSEPA
can be created by successfully completing a SEPA payment or with a dedicated registration.Declaration
Swift
@objc(DTSavedSEPA) @objcMembers public class SavedSEPA : SavedPaymentMethod