STPPaymentMethodParams

public class STPPaymentMethodParams : NSObject, STPFormEncodable, STPPaymentOption

An object representing parameters used to create a PaymentMethod object. @note To create a PaymentMethod from an Apple Pay PKPaymentToken, see STPAPIClient createPaymentMethodWithPayment:completion:

STPFormEncodable

STPPaymentOption

Legacy ObjC

  • Creates params for a card PaymentMethod.

    Declaration

    Swift

    @objc(paramsWithCard:billingDetails:metadata:)
    public class func paramsWith(
      card: STPPaymentMethodCardParams, billingDetails: STPPaymentMethodBillingDetails?,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    card

    An object containing the user’s card details.

    billingDetails

    An object containing the user’s billing details.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for an iDEAL PaymentMethod.

    Declaration

    Swift

    @objc(paramsWithiDEAL:billingDetails:metadata:)
    public class func paramsWith(
      iDEAL: STPPaymentMethodiDEALParams, billingDetails: STPPaymentMethodBillingDetails?,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    iDEAL

    An object containing the user’s iDEAL bank details.

    billingDetails

    An object containing the user’s billing details.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for an FPX PaymentMethod.

    Declaration

    Swift

    @objc(paramsWithFPX:billingDetails:metadata:)
    public class func paramsWith(
      fpx: STPPaymentMethodFPXParams, billingDetails: STPPaymentMethodBillingDetails?,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    fpx

    An object containing the user’s FPX bank details.

    billingDetails

    An object containing the user’s billing details.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for a SEPA Debit PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithSEPADebit:billingDetails:metadata:)
    public class func paramsWith(
      sepaDebit: STPPaymentMethodSEPADebitParams,
      billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    sepaDebit

    An object containing the SEPA bank debit details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.name is required for SEPA Debit PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for a Bacs Debit PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithBacsDebit:billingDetails:metadata:)
    public class func paramsWith(
      bacsDebit: STPPaymentMethodBacsDebitParams, billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    bacsDebit

    An object containing the Bacs bank debit details.

    billingDetails

    An object containing the user’s billing details. Note that name, email, and address are required for Bacs Debit PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for an AU BECS Debit PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithAUBECSDebit:billingDetails:metadata:)
    public class func paramsWith(
      auBECSDebit: STPPaymentMethodAUBECSDebitParams,
      billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    auBECSDebit

    An object containing the AU BECS bank debit details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.name and billingDetails.email are required for AU BECS Debit PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for a giropay PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithGiropay:billingDetails:metadata:)
    public class func paramsWith(
      giropay: STPPaymentMethodGiropayParams,
      billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    giropay

    An object containing additional giropay details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.name is required for giropay PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for an EPS PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithEPS:billingDetails:metadata:)
    public class func paramsWith(
      eps: STPPaymentMethodEPSParams,
      billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    eps

    An object containing additional EPS details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.name is required for EPS PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for a Przelewy24 PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithPrzelewy24:billingDetails:metadata:)
    public class func paramsWith(
      przelewy24: STPPaymentMethodPrzelewy24Params,
      billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    przelewy24

    An object containing additional Przelewy24 details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.email is required for Przelewy24 PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for a Bancontact PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithBancontact:billingDetails:metadata:)
    public class func paramsWith(
      bancontact: STPPaymentMethodBancontactParams,
      billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    bancontact

    An object containing additional Bancontact details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.name is required for Bancontact PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for an OXXO PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithOXXO:billingDetails:metadata:)
    public class func paramsWith(
      oxxo: STPPaymentMethodOXXOParams,
      billingDetails: STPPaymentMethodBillingDetails,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    oxxo

    An object containing additional OXXO details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.name is required for OXXO PaymentMethods.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for a GrabPay PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithGrabPay:billingDetails:metadata:)
    public class func paramsWith(
      grabPay: STPPaymentMethodGrabPayParams,
      billingDetails: STPPaymentMethodBillingDetails?,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    grabPay

    An object containing additional GrabPay details.

    billingDetails

    An object containing the user’s billing details.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for a Sofort PaymentMethod;

    Declaration

    Swift

    @objc(paramsWithSofort:billingDetails:metadata:)
    public class func paramsWith(
      sofort: STPPaymentMethodSofortParams,
      billingDetails: STPPaymentMethodBillingDetails?,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    sofort

    An object containing additional Sofort details.

    billingDetails

    An object containing the user’s billing details. Note that billingDetails.name and billingDetails.email are required to save bank details from a Sofort payment.

    metadata

    Additional information to attach to the PaymentMethod.

  • Creates params for an Alipay PaymentMethod.

    Declaration

    Swift

    @objc(paramsWithAlipay:billingDetails:metadata:)
    public class func paramsWith(
      alipay: STPPaymentMethodAlipayParams,
      billingDetails: STPPaymentMethodBillingDetails?,
      metadata: [String: String]?
    ) -> STPPaymentMethodParams

    Parameters

    alipay

    An object containing additional Alipay details.

    billingDetails

    An object containing the user’s billing details.

    metadata

    Additional information to attach to the PaymentMethod.