Vorotnyak_Nazar
Vorotnyak_Nazar

Reputation: 914

ios in app billing. Do I need to send a new receipt after auto renew?

I buy an auto-renew subscription, get token, send to server and it validates the receipt. If auto renew happens UpdatedTransactions should be fired. For client side validation it is mandatory to handle this. But should I get a new receipt and send to server again for validation or previous receipt(that I was sending first time during initial purchase) will also return updated exp date for subscription?

Upvotes: 1

Views: 53

Answers (1)

Jacob Eiting
Jacob Eiting

Reputation: 1004

If you want to verify that a user's renewal is legitimate you need to validate the latest transaction. You can either:

  1. Send the current receipt to the backend and re-verify directly.
  2. You can use the old receipt, send it to Apple again, and check the latest_receipt_info key in the response. It will contain all the valid transactions from the latest transaction.

Either way you will need to process this info and send it back to your device to update the new expiration date. If you don't send it to Apple, it is very easy for IAP crackers to fake transactions via StoreKit.

Upvotes: 2

Related Questions