When your application is open, you want to send receipt-data
and password
to the Apple server.
Returns with STATUS
:
If status 0
subscription is automatically updated.
If the status is 21000
Application Store could not read the JSON object you provided.
If status 21002
data in the receipt property has been corrupted.
if Status 21003
receipt cannot be authenticated.
if status 21004
shared secret provided does not match the shared sector in the file for your account.
if Status 21005
Receive server is unavailable.
If status 21006
This receipt is valid, but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response.
If status 21007
This receipt is a sandbox receipt, but it was sent to the production service for verification.
If status 21008
This receipt is a production receipt, but it has been sent to the sandbox service for verification.
Refer to this link to sign up for automatic renewal.
source share