PaymentSheet

public class PaymentSheet

A drop-in class that presents a sheet for a customer to complete their payment This class is in beta; see https://stripe.com/docs/mobile/payments-ui-beta for access

  • This contains all configurable properties of PaymentSheet

    Declaration

    Swift

    public let configuration: Configuration
  • The most recent error encountered by the customer, if any.

    Declaration

    Swift

    public private(set) var mostRecentError: Error? { get }
  • Presents a sheet for a customer to complete their payment

    Declaration

    Swift

    @available(iOSApplicationExtension, unavailable)
    @available(macCatalystApplicationExtension, unavailable)
    public func present(
        from presentingViewController: UIViewController,
        completion: @escaping (PaymentSheetResult) -> ()
    )

    Parameters

    presentingViewController

    The view controller to present a payment sheet

    completion

    Called with the result of the payment after the payment sheet is dismissed

  • A button which presents a sheet for a customer to complete their payment. This is a convenience wrapper for the .paymentSheet() ViewModifier.

    See more

    Declaration

    Swift

    public struct PaymentButton<Content> : View where Content : View

    Parameters

    paymentSheet

    A PaymentSheet to present.

    onCompletion

    Called with the result of the payment after the payment sheet is dismissed.

    content

    The content of the view.

  • A class that presents the individual steps of a payment flow

    See more

    Declaration

    Swift

    @available(iOSApplicationExtension, unavailable)
    @available(macCatalystApplicationExtension, unavailable)
    public class FlowController

Configuration