Saved Payment Method
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, Google Pay, Samsung Pay, CembraPay, SwissPass, Powerpay Invoice, Klarna
Complex payment methods (requiring a SavedPaymentMethod subclass): Card payments, Boncard, PayPal, PostFinance, Reka
Please refer to the Datatrans documentation to see if you can register a payment method during payment or require a dedicated registration.
Parameters
Payment method type, e.g. PayPal or Twint.
The alias that can be used to process recurring payments or fast checkouts.
Inheritors
Constructors
Types
This companion contains static methods used to deserialize a SavedPaymentMethod from a JSON string or from data created by the old payment library.