Contents

present(completion:)

Presents the payment sheet modally over your app.

Declaration

func present(completion: (@Sendable (Bool) -> Void)? = nil)
func present() async -> Bool

Parameters

  • completion:

    A block that is called after the sheet is presented. This block is passed the following parameters:

    success

    A Boolean value that indicates whether the payment sheet was successfully presented. True if the payment sheet was presented successfully; otherwise, False.

Discussion

You are responsible for dismissing the payment sheet.

See Also

Handling user interactions