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.
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`.
Thank you so much for the info! It is much appreciated and solves my last step before going live! Thanks again!!
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
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