Skip to main content
Solved

RENEWAL webhooks sent every 5 minutes and automatically cancel


Forum|alt.badge.img+4
  • New Member
  • 2 replies

Hello and thanks for providing any insight.

 

I am trying to setup a webhooks to my AWS dynamodb to store all events so I can keep them as a backup.

 

I noticed that after resubscribing, multiple of the same webhook is being sent.  The only thing that changes is the transaction_id.

 

So in this case, I keep getting the same type “RENEWAL” webhooks every 5 or so minutes.  Most recently I counted 7 webhooks including the last one which was type “CANCELLATION” before they stopped.  Is there anything I missed?  Is it because it is in a Sandbox environment that I get multiple renewal actions from Apple?

 

All webhooks are getting the correct response code 200 and there is a green check mark next to them.

Best answer by sundeep

Hi Adam!
 

multiple of the same webhook is being sent.  The only thing that changes is the transaction_id. 

They aren’t the same if the transaction_id is changing. The expiration and purchase time stamps should also be different from each other. The events shouldn’t be the exact same event, but some will be of the same type (e.g. RENEWAL type - see our docs here for other possible types).

 

 Is it because it is in a Sandbox environment that I get multiple renewal actions from Apple?

Correct! To make it easier to test auto-renewing subscriptions, you get renewals every few minutes. We have a guide that shows this breakdown (and also gives other great pointers on iOS testing), but you can also see it here on the Apple docs (expand “Testing auto-renewable subscriptions”):

Actual Duration

Test Duration

1 week

3 minutes

1 month

5 minutes

2 months

10 minutes

3 months

15 minutes

6 months

30 minutes

1 year

1 hour

 

These durations are controlled by Apple, so you can’t change them yourself.

 

I counted 7 webhooks including the last one which was type “CANCELLATION” before they stopped. 

After several renewals, the subscription will stop renewing, so this is normal.

The renewals happen automatically, whether the app is open or not, so it shouldn’t have anything to do with calling `getPurchaserInfo`.

View original
Did this post help you find an answer to your question?

6 replies

Forum|alt.badge.img+4
  • Author
  • New Member
  • 2 replies
  • July 27, 2021

After looking into this a bit further, it seems like every time I call getPurchaserInfo(), if it has been more than 5 minutes, it will actually update the subscription and will send another webhook event.


sundeep
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 138 replies
  • Answer
  • July 28, 2021

Hi Adam!
 

multiple of the same webhook is being sent.  The only thing that changes is the transaction_id. 

They aren’t the same if the transaction_id is changing. The expiration and purchase time stamps should also be different from each other. The events shouldn’t be the exact same event, but some will be of the same type (e.g. RENEWAL type - see our docs here for other possible types).

 

 Is it because it is in a Sandbox environment that I get multiple renewal actions from Apple?

Correct! To make it easier to test auto-renewing subscriptions, you get renewals every few minutes. We have a guide that shows this breakdown (and also gives other great pointers on iOS testing), but you can also see it here on the Apple docs (expand “Testing auto-renewable subscriptions”):

Actual Duration

Test Duration

1 week

3 minutes

1 month

5 minutes

2 months

10 minutes

3 months

15 minutes

6 months

30 minutes

1 year

1 hour

 

These durations are controlled by Apple, so you can’t change them yourself.

 

I counted 7 webhooks including the last one which was type “CANCELLATION” before they stopped. 

After several renewals, the subscription will stop renewing, so this is normal.

The renewals happen automatically, whether the app is open or not, so it shouldn’t have anything to do with calling `getPurchaserInfo`.


Forum|alt.badge.img+4
  • Author
  • New Member
  • 2 replies
  • July 29, 2021

Thank you so much for the info!  It is much appreciated and solves my last step before going live!  Thanks again!!


Forum|alt.badge.img+4

Hi

After looking into this a bit further, it seems like every time I call getPurchaserInfo(), if it has been more than 5 minutes, it will actually update the subscription and will send another webhook event.

 

I have exactly the same behaviour, it’s the call getPurchaserInfo() that sends another webhook, do you have an idea?

 

Thanks


Forum|alt.badge.img+4
  • Member
  • 5 replies
  • January 9, 2024

any solutions


  • New Member
  • 1 reply
  • January 11, 2024

Same issue here. Every time the app loads and I check subscriptions using:

const customerInfo = await Purchases.getCustomerInfo();

This seems to trigger a renewal. This is not helpful when I want to keep retesting the full flow of subscribing. 

Please advise on this. Thanks


Reply


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