Classes

The following classes are available globally.

STPConfirmUSBankAccountOptions

Date of Birth

STPPaymentMethodUSBankAccount

STPPaymentMethodUSBankAccountNetworks

  • Contains information about US bank account networks that can be used

    See more

    Declaration

    Swift

    public class STPPaymentMethodUSBankAccountNetworks : NSObject
  • An object representing parameters used to create a US Bank Account Payment Method

    See more

    Declaration

    Swift

    public class STPPaymentMethodUSBankAccountParams : NSObject
  • Declaration

    Swift

    public class STPPaymentMethodiDEAL : NSObject, STPAPIResponseDecodable
  • An object representing parameters used to create an iDEAL Payment Method

    See more

    Declaration

    Swift

    public class STPPaymentMethodiDEALParams : NSObject, STPFormEncodable
  • This view controller presents a list of payment method options to the user, which they can select between. They can also add credit cards to the list. It must be displayed inside a UINavigationController, so you can either create a UINavigationController with an STPPaymentOptionsViewController as the rootViewController and then present the UINavigationController, or push a new STPPaymentOptionsViewController onto an existing UINavigationController‘s stack. You can also have STPPaymentContext do this for you automatically, by calling presentPaymentOptionsViewController or pushPaymentOptionsViewController on it.

    See more

    Declaration

    Swift

    public class STPPaymentOptionsViewController: STPCoreViewController,
        STPPaymentOptionsInternalViewControllerDelegate, STPAddCardViewControllerDelegate
  • When you’re using STPPaymentContext to request your user’s payment details, this is the object that will be returned to your application when they’ve successfully made a payment. See https://stripe.com/docs/mobile/ios/basic#submit-payment-intents

    See more

    Declaration

    Swift

    public class STPPaymentResult : NSObject
  • STPAPIClient extensions to manage PIN on Stripe Issuing cards

    See more

    Declaration

    Swift

    public class STPPinManagementService : NSObject
  • This class makes it easier to implement “Push Provisioning”, the process by which an end-user can add a card to their Apple Pay wallet without having to type their number. This process is mediated by an Apple class called PKAddPaymentPassViewController; this class will help you implement that class’ delegate methods. Note that this flow requires a special entitlement from Apple; for more information please see https://stripe.com/docs/issuing/cards/digital-wallets .

    See more

    Declaration

    Swift

    public class STPPushProvisioningContext : NSObject
  • A helper class for turning the raw certificate array, nonce, and nonce signature emitted by PKAddPaymentPassViewController into a format that is understandable by the Stripe API. If you are using STPPushProvisioningContext to implement your integration, you do not need to use this class.

    See more

    Declaration

    Swift

    public class STPPushProvisioningDetailsParams : NSObject
  • A Radar Session.

    Note

    This API and the guide linked above require special permissions to use. Contact support@stripe.com if you’re interested.
    See more

    Declaration

    Swift

    public final class STPRadarSession : NSObject, STPAPIResponseDecodable
  • This is a helper class for handling redirects associated with STPSource and STPPaymentIntents. Init and retain an instance with the Source or PaymentIntent you want to handle, then choose a redirect method. The context will fire the completion handler when the redirect completes. Due to the nature of iOS, very little concrete information can be gained during this process, as all actions take place in either the Safari app or the sandboxed SFSafariViewController class. The context attempts to detect when the user has completed the necessary redirect action by listening for both app foregrounds and url callbacks received in the app delegate. However, it is possible the when the redirect is “completed”, the user may have not actually completed the necessary actions to authorize the charge. You should not use either this class, nor STPAPIClient, as a way to determine when you should charge the Source or to determine if the redirect was successful. Use Stripe webhooks on your backend server to listen for Source state changes and to make the charge. @note You must retain this instance for the duration of the redirect flow. This class dismisses any presented view controller upon deallocation. See https://stripe.com/docs/sources/best-practices

    See more

    Declaration

    Swift

    @available(iOSApplicationExtension, unavailable)
    @available(macCatalystApplicationExtension, unavailable)
    public class STPRedirectContext: NSObject, SFSafariViewControllerDelegate,
        UIViewControllerTransitioningDelegate, STPSafariViewControllerDismissalDelegate
  • A SetupIntent guides you through the process of setting up a customer’s payment credentials for future payments.

    See more

    Declaration

    Swift

    public class STPSetupIntent : NSObject, STPAPIResponseDecodable
  • An object representing parameters to confirm a SetupIntent object. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management view in your app. If the selected payment method does not require any additional steps from the customer, the SetupIntent’s status will transition to STPSetupIntentStatusSucceeded. Otherwise, it will transition to STPSetupIntentStatusRequiresAction, and suggest additional actions via nextAction. Instead of passing this to STPAPIClient.confirmSetupIntent(...) directly, we recommend using STPPaymentHandler to handle any additional steps for you.

    See more

    Declaration

    Swift

    public class STPSetupIntentConfirmParams : NSObject, NSCopying, STPFormEncodable

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