Classes

The following classes are available globally.

  • A drop-in class that presents a sheet for a customer to complete their payment

    See more

    Declaration

    Swift

    public class PaymentSheet
  • A client for making connections to the Stripe API.

    See more

    Declaration

    Swift

    public class STPAPIClient
  • STPAUBECSDebitFormView is a subclass of UIControl that contains all of the necessary fields and legal text for collecting AU BECS Debit payments. For additional customization options - seealso: STPFormTextFieldContainer

    See more

    Declaration

    Swift

    public class STPAUBECSDebitFormView: STPMultiFormTextField, STPMultiFormFieldDelegate,
        UITextViewDelegate
  • This view controller contains a credit card entry form that the user can fill out. On submission, it will use the Stripe API to convert the user’s card details to a Stripe token. It renders a right bar button item that submits the form, so it must be shown inside a UINavigationController.

    See more

    Declaration

    Swift

    public class STPAddCardViewController: STPCoreTableViewController, STPAddressViewModelDelegate,
        STPCardScannerDelegate, STPPaymentCardTextFieldDelegate, UITableViewDelegate,
        UITableViewDataSource
  • STPAddress Contains an address as represented by the Stripe API.

    See more

    Declaration

    Swift

    public class STPAddress : NSObject
    extension STPAddress: STPAPIResponseDecodable
    extension STPAddress: STPFormEncodable
    extension STPAddress: NSCopying
  • A helper class that implements Apple Pay. Usage looks like this:

    1. Initialize this class with a PKPaymentRequest describing the payment request (amount, line items, required shipping info, etc)
    2. Call presentApplePayOnViewController:completion: to present the Apple Pay sheet and begin the payment process 3 (optional): If you need to respond to the user changing their shipping information/shipping method, implement the optional delegate methods
    3. When the user taps ‘Buy’, this class uses the PaymentIntent that you supply in the applePayContext:didCreatePaymentMethod:completion: delegate method to complete the payment
    4. After payment completes/errors and the sheet is dismissed, this class informs you in the applePayContext:didCompleteWithStatus: delegate method

Seealso

https://stripe.com/docs/apple-pay#native for a full guide

Seealso

ApplePayExampleViewController for an example

Declaration

Swift

@available(iOSApplicationExtension, unavailable)
@available(macCatalystApplicationExtension, unavailable)
@objc
public class STPApplePayContext : NSObject, PKPaymentAuthorizationControllerDelegate