I read many materials about ios renewable subscriptions and have this workflow:
- The application gets receipts from apple and sends it to the backend
- Backend vefify receipt by apple verify-url
- Backend gets real transaction_id and expires_date only from latest_receipt_info
- If backend does not have this transaction in DB it will increase subscription for user
That workflow because:
- Apple can send in receipt check-notifications - why I got information from latest_receipt_info
- Apple recommends this flow for renewals
But I have some problems/questions:
- I want to exclude application from this flow. I want create like android-flow - sync all renewals from backend. How can I create it?
- What happend if user does not start application for 1 year? Will apple get money from user? How will I get notification if application is not started?
Please give me links or answers for my questions.
UPD:
I have one question Now. How to connect with apple servers for sync renewals like android flow.
Current scheme:
+--------------+ +--------------+ +---------------+
| | | | | |
| Mobile | | Backend | | Apple r
| | | | | |
+------+-------+ +-------+------+ +--------+------+
| Sync | |
+------------------------------------------------------>
<------------------------------------------------------+
| Renew | |
+---------------------------> Verify |
| +-------------------------->
| Renewed <--------------------------+
<---------------------------+ |
+ + +
But I want flow without mobile inapp:
+--------------+ +--------------+ +---------------+
| | | | | |
| Mobile | | Backend | | Apple r
| | | | | |
+------+-------+ +-------+------+ +--------+------+
| Data for sync | |
+---------------------------> Check renewals |
| +-------------------------->
| <--------------------------+
| +--+ |
| | | Renew |
| <--+ |
| | Check renewals |
| +-------------------------->
| <--------------------------+
| | |
++ + +
Welcome to Apple Sir, there are a few things you should note before attempting to create an "Android flow".
So Apple is always in control of this process. You will not be able to identify a user using their receipt or even get any credit card information from them. You simply rely on the fact that when Apple provide you with a receipt that it is a valid receipt and you will be paid for it
Regarding renewals, heres an excerpt from the documentation regarding how they should be handled:
So every time your App launches you get the opportunity to add any existing transactions to your queue. This is the time where you can inform the server that a receipt has been renewed.