YAAK is a simple server that by its API makes In-App Purchase receipt and Auto-Renewable subscription validation easy
You should always validate receipts on the server, in Apple's words:
Use a trusted server to communicate with the App Store. Using your own server lets you design your app to recognize and trust only your server, and lets you ensure that your server connects with the App Store server. It is not possible to build a trusted connection between a user’s device and the App Store directly because you don’t control either end of that connection.
YAAK is a Spring Boot application written in Kotlin and built using Gradle. You can build a jar file and then run it on your local machine as follows:
$ git clone https://github.com/dietmap/yaak.git
$ cd yaak
$ ./gradlew clean build
$ java -jar build/libs/*.jar
Or you can run it from Gradle directly using the Spring Boot Gradle plugin.
$ ./gradlew bootRun
Once you run it you can access YAAK here: http://localhost:8080/
By default YAAK runs with this settings. You should generate your own secure API key or choose and configure other available security option: API_KEY, OAUTH, NONE
Once the YAAK is started you can hit this endpoint in order to verify whether the service is up and running:
$ curl http://localhost:8080/actuator/health
You can plug-in your custom webhook for handling subscription/purchase specific logic.
yaak.user-app.subscription-webhook-url
The following API endpoints accept HTTP POST method and require Content-Type: application/json request body
Returns HTTP 200 with the detailed receipt body or HTTP 500 with error details in case of any errors
Simply returns HTTP code without response body. HTTP 200 if the receipt is valid or HTTP 500 in case of any errors.
...
...
The docker image is stored in Docker Hub dietmap/yaak repo.
Bug reports and pull requests are welcome on GitHub at https://github.com/dietmap/yaak
YAAK is Open Source software released under MIT license.