The strategy is:
-
You save the
latest_receipt
("MIIUJgYJKoZIhvc..." base64) field in your DB, associated with the user account. -
Every day you query apple to validate all the receipts, by sending them the base64 receipt from saved
latest_receipt
field. -
In the receipt you check if there is a
cancellation_date
field. If you find it, treat it according to documentation:
Treat a canceled receipt the same as if no purchase had ever been made.
Same way you also checking subscription renewals (check expires_date_ms
field).