Question

How to get handlers on custom paywalls?

  • 2 December 2023
  • 2 replies
  • 117 views

Badge +2

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?


2 replies

Userlevel 6
Badge +8

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

Badge +2

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

Reply