Classes

The following classes are available globally.

Date of Birth

Error Codes

STPError

  • Top-level class for Stripe error constants.

    See more

    Declaration

    Swift

    public class STPError
  • 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

@objc(_stpinternal_APContextSwift)
public class STPApplePayContext : NSObject, PKPaymentAuthorizationControllerDelegate