Payment Methods
-
Configuration object for Apple Pay transactions.
See moreDeclaration
Swift
@objc(DTApplePayConfig) @objcMembers public class ApplePayConfig : NSObject, NSCopying -
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 -
This class provides additional details about a debit or credit card.
See moreDeclaration
Swift
@objc(DTCardInfo) @objcMembers public final class CardInfo : 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, NSCopying -
The payment method used during the transaction.
See moreDeclaration
Swift
@objc(DTPaymentMethodType) public enum PaymentMethodType : Int, CaseIterable -
Provides Objective-C–compatible access to
DTPaymentMethodTypeconversions.Swift users should use
See morePaymentMethodType.fromIdentifier(identifier:)and theidentifierproperty directly.Declaration
Swift
@objc(DTPaymentMethodTypeMapper) public class PaymentMethodTypeMapper : NSObject -
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
SavedPaymentMethodsubclass (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
SavedPaymentMethodsubclass): 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 Apple Pay payment method details.
Like any other
SavedPaymentMethodsubclass, 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 moreSavedApplePayobject 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 credit or debit card payment method details.
Just like any other
SavedPaymentMethodsubclass, 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 moreSavedCardcan be created by successfully completing a card payment or with a dedicated registration.Declaration
Swift
@objc(DTSavedCard) @objcMembers public class SavedCard : SavedPaymentMethod -
This class contains saved PayPal payment method details.
Just like any other
SavedPaymentMethodsubclass, 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 moreSavedPayPalcan 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 Pay payment method details.
Like any other
SavedPaymentMethodsubclass, this class can be used to pay with a previously registered payment method or to present a list of saved payment methods to the user for fast checkouts.A
See moreSavedPostFinancePayobject can be created either by successfully completing a PostFinance Pay payment or through a dedicated registration process.Declaration
Swift
@objc(DTSavedPostFinancePay) @objcMembers public class SavedPostFinancePay : SavedPaymentMethod
View on GitHub
Payment Methods Reference