App Store
Last updated
Was this helpful?
Last updated
Was this helpful?
To initialize the service, call the startAutoTracking
method of the DTDPurchases
interface. Call the method after the SDK initialization call:
Subscription renewals, cancellations, and other status changes are tracked using server-to-server data from the App Store. See the following sections for setup.
In order to be able to track status changes for subscriptions that were issued prior to the devtodev SDK integration, you must send the history of previously purchased user subscriptions to devtodev.
The SDK keeps track of the need to send this historical data so that it does not make “unnecessary” requests to the App Store. Use the isRestoreTransactionHistoryRequired
method to check whether it is necessary to send data about previously purchased subscriptions to devtodev.
The isRestoreTransactionHistoryRequired
method returns a BOOL
value.
Here is an example of a purchase history request with the check:
To get detailed information about the transaction, devtodev requires access to the App Store Server API. To grant this access, you will need to generate an In-App Purchase API key.
Generating the key:
Navigate to the Users and Access section.
In the Integrations tab (1), select In-App Purchase from the menu on the left (2), and click (+)
to add the key (3).
Specify the name of the key, for example: "devtodev API Key", and click Generate
.
To grant the necessary access to the devtodev service, it is necessary to pass the following information:
Issuer ID
Key ID
The generated .p8 file of the In-App Purchase key
Bundle identifier of the application (App Bundle ID)
Go to Settings → Payments integration → IAP auto tracking → Integrate.
App Bundle ID
Issuer ID
Key ID
Upload the .p8 file of the In-App Purchase key.
When the integration is complete, the status will change to Active.
In order for IAP auto tracking to work correctly with subscriptions, you need to integrate App Store Server Notification. Go to Settings → Payments integration → Subscriptions → Integrate.
Fill in the iOS Bundle ID and copy the Endpoint URL.
DTDPurchases
service will get the information about previously purchased subscriptions automatically from SKPaymentQueue
. Sending the data via the method is not required.
Authorize on .
Fill in the integration form with the data :
Navigate to . In the left menu column, under General, go to App information. Paste the copied endpoint URL into the Production Server URL and Sandbox Server URL fields.
Click Save
to confirm your changes.