Skip to main content
Solved

Purchases.shared.paymentDiscount is VERY slow

  • October 3, 2021
  • 1 reply
  • 140 views

Forum|alt.badge.img+1

Why is the Purchases.shared.paymentDiscount function taking so long to complete? The completion is called about 30 sec after the function is called. 

Best answer by ryan

It’s not uncommon for some Apple APIs to get pretty clunky in sandbox - this includes fetching products, making or restoring purchases, generating payment discounts, etc. I’ve never seen any timeout periods so requests can take minutes sometimes - in production things tend to be much quicker. 

Since certain requests need to go through system level iOS APIs, such as this one, there’s unfortunately not much developers can do to speed things up or work around it but I wouldn’t worry too much about the speed of these requests in sandbox. 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

1 reply

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • Answer
  • October 5, 2021

It’s not uncommon for some Apple APIs to get pretty clunky in sandbox - this includes fetching products, making or restoring purchases, generating payment discounts, etc. I’ve never seen any timeout periods so requests can take minutes sometimes - in production things tend to be much quicker. 

Since certain requests need to go through system level iOS APIs, such as this one, there’s unfortunately not much developers can do to speed things up or work around it but I wouldn’t worry too much about the speed of these requests in sandbox. 


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