Skip to main content
Question

How to get handlers on custom paywalls?

  • December 2, 2023
  • 2 replies
  • 206 views

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
  • 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
  • December 7, 2023

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