Skip to main content
Question

How to get handlers on custom paywalls?


Forum|alt.badge.img+4

the below method has two handlers for the purchase

public func presentPaywallIfNeeded(
        fonts: PaywallFontProvider = DefaultPaywallFontProvider(),
        shouldDisplay: @escaping @Sendable (CustomerInfo) -> Bool,
        purchaseCompleted: PurchaseOrRestoreCompletedHandler? = nil,
        restoreCompleted: PurchaseOrRestoreCompletedHandler? = nil
)

How can our application detect when the purchase is completed or restored when using a custom paywall?

This post has been closed for comments

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 501 replies
  • December 6, 2023

Hey @horatio!

If you aren’t using our Paywalls feature, and are building your own custom paywall, you’ll need to manually watch the result of the `purchase` method and check the status of the resulting CustomerInfo.

You can read more in our docs here: https://www.revenuecat.com/docs/making-purchases


Forum|alt.badge.img+4
  • Author
  • New Member
  • 1 reply
  • December 7, 2023

Yeah but how do I know when the purchase is made using the Paywalls feature?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings